OSDN Git Service

Eleven: Move dividers into the list item to allow more flexibility
[android-x86/packages-apps-Eleven.git] / res / layout / list_item_top_tracks.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <!--
3   Copyright (C) 2012 Andrew Neal
4  
5   Licensed under the Apache License, Version 2.0 (the "License");
6   you may not use this file except in compliance with the License.
7   You may obtain a copy of the License at
8  
9        http://www.apache.org/licenses/LICENSE-2.0
10  
11   Unless required by applicable law or agreed to in writing, software
12   distributed under the License is distributed on an "AS IS" BASIS,
13   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   See the License for the specific language governing permissions and
15   limitations under the License.
16 -->
17 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
18     xmlns:tools="http://schemas.android.com/tools"
19     android:layout_width="match_parent"
20     android:layout_height="@dimen/item_normal_height"
21     android:minHeight="@dimen/item_normal_height"
22     tools:ignore="ContentDescription">
23     <RelativeLayout
24         android:layout_width="match_parent"
25         android:layout_height="match_parent"
26         android:gravity="center_vertical"
27         android:paddingTop="@dimen/list_item_padding_top"
28         android:paddingBottom="@dimen/list_item_padding_bottom"
29         android:paddingLeft="@dimen/list_preferred_item_padding"
30         android:paddingRight="@dimen/list_preferred_item_padding" >
31
32         <FrameLayout
33             android:id="@+id/position_contanier"
34             android:layout_width="wrap_content"
35             android:layout_height="wrap_content"
36             android:layout_centerVertical="true"
37             android:layout_alignParentLeft="true" >
38             <ImageView
39                 android:layout_width="@dimen/list_item_top_track_image_size"
40                 android:layout_height="@dimen/list_item_top_track_image_size"
41                 android:layout_gravity="center"
42                 android:scaleType="centerCrop"
43                 android:src="@drawable/gray_circle" />
44             <TextView
45                 android:id="@+id/position_number"
46                 android:layout_width="wrap_content"
47                 android:layout_height="wrap_content"
48                 android:layout_gravity="center"
49                 android:textStyle="bold"
50                 android:textSize="@dimen/text_size_small"
51                 android:textColor="@color/white" />
52         </FrameLayout>
53
54
55         <RelativeLayout
56             android:layout_width="match_parent"
57             android:layout_height="@dimen/list_item_image_height"
58             android:layout_toRightOf="@+id/position_contanier"
59             android:layout_toLeftOf="@+id/line_one_right"
60             android:gravity="center_vertical"
61             android:minHeight="@dimen/item_normal_height"
62             android:paddingLeft="@dimen/list_preferred_item_padding" >
63
64             <TextView
65                 android:id="@+id/line_one"
66                 style="@style/ListItemMainText.Single"
67                 android:layout_width="match_parent"
68                 android:layout_height="wrap_content" />
69
70             <TextView
71                 android:id="@+id/line_two"
72                 style="@style/ListItemSecondaryText.Single"
73                 android:layout_width="match_parent"
74                 android:layout_height="wrap_content"
75                 android:layout_below="@+id/line_one" />
76         </RelativeLayout>
77
78         <TextView
79             android:id="@+id/line_one_right"
80             style="@style/ListItemSecondaryText.Single"
81             android:layout_width="wrap_content"
82             android:layout_height="wrap_content"
83             android:layout_alignParentRight="true"
84             android:layout_centerVertical="true" />
85     </RelativeLayout>
86
87     <ImageView
88         android:id="@+id/divider"
89         android:layout_width="fill_parent"
90         android:layout_height="wrap_content"
91         android:layout_alignParentBottom="true"
92         android:src="@drawable/inset_list_divider" />
93 </RelativeLayout>