OSDN Git Service

Improve app widget layouts.
[android-x86/packages-apps-Eleven.git] / res / layout / app_widget_large_alternate.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 <GridLayout 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/app_widget_large_min_height"
21     android:background="@drawable/appwidget_bg"
22     android:columnCount="2"
23     android:rowCount="3"
24     tools:ignore="ContentDescription" >
25
26     <ImageView
27         android:id="@+id/app_widget_large_alternate_image"
28         android:layout_width="@dimen/app_widget_large_alternate_artwork_size"
29         android:layout_height="@dimen/app_widget_large_alternate_artwork_size"
30         android:layout_rowSpan="2"
31         android:background="@drawable/default_artwork"
32         android:scaleType="fitXY" />
33
34     <LinearLayout
35         android:id="@+id/app_widget_large_alternate_info_container"
36         android:layout_width="0dp"
37         android:layout_gravity="center_vertical|fill_horizontal"
38         android:orientation="vertical"
39         android:paddingLeft="@dimen/notification_info_container_padding_left" >
40
41         <TextView
42             android:id="@+id/app_widget_large_alternate_line_one"
43             style="@style/NotificationText"
44             android:textColor="@color/white"
45             android:textSize="@dimen/text_size_medium"
46             android:textStyle="bold" />
47
48         <TextView
49             android:id="@+id/app_widget_large_alternate_line_two"
50             style="@style/NotificationText"
51             android:textColor="@color/transparent_white"
52             android:textSize="@dimen/text_size_small" />
53
54         <TextView
55             android:id="@+id/app_widget_large_alternate_line_three"
56             style="@style/NotificationText"
57             android:textColor="@color/transparent_white"
58             android:textSize="@dimen/text_size_small" />
59
60     </LinearLayout>
61
62     <ImageView
63         android:layout_width="0dp"
64         android:layout_gravity="fill_horizontal"
65         android:background="?android:dividerHorizontal" />
66
67     <LinearLayout
68         android:id="@+id/app_widget_large_alternate_buttons"
69         android:layout_columnSpan="2"
70         android:layout_width="0dp"
71         android:layout_gravity="fill_horizontal"
72         android:layout_marginBottom="@dimen/app_widget_bottom_margin"
73         android:divider="?android:listDivider"
74         android:dividerPadding="@dimen/notification_expanded_buttons_divider_padding"
75         android:gravity="center_vertical"
76         android:orientation="horizontal"
77         android:showDividers="middle" >
78
79         <ImageButton
80             android:id="@+id/app_widget_large_alternate_shuffle"
81             android:layout_width="0dp"
82             android:layout_height="@dimen/notification_expanded_button_height"
83             android:layout_weight="1"
84             android:background="?android:selectableItemBackground"
85             android:contentDescription="@string/accessibility_shuffle"
86             android:padding="@dimen/notification_expanded_button_padding"
87             android:scaleType="fitCenter"
88             android:src="@drawable/btn_playback_shuffle" />
89
90         <ImageButton
91             android:id="@+id/app_widget_large_alternate_previous"
92             android:layout_width="0dp"
93             android:layout_height="@dimen/notification_expanded_button_height"
94             android:layout_weight="1"
95             android:background="?android:selectableItemBackground"
96             android:contentDescription="@string/accessibility_prev"
97             android:padding="@dimen/notification_expanded_button_padding"
98             android:scaleType="fitCenter"
99             android:src="@drawable/btn_playback_previous" />
100
101         <ImageButton
102             android:id="@+id/app_widget_large_alternate_play"
103             android:layout_width="0dp"
104             android:layout_height="@dimen/notification_expanded_button_height"
105             android:layout_weight="1"
106             android:background="?android:selectableItemBackground"
107             android:padding="@dimen/notification_expanded_button_padding"
108             android:scaleType="fitCenter"
109             android:src="@drawable/btn_playback_pause" />
110
111         <ImageButton
112             android:id="@+id/app_widget_large_alternate_next"
113             android:layout_width="0dp"
114             android:layout_height="@dimen/notification_expanded_button_height"
115             android:layout_weight="1"
116             android:background="?android:selectableItemBackground"
117             android:contentDescription="@string/accessibility_next"
118             android:padding="@dimen/notification_expanded_button_padding"
119             android:scaleType="fitCenter"
120             android:src="@drawable/btn_playback_next" />
121
122         <ImageButton
123             android:id="@+id/app_widget_large_alternate_repeat"
124             android:layout_width="0dp"
125             android:layout_height="@dimen/notification_expanded_button_height"
126             android:layout_weight="1"
127             android:background="?android:selectableItemBackground"
128             android:contentDescription="@string/accessibility_repeat"
129             android:padding="@dimen/notification_expanded_button_padding"
130             android:scaleType="fitCenter"
131             android:src="@drawable/btn_playback_repeat" />
132     </LinearLayout>
133
134 </GridLayout>