我想让我的 ListFragment 的一些 Itam 加粗,另一个不加粗(如下图所示)
代码是:
public class ItemListFragment extends ListFragment {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
DummyItem i0 = new DummyItem("0", "Welcome" + S.getUsername());
DummyContent.addItem(i0);
//useless code
DummyItem ichat = new DummyItem(String.valueOf(j), "Table Chat");
DummyContent.addItem(ichat);
j++;
DummyItem iblackboard = new DummyItem(String.valueOf(j), "Black Board");
DummyContent.addItem(iblackboard);
setListAdapter(new ArrayAdapter<DummyContent.DummyItem>(getActivity(),
android.R.layout.simple_list_item_activated_1,
android.R.id.text1, DummyContent.ITEMS));
}
}
非常感谢