summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Daniel Sandler <dsandler@google.com> 2010-07-15 16:35:29 -0400
committer Daniel Sandler <dsandler@google.com> 2010-07-15 16:35:29 -0400
commit3a04ef0adb221d5e0fc21fe86177eaf5c02490b4 (patch)
tree14bd68cce464c917a417bf9baef0725b0ad45ae4
parentce38d0c2e5bab454d9cb9f9ab6e99483b4754c87 (diff)
Move more of the system bar to the layout.
Change-Id: I2fd67e687b8048a48e2c6531ac896d33815ce615
-rw-r--r--packages/SystemUI/res/layout-xlarge/status_bar.xml28
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationIconArea.java34
2 files changed, 37 insertions, 25 deletions
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar.xml b/packages/SystemUI/res/layout-xlarge/status_bar.xml
index 1e93bee0ac1a..d8a373e9a351 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar.xml
@@ -28,7 +28,7 @@
android:descendantFocusability="afterDescendants"
>
- <RelativeLayout android:id="@+id/icons"
+ <RelativeLayout android:id="@+id/notifications"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
@@ -52,9 +52,31 @@
android:paddingLeft="6dip"
android:gravity="center_vertical"
android:orientation="horizontal"
- />
+ >
+ <view
+ class="com.android.systemui.statusbar.tablet.NotificationIconArea$MoreView"
+ android:id="@+id/more"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:src="@drawable/stat_notify_more"
+ />
+ <view
+ class="com.android.systemui.statusbar.tablet.NotificationIconArea$IconLayout"
+ android:id="@+id/icons"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ />
+ <view
+ class="com.android.systemui.statusbar.tablet.NotificationIconArea$DraggerView"
+ android:id="@+id/handle"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:src="@drawable/notification_dragger"
+ />
+
+ </com.android.systemui.statusbar.tablet.NotificationIconArea>
- <RelativeLayout android:id="@+id/icons"
+ <RelativeLayout android:id="@+id/systemInfo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationIconArea.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationIconArea.java
index 7835d4262f71..370ee57a4c45 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationIconArea.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationIconArea.java
@@ -38,36 +38,26 @@ public class NotificationIconArea extends LinearLayout {
public NotificationIconArea(Context context, AttributeSet attrs) {
super(context, attrs);
- mMoreView = new MoreView(context);
- addView(mMoreView, new LinearLayout.LayoutParams(
- LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
-
- mIconLayout = new IconLayout(context);
- addView(mIconLayout, new LinearLayout.LayoutParams(
- LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
-
- mDraggerView = new DraggerView(context);
- addView(mDraggerView, new LinearLayout.LayoutParams(
- LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
+ mMoreView = (MoreView) findViewById(R.id.more);
+ mIconLayout = (IconLayout)findViewById(R.id.icons);
+ mDraggerView = (DraggerView) findViewById(R.id.handle);
}
- class MoreView extends ImageView {
- public MoreView(Context context) {
- super(context);
- setImageResource(R.drawable.stat_notify_more);
+ static class MoreView extends ImageView {
+ public MoreView(Context context, AttributeSet attrs) {
+ super(context, attrs);
}
}
- class IconLayout extends LinearLayout {
- public IconLayout(Context context) {
- super(context);
+ static class IconLayout extends LinearLayout {
+ public IconLayout(Context context, AttributeSet attrs) {
+ super(context, attrs);
}
}
- class DraggerView extends ImageView {
- public DraggerView(Context context) {
- super(context);
- setImageResource(R.drawable.notification_dragger);
+ static class DraggerView extends ImageView {
+ public DraggerView(Context context, AttributeSet attrs) {
+ super(context, attrs);
}
}
}