summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2012-06-11 21:06:13 -0700
committerJim Miller <jaggies@google.com>2012-06-12 19:16:08 -0700
commit955a016922ea49f154d190b054a202559b41a4d3 (patch)
tree2031ecb839a21630269b8b93cd3b8ca9048aa469 /packages/SystemUI
parent1c9581023ced89a209fca9c4e40305f8e0859732 (diff)
downloadframeworks_base-955a016922ea49f154d190b054a202559b41a4d3.zip
frameworks_base-955a016922ea49f154d190b054a202559b41a4d3.tar.gz
frameworks_base-955a016922ea49f154d190b054a202559b41a4d3.tar.bz2
Fix 6613962: Update keyguard to use new GlowPadView UX design.
Change-Id: I4f1ef3107e5550f7df9dcb412943a84b66432b7d
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/res/drawable-hdpi/navbar_search_bg_scrim.9.pngbin21892 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/navbar_search_bg_scrim.9.pngbin11004 -> 0 bytes
-rw-r--r--packages/SystemUI/res/drawable-xhdpi/navbar_search_bg_scrim.9.pngbin34907 -> 0 bytes
-rw-r--r--packages/SystemUI/res/layout-land/status_bar_search_panel.xml14
-rw-r--r--packages/SystemUI/res/layout-port/status_bar_search_panel.xml14
-rw-r--r--packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml13
-rw-r--r--packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml13
-rw-r--r--packages/SystemUI/res/values-sw600dp/dimens.xml3
-rw-r--r--packages/SystemUI/res/values/dimens.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/SearchPanelView.java27
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java1
11 files changed, 55 insertions, 33 deletions
diff --git a/packages/SystemUI/res/drawable-hdpi/navbar_search_bg_scrim.9.png b/packages/SystemUI/res/drawable-hdpi/navbar_search_bg_scrim.9.png
deleted file mode 100644
index 4c163a2..0000000
--- a/packages/SystemUI/res/drawable-hdpi/navbar_search_bg_scrim.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/navbar_search_bg_scrim.9.png b/packages/SystemUI/res/drawable-mdpi/navbar_search_bg_scrim.9.png
deleted file mode 100644
index 21c5abd..0000000
--- a/packages/SystemUI/res/drawable-mdpi/navbar_search_bg_scrim.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/navbar_search_bg_scrim.9.png b/packages/SystemUI/res/drawable-xhdpi/navbar_search_bg_scrim.9.png
deleted file mode 100644
index 7874c63..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/navbar_search_bg_scrim.9.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/layout-land/status_bar_search_panel.xml b/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
index ae81167..e6c0087 100644
--- a/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-land/status_bar_search_panel.xml
@@ -38,25 +38,29 @@
android:layout_height="match_parent"
android:layout_alignParentRight="true">
- <com.android.internal.widget.multiwaveview.MultiWaveView
- android:id="@+id/multi_wave_view"
+ <com.android.internal.widget.multiwaveview.GlowPadView
+ android:id="@+id/glow_pad_view"
android:orientation="vertical"
android:layout_width="@dimen/navbar_search_panel_height"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
- android:background="@drawable/navbar_search_bg_scrim"
android:gravity="left"
prvandroid:targetDrawables="@array/navbar_search_targets"
prvandroid:targetDescriptions="@array/navbar_search_target_descriptions"
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
prvandroid:handleDrawable="@drawable/navbar_search_handle"
- prvandroid:waveDrawable="@drawable/navbar_search_outerring"
+ prvandroid:outerRingDrawable="@drawable/navbar_search_outerring"
+ prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
+ prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
prvandroid:hitRadius="@dimen/navbar_search_hit_radius"
prvandroid:feedbackCount="0"
prvandroid:vibrationDuration="@integer/config_vibration_duration"
- prvandroid:alwaysTrackFinger="true"/>
+ prvandroid:alwaysTrackFinger="true"
+ prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
+ prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot"
+ />
</RelativeLayout>
diff --git a/packages/SystemUI/res/layout-port/status_bar_search_panel.xml b/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
index 785d5dd..3828136 100644
--- a/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-port/status_bar_search_panel.xml
@@ -38,25 +38,29 @@
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
- <com.android.internal.widget.multiwaveview.MultiWaveView
- android:id="@+id/multi_wave_view"
+ <com.android.internal.widget.multiwaveview.GlowPadView
+ android:id="@+id/glow_pad_view"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="@dimen/navbar_search_panel_height"
android:layout_alignParentBottom="true"
- android:background="@drawable/navbar_search_bg_scrim"
android:gravity="top"
prvandroid:targetDrawables="@array/navbar_search_targets"
prvandroid:targetDescriptions="@array/navbar_search_target_descriptions"
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
prvandroid:handleDrawable="@drawable/navbar_search_handle"
- prvandroid:waveDrawable="@drawable/navbar_search_outerring"
+ prvandroid:outerRingDrawable="@drawable/navbar_search_outerring"
+ prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
+ prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
prvandroid:hitRadius="@dimen/navbar_search_hit_radius"
prvandroid:feedbackCount="0"
prvandroid:vibrationDuration="@integer/config_vibration_duration"
- prvandroid:alwaysTrackFinger="true"/>
+ prvandroid:alwaysTrackFinger="true"
+ prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
+ prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot"
+ />
</RelativeLayout>
diff --git a/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml b/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
index 74a15f2..c17f858 100644
--- a/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-sw600dp/status_bar_search_panel.xml
@@ -25,23 +25,26 @@
android:layout_height="match_parent"
android:layout_width="match_parent">
- <com.android.internal.widget.multiwaveview.MultiWaveView
- android:id="@+id/multi_wave_view"
+ <com.android.internal.widget.multiwaveview.GlowPadView
+ android:id="@+id/glow_pad_view"
android:layout_width="wrap_content"
android:layout_height="@dimen/navbar_search_panel_height"
android:layout_gravity="center_horizontal|bottom"
android:gravity="center_horizontal|top"
- android:background="@drawable/navbar_search_bg_scrim"
prvandroid:targetDrawables="@array/navbar_search_targets"
prvandroid:targetDescriptions="@array/navbar_search_target_descriptions"
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
prvandroid:handleDrawable="@drawable/navbar_search_handle"
- prvandroid:waveDrawable="@drawable/navbar_search_outerring"
+ prvandroid:outerRingDrawable="@drawable/navbar_search_outerring"
+ prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
+ prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
prvandroid:hitRadius="@dimen/navbar_search_hit_radius"
prvandroid:feedbackCount="0"
prvandroid:vibrationDuration="@integer/config_vibration_duration"
- prvandroid:alwaysTrackFinger="true"/>
+ prvandroid:alwaysTrackFinger="true"
+ prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
+ prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot"/>
</com.android.systemui.SearchPanelView>
diff --git a/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml b/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
index 2a97307..100f81d 100644
--- a/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
+++ b/packages/SystemUI/res/layout-sw720dp/status_bar_search_panel.xml
@@ -25,24 +25,27 @@
android:layout_height="match_parent"
android:layout_width="match_parent">
- <com.android.internal.widget.multiwaveview.MultiWaveView
- android:id="@+id/multi_wave_view"
+ <com.android.internal.widget.multiwaveview.GlowPadView
+ android:id="@+id/glow_pad_view"
android:layout_width="wrap_content"
android:layout_height="@dimen/navbar_search_panel_height"
android:layout_gravity="left|bottom"
android:gravity="top|right"
android:layout_marginLeft="-150dip"
- android:background="@drawable/navbar_search_bg_scrim"
prvandroid:targetDrawables="@array/navbar_search_targets"
prvandroid:targetDescriptions="@array/navbar_search_target_descriptions"
prvandroid:directionDescriptions="@array/navbar_search_direction_descriptions"
prvandroid:handleDrawable="@drawable/navbar_search_handle"
- prvandroid:waveDrawable="@drawable/navbar_search_outerring"
+ prvandroid:outerRingDrawable="@drawable/navbar_search_outerring"
+ prvandroid:outerRadius="@dimen/navbar_search_outerring_radius"
+ prvandroid:innerRadius="@*android:dimen/glowpadview_inner_radius"
prvandroid:snapMargin="@dimen/navbar_search_snap_margin"
prvandroid:hitRadius="@dimen/navbar_search_hit_radius"
prvandroid:feedbackCount="0"
prvandroid:vibrationDuration="@integer/config_vibration_duration"
- prvandroid:alwaysTrackFinger="true"/>
+ prvandroid:alwaysTrackFinger="true"
+ prvandroid:glowRadius="@*android:dimen/glowpadview_glow_radius"
+ prvandroid:pointDrawable="@*android:drawable/ic_lockscreen_glowdot"/>
</com.android.systemui.SearchPanelView>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 1bf59b0..2b5248f 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -30,6 +30,9 @@
<!-- Diameter of outer shape drawable shown in navbar search-->
<dimen name="navbar_search_outerring_diameter">430dip</dimen>
+ <!-- Diameter of outer shape drawable shown in navbar search. Should be 1/2 of above value. -->
+ <dimen name="navbar_search_outerring_radius">215dip</dimen>
+
<!-- Height of search panel including navigation bar height -->
<dimen name="navbar_search_panel_height">280dip</dimen>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index f40ffd4..c88ae2a 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -119,6 +119,9 @@
<!-- Diameter of outer shape drawable shown in navbar search-->
<dimen name="navbar_search_outerring_diameter">340dp</dimen>
+ <!-- Diameter of outer shape drawable shown in navbar search. Should be 1/2 of above value -->
+ <dimen name="navbar_search_outerring_radius">170dp</dimen>
+
<!-- Threshold for swipe-up gesture to activate search dialog -->
<dimen name="navbar_search_up_threshhold">40dip</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/SearchPanelView.java b/packages/SystemUI/src/com/android/systemui/SearchPanelView.java
index 8b8a814..923bcba 100644
--- a/packages/SystemUI/src/com/android/systemui/SearchPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/SearchPanelView.java
@@ -35,8 +35,8 @@ import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnPreDrawListener;
import android.widget.FrameLayout;
-import com.android.internal.widget.multiwaveview.MultiWaveView;
-import com.android.internal.widget.multiwaveview.MultiWaveView.OnTriggerListener;
+import com.android.internal.widget.multiwaveview.GlowPadView;
+import com.android.internal.widget.multiwaveview.GlowPadView.OnTriggerListener;
import com.android.systemui.R;
import com.android.systemui.recent.StatusBarTouchProxy;
import com.android.systemui.statusbar.BaseStatusBar;
@@ -58,7 +58,7 @@ public class SearchPanelView extends FrameLayout implements
private boolean mShowing;
private View mSearchTargetsContainer;
- private MultiWaveView mMultiWaveView;
+ private GlowPadView mGlowPadView;
public SearchPanelView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
@@ -125,7 +125,7 @@ public class SearchPanelView extends FrameLayout implements
}
}
- class MultiWaveTriggerListener implements MultiWaveView.OnTriggerListener {
+ class GlowPadTriggerListener implements GlowPadView.OnTriggerListener {
boolean mWaitingForLaunch;
public void onGrabbed(View v, int handle) {
@@ -141,7 +141,7 @@ public class SearchPanelView extends FrameLayout implements
}
public void onTrigger(View v, final int target) {
- final int resId = mMultiWaveView.getResourceIdForTarget(target);
+ final int resId = mGlowPadView.getResourceIdForTarget(target);
switch (resId) {
case com.android.internal.R.drawable.ic_lockscreen_search:
mWaitingForLaunch = true;
@@ -154,13 +154,13 @@ public class SearchPanelView extends FrameLayout implements
public void onFinishFinalAnimation() {
}
}
- final MultiWaveTriggerListener mMultiWaveViewListener = new MultiWaveTriggerListener();
+ final GlowPadTriggerListener mGlowPadViewListener = new GlowPadTriggerListener();
@Override
public void onAnimationStarted() {
postDelayed(new Runnable() {
public void run() {
- mMultiWaveViewListener.mWaitingForLaunch = false;
+ mGlowPadViewListener.mWaitingForLaunch = false;
mBar.hideSearchPanel();
}
}, SEARCH_PANEL_HOLD_DURATION);
@@ -173,13 +173,13 @@ public class SearchPanelView extends FrameLayout implements
mSearchTargetsContainer = findViewById(R.id.search_panel_container);
mStatusBarTouchProxy = (StatusBarTouchProxy) findViewById(R.id.status_bar_touch_proxy);
// TODO: fetch views
- mMultiWaveView = (MultiWaveView) findViewById(R.id.multi_wave_view);
- mMultiWaveView.setOnTriggerListener(mMultiWaveViewListener);
+ mGlowPadView = (GlowPadView) findViewById(R.id.glow_pad_view);
+ mGlowPadView.setOnTriggerListener(mGlowPadViewListener);
SearchManager searchManager = getSearchManager();
if (searchManager != null) {
ComponentName component = searchManager.getGlobalSearchActivity();
if (component != null) {
- if (!mMultiWaveView.replaceTargetDrawablesIfPresent(component,
+ if (!mGlowPadView.replaceTargetDrawablesIfPresent(component,
ASSIST_ICON_METADATA_NAME,
com.android.internal.R.drawable.ic_lockscreen_search)) {
Slog.w(TAG, "Couldn't grab icon from component " + component);
@@ -214,7 +214,7 @@ public class SearchPanelView extends FrameLayout implements
private final OnPreDrawListener mPreDrawListener = new ViewTreeObserver.OnPreDrawListener() {
public boolean onPreDraw() {
getViewTreeObserver().removeOnPreDrawListener(this);
- mMultiWaveView.resumeAnimations();
+ mGlowPadView.resumeAnimations();
return false;
}
};
@@ -240,7 +240,8 @@ public class SearchPanelView extends FrameLayout implements
setVisibility(View.VISIBLE);
// Don't start the animation until we've created the layer, which is done
// right before we are drawn
- mMultiWaveView.suspendAnimations();
+ mGlowPadView.suspendAnimations();
+ mGlowPadView.ping();
getViewTreeObserver().addOnPreDrawListener(mPreDrawListener);
vibrate();
}
@@ -299,7 +300,7 @@ public class SearchPanelView extends FrameLayout implements
public void setStatusBarView(final View statusBarView) {
if (mStatusBarTouchProxy != null) {
mStatusBarTouchProxy.setStatusBar(statusBarView);
-// mMultiWaveView.setOnTouchListener(new OnTouchListener() {
+// mGlowPadView.setOnTouchListener(new OnTouchListener() {
// public boolean onTouch(View v, MotionEvent event) {
// return statusBarView.onTouchEvent(event);
// }
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 8df9b85..9b46af8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -404,6 +404,7 @@ public class TabletStatusBar extends BaseStatusBar implements
mRecentsPanel.updateValuesFromResources();
mShowSearchHoldoff = mContext.getResources().getInteger(
R.integer.config_show_search_delay);
+ updateSearchPanel();
}
protected void loadDimens() {