次のように、アクティビティで文字列のリストを表示します。
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
String[] lKeys = new String[mKey.size()];
int i = 0;
if (lKeys != null) {
for (Iterator<String> ite = mKey.iterator(); ite.hasNext();) {
String element = ite.next();
if (element.contains("Data")) {
lKeys[i++] = element;
} else {
lKeys[i++] = element + ": " + mValue.get(element);
}
}
}
//
this.setTitle(mTitle);
setListAdapter(new ArrayAdapter<String>(this,R.layout.popupactivity,lKeys));
このxml
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tvResults"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:textColor="#000000"
android:background="#ffffff"
android:layout_marginLeft="5dp"
android:textSize="12sp"
android:padding="5dp" >
</TextView>
これはうまく機能しますが、リストの行にいくつかの色を付ける必要があります。誰が私を助けることができます?
本当にありがとう!