FileDocCategorySizeDatePackage
FontPicker.javaAPI DocAndroid 1.5 API2499Wed May 06 22:41:08 BST 2009com.android.fontlab

FontPicker

public abstract class FontPicker extends android.app.ListActivity

Fields Summary
Constructors Summary
Methods Summary
protected voidaddItem(java.util.List data, java.lang.String name, java.lang.String fontName, int style)

        Bundle temp = new Bundle();
        temp.putString("title", name);
        temp.putString("font", fontName);
        temp.putInt("style", style);
        data.add(temp);
    
protected java.util.ListgetData()

        List myData = new ArrayList<Bundle>(7);
        addItem(myData, "Sans",                 "sans-serif",   Typeface.NORMAL);
        addItem(myData, "Sans Bold",            "sans-serif",   Typeface.BOLD);
        addItem(myData, "Serif",                "serif",        Typeface.NORMAL);
        addItem(myData, "Serif Bold",           "serif",        Typeface.BOLD);
        addItem(myData, "Serif Italic",         "serif",        Typeface.ITALIC);
        addItem(myData, "Serif Bold Italic",    "serif",        Typeface.BOLD_ITALIC);
        addItem(myData, "Mono",                 "monospace",    Typeface.NORMAL);
        return myData;
    
public voidonCreate(android.os.Bundle icicle)

        super.onCreate(icicle);

        setListAdapter(new SimpleAdapter(this,
                getData(),
                android.R.layout.simple_list_item_1,
                new String[] {"title"},
                new int[] {android.R.id.text1}));
    
protected voidonListItemClick(android.widget.ListView l, android.view.View v, int position, long id)

        Bundle map = (Bundle) l.getItemAtPosition(position);
        setResult(RESULT_OK, (new Intent()).putExtras(map));
        finish();