日時でソートされたアイテムがあるListActivityがあります。私は3つのテキストビューを持っています。これが私がしたことです:
レイアウトのコードは次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/bpSysHolder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" >
</TextView>
<TextView
android:id="@+id/bpDiaHolder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" >
</TextView>
<TextView
android:id="@+id/bpDtHolder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView" >
</TextView>
</LinearLayout>
私のリストアクティビティからそれらを呼び出すために私は使用します:
String[] from = new String[] { BpDAO.bp_SYS, BpDAO.bp_DIA, BpDAO.bp_DT };
int[] target = new int[] { R.id.bpSysHolder, R.id.bpDiaHolder,
R.id.bpDtHolder };
dbAdapter = new SimpleCursorAdapter(this, R.layout.history_bp, bpList,
from, target);
setListAdapter(dbAdapter);
今ではこのようになっています:
---120952012-09-20 15:05 ---
---145902012-09-20 10:44 ---
---145952012-09-20 10:42 ---
...
---14595 2012-09-20 10:42 ---
---------------------------------
それらの間にスペースを置き、列の上下に少しスペースを空けて、触れやすくする方法はありますか?