|
1 | 1 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
2 | | - xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" |
3 | | - android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin" |
4 | | - android:paddingRight="@dimen/activity_horizontal_margin" |
5 | | - android:paddingTop="@dimen/activity_vertical_margin" |
6 | | - android:paddingBottom="@dimen/activity_vertical_margin" |
7 | | - tools:context="com.jayfeng.lesscode.app.activity.ResourceActivity"> |
8 | | - |
9 | | - <TextView android:text="@string/hello_world" android:layout_width="wrap_content" |
10 | | - android:layout_height="wrap_content" /> |
| 2 | + android:layout_width="match_parent" |
| 3 | + android:layout_height="match_parent"> |
| 4 | + |
| 5 | + <!--这个group_container的background一定要设置, |
| 6 | + 而且要和list_item_bg的list_item_normal一致, |
| 7 | + 否则效果会不正确。 --> |
| 8 | + <LinearLayout |
| 9 | + android:id="@+id/group_container" |
| 10 | + android:layout_width="wrap_content" |
| 11 | + android:layout_height="wrap_content" |
| 12 | + android:layout_alignParentTop="true" |
| 13 | + android:layout_marginTop="48dp" |
| 14 | + android:background="#fff" |
| 15 | + android:orientation="vertical"> |
| 16 | + |
| 17 | + <RelativeLayout |
| 18 | + android:id="@+id/account_container" |
| 19 | + android:layout_width="match_parent" |
| 20 | + android:layout_height="wrap_content" |
| 21 | + android:background="@drawable/list_item_bg" |
| 22 | + android:clickable="true"> |
| 23 | + |
| 24 | + <TextView |
| 25 | + android:id="@+id/account_title" |
| 26 | + android:layout_width="wrap_content" |
| 27 | + android:layout_height="wrap_content" |
| 28 | + android:layout_alignParentLeft="true" |
| 29 | + android:layout_centerVertical="true" |
| 30 | + android:layout_margin="16dp" |
| 31 | + android:text="First Item" |
| 32 | + android:textColor="#f00" |
| 33 | + android:textSize="16sp" /> |
| 34 | + </RelativeLayout> |
| 35 | + |
| 36 | + <View |
| 37 | + android:layout_width="match_parent" |
| 38 | + android:layout_height="1px" |
| 39 | + android:layout_marginLeft="16dp" |
| 40 | + android:background="#f00" /> |
| 41 | + |
| 42 | + <RelativeLayout |
| 43 | + android:id="@+id/phone_container" |
| 44 | + android:layout_width="match_parent" |
| 45 | + android:layout_height="wrap_content" |
| 46 | + android:background="@drawable/list_item_bg" |
| 47 | + android:clickable="true"> |
| 48 | + |
| 49 | + <TextView |
| 50 | + android:id="@+id/phone_title" |
| 51 | + android:layout_width="wrap_content" |
| 52 | + android:layout_height="wrap_content" |
| 53 | + android:layout_alignParentLeft="true" |
| 54 | + android:layout_centerVertical="true" |
| 55 | + android:layout_margin="16dp" |
| 56 | + android:text="Second Item" |
| 57 | + android:textColor="#f00" |
| 58 | + android:textSize="16sp" /> |
| 59 | + |
| 60 | + </RelativeLayout> |
| 61 | + </LinearLayout> |
11 | 62 |
|
12 | 63 | </RelativeLayout> |
0 commit comments