summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2010-12-16 13:22:34 -0800
committerJoe Onorato <joeo@google.com>2010-12-16 13:29:38 -0800
commit244e4159052230ce75a2152090a87518dd85e068 (patch)
tree1dc4351aefbce99283fc6ca4671a5816e66cba01 /packages
parent64b591de33c53c0d41228ab494295cbf92d18315 (diff)
downloadframeworks_base-244e4159052230ce75a2152090a87518dd85e068.zip
frameworks_base-244e4159052230ce75a2152090a87518dd85e068.tar.gz
frameworks_base-244e4159052230ce75a2152090a87518dd85e068.tar.bz2
Fix the SettingsView so it shows again.
Change-Id: Ie041fd12412ee1de9d1f90604b777db2fd00f550
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java26
2 files changed, 20 insertions, 9 deletions
diff --git a/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml b/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml
index 2272e34..d3fe2e7 100644
--- a/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml
+++ b/packages/SystemUI/res/layout-xlarge/status_bar_notification_panel.xml
@@ -163,7 +163,7 @@
android:orientation="vertical"
>
<ScrollView
- android:id="@+id/notificationScroller"
+ android:id="@+id/notification_scroller"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_weight="1"
@@ -184,6 +184,7 @@
</com.android.systemui.statusbar.tablet.NotificationLinearLayout>
</ScrollView>
<ImageView
+ android:id="@+id/notification_glow"
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_panel_bottom_offset"
android:layout_marginLeft="16dp"
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
index 82c1d17..c9fd9a9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/NotificationPanel.java
@@ -46,6 +46,7 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,
View mSettingsButton;
View mNotificationButton;
View mNotificationScroller;
+ View mNotificationGlow;
ViewGroup mContentFrame;
Rect mContentArea;
View mSettingsView;
@@ -85,7 +86,8 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,
mNotificationButton = (ImageView)findViewById(R.id.notification_button);
mNotificationButton.setOnClickListener(this);
- mNotificationScroller = findViewById(R.id.notificationScroller);
+ mNotificationScroller = findViewById(R.id.notification_scroller);
+ mNotificationGlow = findViewById(R.id.notification_glow);
mContentFrame = (ViewGroup)findViewById(R.id.content_frame);
}
@@ -218,10 +220,11 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,
void addSettingsView() {
LayoutInflater infl = LayoutInflater.from(getContext());
mSettingsView = infl.inflate(R.layout.status_bar_settings_view, mContentFrame, false);
- mContentFrame.addView(mSettingsView);
+ mContentFrame.addView(mSettingsView, mContentFrame.indexOfChild(mNotificationGlow));
}
private class Choreographer implements Animator.AnimatorListener {
+ boolean mVisible;
int mBgAlpha;
ValueAnimator mBgAnim;
int mPanelHeight;
@@ -245,14 +248,15 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,
}
void startAnimation(boolean visible) {
- if (mBgAnim == null) {
+ if (mBgAnim != null && mVisible != visible) {
+ mBgAnim.reverse();
+ mPositionAnim.reverse();
+ } else {
createAnimation(visible);
mBgAnim.start();
mPositionAnim.start();
- } else {
- mBgAnim.reverse();
- mPositionAnim.reverse();
}
+ mVisible = visible;
}
void jumpTo(boolean visible) {
@@ -289,14 +293,20 @@ public class NotificationPanel extends LinearLayout implements StatusBarPanel,
mGlowDrawable.setAlpha((int)(255 * alpha));
if (false) {
- Slog.d(TAG, "mPanelBottom=" + mPanelBottom + "translationY=" + translationY
+ Slog.d(TAG, "mPanelBottom=" + mPanelBottom + " translationY=" + translationY
+ " alpha=" + alpha + " glowY=" + glowY);
}
}
public void setPanelHeight(int h) {
mPanelHeight = h;
- setPanelBottom(mPanelBottom);
+ if (mPanelBottom == 0) {
+ // fully closed, no animation necessary
+ setPanelBottom(0);
+ } else {
+ // a little bit visible, schedule an animation
+ startAnimation(true);
+ }
}
public void onAnimationCancel(Animator animation) {