mirror of https://github.com/BOINC/boinc.git
Android: Switch to a table layout instead of just a list layout. The list layout didn't align the columns.
This commit is contained in:
parent
dc6aee4dcc
commit
b283880427
|
@ -22,11 +22,11 @@
|
|||
android:layout_height="match_parent"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<ListView
|
||||
<TableLayout
|
||||
android:id="@+id/msgsList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" >
|
||||
android:layout_height="wrap_content" >
|
||||
|
||||
</ListView>
|
||||
</TableLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -23,25 +23,33 @@
|
|||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/msgs_project"
|
||||
android:layout_width="wrap_content"
|
||||
<TableRow
|
||||
android:id="@+id/msgs_row"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:text="Project" />
|
||||
android:orientation="horizontal" >
|
||||
|
||||
<TextView
|
||||
android:id="@+id/msgs_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:text="Date" />
|
||||
<TextView
|
||||
android:id="@+id/msgs_project"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:text="Project" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/msgs_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:text="Message" />
|
||||
<TextView
|
||||
android:id="@+id/msgs_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:text="Date" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/msgs_message"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="2dp"
|
||||
android:text="Message" />
|
||||
|
||||
</TableRow>
|
||||
|
||||
</TableRow>
|
|
@ -58,7 +58,7 @@ public class MessagesListAdapter extends ArrayAdapter<Message>{
|
|||
|
||||
// Construct output
|
||||
String project = listItem.project;
|
||||
String date = new Date(listItem.timestamp/1000).toString();
|
||||
String date = new Date(listItem.timestamp).toString();
|
||||
String message = listItem.body;
|
||||
|
||||
// Instantiate layout elements
|
||||
|
|
Loading…
Reference in New Issue