diff options
| author | Chris Wren <cwren@android.com> | 2012-05-11 09:28:08 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-05-11 09:28:08 -0700 |
| commit | 156c79289dec581536c0ee23ffaa355909827587 (patch) | |
| tree | 3da938566823e14461ee56b4e9b4f540c398487a | |
| parent | b23341e4c55667de6408f64206cb44c174d36121 (diff) | |
| parent | ca7b7d0566a4d98701067cff915a78b63908e6f5 (diff) | |
| download | frameworks_base-156c79289dec581536c0ee23ffaa355909827587.zip frameworks_base-156c79289dec581536c0ee23ffaa355909827587.tar.gz frameworks_base-156c79289dec581536c0ee23ffaa355909827587.tar.bz2 | |
Merge "Don't allow notificaitons to be larger than 4U, even with actions. Limit BigText template to a fixed number of lines. Optimize layout of BigText and Inbox for expansion." into jb-dev
| -rw-r--r-- | core/res/res/layout/notification_template_big_text.xml | 19 | ||||
| -rw-r--r-- | core/res/res/layout/notification_template_inbox.xml | 22 | ||||
| -rw-r--r-- | packages/SystemUI/res/values/dimens.xml | 5 |
3 files changed, 32 insertions, 14 deletions
diff --git a/core/res/res/layout/notification_template_big_text.xml b/core/res/res/layout/notification_template_big_text.xml index d0549cf..77a5f11 100644 --- a/core/res/res/layout/notification_template_big_text.xml +++ b/core/res/res/layout/notification_template_big_text.xml @@ -43,14 +43,16 @@ <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:minHeight="@dimen/notification_large_icon_height" android:orientation="vertical" - > + android:layout_weight="1" + > <LinearLayout android:id="@+id/line1" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" + android:layout_gravity="top" + android:layout_weight="0" > <TextView android:id="@+id/title" android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title" @@ -87,24 +89,29 @@ android:singleLine="true" android:fadingEdge="horizontal" android:ellipsize="marquee" + android:layout_weight="0" android:visibility="gone" /> <TextView android:id="@+id/big_text" android:textAppearance="@style/TextAppearance.StatusBar.EventContent" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="0dp" android:layout_marginTop="2dp" android:layout_marginBottom="2dp" android:singleLine="false" android:visibility="gone" + android:maxLines="8" + android:ellipsize="end" + android:layout_weight="1" /> </LinearLayout> <LinearLayout android:id="@+id/actions" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="0dp" android:orientation="vertical" android:visibility="gone" + android:layout_weight="1" > <!-- actions will be added here --> </LinearLayout> @@ -116,13 +123,14 @@ android:ellipsize="marquee" android:fadingEdge="horizontal" android:visibility="gone" - android:layout_weight="1" + android:layout_weight="0" /> <LinearLayout android:id="@+id/line3" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" + android:layout_weight="1" > <TextView android:id="@+id/text" android:textAppearance="@style/TextAppearance.StatusBar.EventContent" @@ -160,6 +168,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone" + android:layout_weight="0" style="?android:attr/progressBarStyleHorizontal" /> </LinearLayout> diff --git a/core/res/res/layout/notification_template_inbox.xml b/core/res/res/layout/notification_template_inbox.xml index 7b63ac5..05ec1d8 100644 --- a/core/res/res/layout/notification_template_inbox.xml +++ b/core/res/res/layout/notification_template_inbox.xml @@ -47,6 +47,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" + android:layout_weight="0" > <TextView android:id="@+id/title" android:textAppearance="@style/TextAppearance.StatusBar.EventContent.Title" @@ -84,62 +85,69 @@ android:fadingEdge="horizontal" android:ellipsize="marquee" android:visibility="gone" + android:layout_weight="0" /> <TextView android:id="@+id/inbox_text0" android:textAppearance="@style/TextAppearance.StatusBar.EventContent" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="0dp" android:singleLine="true" android:ellipsize="end" android:paddingTop="4dp" android:paddingBottom="4dp" android:visibility="gone" + android:layout_weight="1" /> <TextView android:id="@+id/inbox_text1" android:textAppearance="@style/TextAppearance.StatusBar.EventContent" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="0dp" android:singleLine="true" android:ellipsize="end" android:paddingTop="4dp" android:paddingBottom="4dp" android:visibility="gone" + android:layout_weight="1" /> <TextView android:id="@+id/inbox_text2" android:textAppearance="@style/TextAppearance.StatusBar.EventContent" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="0dp" android:singleLine="true" android:ellipsize="end" android:paddingTop="4dp" android:paddingBottom="4dp" android:visibility="gone" + android:layout_weight="1" /> <TextView android:id="@+id/inbox_text3" android:textAppearance="@style/TextAppearance.StatusBar.EventContent" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="0dp" android:singleLine="true" android:ellipsize="end" android:paddingTop="4dp" android:paddingBottom="4dp" android:visibility="gone" + android:layout_weight="1" /> <TextView android:id="@+id/inbox_text4" android:textAppearance="@style/TextAppearance.StatusBar.EventContent" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="0dp" android:singleLine="true" android:ellipsize="end" android:paddingTop="4dp" android:paddingBottom="4dp" android:visibility="gone" + android:layout_weight="1" /> <LinearLayout android:id="@+id/actions" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" + android:layout_weight="0" android:visibility="gone" > <!-- actions will be added here --> @@ -152,13 +160,14 @@ android:ellipsize="marquee" android:fadingEdge="horizontal" android:visibility="gone" - android:layout_weight="1" + android:layout_weight="0" /> <LinearLayout android:id="@+id/line3" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" + android:layout_weight="0" > <TextView android:id="@+id/text" android:textAppearance="@style/TextAppearance.StatusBar.EventContent" @@ -196,6 +205,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone" + android:layout_weight="0" style="?android:attr/progressBarStyleHorizontal" /> </LinearLayout> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 2ff0e00..21e5fd7 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -58,9 +58,8 @@ <!-- Height of a small notification in the status bar plus glow, padding, etc --> <dimen name="notification_min_height">72dp</dimen> - <!-- Height of a small notification in the status bar --> - <!-- TODO: change this back to 256dp once we deal with actions. --> - <dimen name="notification_max_height">320dp</dimen> + <!-- Height of a large notification in the status bar --> + <dimen name="notification_max_height">256dp</dimen> <!-- size at which Notification icons will be drawn in the status bar --> <dimen name="status_bar_icon_drawing_size">18dip</dimen> |
