FileDocCategorySizeDatePackage
StyledText.javaAPI DocGoogle Android v1.5 Example1590Sun Nov 11 13:01:04 GMT 2007com.google.android.samples.content

StyledText

public class StyledText extends android.app.Activity
Demonstration of styled text resources.

Fields Summary
Constructors Summary
Methods Summary
protected voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);

        // See assets/res/any/layout/styled_text.xml for this
        // view layout definition.
        setContentView(R.layout.styled_text);

        // Programmatically retrieve a string resource with style
        // information and apply it to the second text view.  Note the
        // use of CharSequence instead of String so we don't lose
        // the style info.
        CharSequence str = getText(R.string.styled_text);
        TextView tv = (TextView)findViewById(R.id.text);
        tv.setText(str);