diff options
author | Daniel Sandler <dsandler@google.com> | 2010-12-06 11:15:45 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-12-06 11:15:45 -0800 |
commit | 2ee1856f814c4246f1b56db21693432442a70d94 (patch) | |
tree | 573e144cc690428208313daceb6b959ac2084563 /packages | |
parent | d4aa7d22f8550ccbfb4dc3d669f015b782296e4b (diff) | |
parent | 3e8f5a2c1beb4b918856063880e05125946e4347 (diff) | |
download | frameworks_base-2ee1856f814c4246f1b56db21693432442a70d94.zip frameworks_base-2ee1856f814c4246f1b56db21693432442a70d94.tar.gz frameworks_base-2ee1856f814c4246f1b56db21693432442a70d94.tar.bz2 |
Merge "Hide navigation buttons and clock on lockscreen."
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/res/layout-xlarge/status_bar.xml | 17 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java | 18 |
2 files changed, 34 insertions, 1 deletions
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar.xml b/packages/SystemUI/res/layout-xlarge/status_bar.xml index 666bfdc..cd67d1a 100644 --- a/packages/SystemUI/res/layout-xlarge/status_bar.xml +++ b/packages/SystemUI/res/layout-xlarge/status_bar.xml @@ -76,8 +76,23 @@ android:textColor="#2e2e2e" /> </com.android.systemui.statusbar.tablet.HoloClock> + <TextView + android:id="@+id/network_text" + android:layout_width="wrap_content" + android:layout_height="match_parent" + android:layout_marginTop="12dp" + android:layout_marginRight="6dip" + android:layout_marginLeft="6dip" + android:gravity="center" + android:singleLine="true" + android:visibility="gone" + android:textSize="14dip" + android:textColor="#606060" + /> + <LinearLayout - android:layout_width="48dip" + android:id="@+id/signal_battery_cluster" + android:layout_width="wrap_content" android:layout_height="match_parent" android:orientation="horizontal" android:gravity="center" diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java index 563b8ef..b0f6a18 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -165,6 +165,8 @@ public class TabletStatusBar extends StatusBar { (ImageView)mNotificationPanel.findViewById(R.id.network_type)); mNetworkController.addLabelView( (TextView)mNotificationPanel.findViewById(R.id.network_text)); + mNetworkController.addLabelView( + (TextView)mBarContents.findViewById(R.id.network_text)); mStatusBarView.setIgnoreChildren(0, mNotificationTrigger, mNotificationPanel); @@ -579,12 +581,28 @@ public class TabletStatusBar extends StatusBar { setAreThereNotifications(); } + public void showClock(boolean show) { + View clock = mBarContents.findViewById(R.id.clock); + View network_text = mBarContents.findViewById(R.id.network_text); + if (clock != null) { + clock.setVisibility(show ? View.VISIBLE : View.GONE); + } + if (network_text != null) { + network_text.setVisibility((!show) ? View.VISIBLE : View.GONE); + } + } + public void disable(int state) { int old = mDisabled; int diff = state ^ old; mDisabled = state; // act accordingly + if ((diff & StatusBarManager.DISABLE_CLOCK) != 0) { + boolean show = (state & StatusBarManager.DISABLE_CLOCK) == 0; + Slog.d(TAG, "DISABLE_CLOCK: " + (show ? "no" : "yes")); + showClock(show); + } if ((diff & StatusBarManager.DISABLE_EXPAND) != 0) { if ((state & StatusBarManager.DISABLE_EXPAND) != 0) { Slog.d(TAG, "DISABLE_EXPAND: yes"); |