FileDocCategorySizeDatePackage
ListWithMailMessages.javaAPI DocAndroid 5.1 API4439Thu Mar 12 22:22:12 GMT 2015android.widget.focus

ListWithMailMessages

public class ListWithMailMessages extends android.app.ListActivity

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

        super.onCreate(icicle);
        setContentView(R.layout.list_with_button_above);

        List<MailMessage> messages = Lists.newArrayList();
        messages.add(new MailMessage("hello!", "<p>this is a test "
                + "message, with a bunch of text and stuff.</p>", true));

//        String android = "android";
        String android = "<a href=\"www.android.com\">android</a>";

        String sentance = "all work and no play makes "
        + android + " a dull... robot!";
        StringBuffer longBody = new StringBuffer().append("<ol>\n");
        for (int i = 0; i < 12; i++) {
            longBody.append("<li>").append(sentance).append("</li>");
        }
        longBody.append("</ol>");

        messages.add(new MailMessage("hello2!", longBody.toString(), true));
        messages.add(new MailMessage("phone number?", "<p>hey man, what's ur "
                + "contact info? i need to mail you this photo of my two"
                + " cats, they've gotten soooo fat!</p>", true));

        setListAdapter(new MyAdapter(this, R.layout.mail_message, messages));
        getListView().setItemsCanFocus(true);