Skip to content

Commit 7d179ad

Browse files
committed
Bookinfo dialog better reflow
1 parent 7278036 commit 7d179ad

File tree

3 files changed

+46
-21
lines changed

3 files changed

+46
-21
lines changed

android/res/layout/book_info_dialog.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@
4949
android:id="@+id/table"
5050
style="@style/TextAppearance.Small"
5151
android:layout_width="fill_parent"
52-
android:layout_height="wrap_content"></TableLayout>
52+
android:layout_height="wrap_content"
53+
android:stretchColumns="1"
54+
android:layout_weight="10"
55+
android:layout_margin="2dp"
56+
></TableLayout>
5357
</LinearLayout>
5458
</ScrollView>

android/res/layout/book_info_item.xml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,38 @@
44
android:layout_margin="2dip"
55
android:layout_width="fill_parent"
66
android:layout_height="wrap_content"
7+
android:layout_weight="1"
78
>
8-
<TextView
9-
android:id="@+id/name"
10-
style="@style/TextAppearance.Small"
11-
android:singleLine="false"
12-
android:maxLines="3"
13-
android:layout_marginRight="5dip"
14-
android:layout_width="wrap_content"
15-
android:layout_height="wrap_content"/>
16-
<TextView
17-
android:id="@+id/value"
18-
style="@style/TextAppearance.Small"
19-
android:singleLine="false"
20-
android:maxLines="3"
21-
android:layout_width="wrap_content"
22-
android:layout_height="wrap_content"/>
9+
<LinearLayout
10+
android:id="@+id/book_info_grid_cell1"
11+
android:layout_width="0dip"
12+
android:layout_height="fill_parent"
13+
android:gravity="left"
14+
android:layout_weight="1"
15+
android:orientation="horizontal">
16+
<TextView
17+
android:id="@+id/name"
18+
style="@style/TextAppearance.Small"
19+
android:singleLine="false"
20+
android:maxLines="3"
21+
android:textStyle="bold"
22+
android:layout_marginRight="5dip"
23+
android:layout_width="wrap_content"
24+
android:layout_height="wrap_content"/>
25+
</LinearLayout>
26+
<LinearLayout
27+
android:id="@+id/book_info_grid_cell2"
28+
android:layout_width="0dip"
29+
android:layout_height="fill_parent"
30+
android:gravity="left"
31+
android:layout_weight="2"
32+
android:orientation="horizontal">
33+
<TextView
34+
android:id="@+id/value"
35+
style="@style/TextAppearance.Small"
36+
android:singleLine="false"
37+
android:maxLines="3"
38+
android:layout_width="wrap_content"
39+
android:layout_height="wrap_content"/>
40+
</LinearLayout>
2341
</TableRow>

android/res/layout/book_info_section.xml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,21 @@
22
<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
33
android:id="@+id/browser_item_body"
44
android:layout_margin="2dip"
5-
android:layout_width="fill_parent"
5+
android:layout_width="fill_parent"
66
android:layout_height="wrap_content"
7+
android:background="#60808080"
78
>
8-
<TextView
9-
android:id="@+id/name"
9+
<TextView
10+
android:layout_margin="5dp"
11+
android:id="@+id/name"
1012
style="@style/TextAppearance.Small"
1113
android:singleLine="false"
1214
android:maxLines="3"
1315
android:layout_width="wrap_content"
1416
android:layout_height="wrap_content"/>
15-
<TextView
16-
android:id="@+id/value"
17+
<TextView
18+
android:layout_margin="5dp"
19+
android:id="@+id/value"
1720
style="@style/TextAppearance.Medium"
1821
android:singleLine="false"
1922
android:maxLines="3"

0 commit comments

Comments
 (0)