summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2012-05-08 20:06:13 -0700
committerMichael Jurka <mikejurka@google.com>2012-05-09 14:43:33 -0700
commit8b2e37e5a0e10d234ffe6815e9a462283cad3d78 (patch)
treed2121b0252bb475a82bfa0fb5fb25a7b4eca3813
parent6367b1669d41f9fe7cd7abe5e05296edecd50f8e (diff)
downloadframeworks_base-8b2e37e5a0e10d234ffe6815e9a462283cad3d78.zip
frameworks_base-8b2e37e5a0e10d234ffe6815e9a462283cad3d78.tar.gz
frameworks_base-8b2e37e5a0e10d234ffe6815e9a462283cad3d78.tar.bz2
Improve recents on sw600dp devices
Bug: 6405276 - Make thumbnails bigger - Make thumbnails higher-res - In landscape, start the thumbnails on the right - Fix issue where you'd sometimes see "No recent apps" flash before the thumbnails appeared - Fix issue where the first time recents was run you'd see double the amount of thumbnails Change-Id: I878caf57a955cb6a0c1b4f0a72b5b993609047f2
-rw-r--r--core/res/res/values-sw600dp/dimens.xml4
-rw-r--r--core/res/res/values/dimens.xml4
-rw-r--r--packages/SystemUI/res/layout-land/status_bar_recent_panel.xml2
-rw-r--r--packages/SystemUI/res/values-sw600dp-land/values-land-sw600dp/dimens.xml21
-rw-r--r--packages/SystemUI/res/values-sw600dp-port/dimens.xml21
-rw-r--r--packages/SystemUI/res/values-sw600dp/dimens.xml3
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java36
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java3
8 files changed, 74 insertions, 20 deletions
diff --git a/core/res/res/values-sw600dp/dimens.xml b/core/res/res/values-sw600dp/dimens.xml
index 61136e3..c5727ea 100644
--- a/core/res/res/values-sw600dp/dimens.xml
+++ b/core/res/res/values-sw600dp/dimens.xml
@@ -18,6 +18,10 @@
*/
-->
<resources>
+ <!-- The width that is used when creating thumbnails of applications. -->
+ <dimen name="thumbnail_width">200dp</dimen>
+ <!-- The height that is used when creating thumbnails of applications. -->
+ <dimen name="thumbnail_height">177dp</dimen>
<!-- The maximum number of action buttons that should be permitted within
an action bar/action mode. This will be used to determine how many
showAsAction="ifRoom" items can fit. "always" items can override this. -->
diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml
index f812822..734151b 100644
--- a/core/res/res/values/dimens.xml
+++ b/core/res/res/values/dimens.xml
@@ -19,9 +19,9 @@
-->
<resources>
<!-- The width that is used when creating thumbnails of applications. -->
- <dimen name="thumbnail_width">120dp</dimen>
+ <dimen name="thumbnail_width">164dp</dimen>
<!-- The height that is used when creating thumbnails of applications. -->
- <dimen name="thumbnail_height">120dp</dimen>
+ <dimen name="thumbnail_height">145dp</dimen>
<!-- The standard size (both width and height) of an application icon that
will be displayed in the app launcher and elsewhere. -->
<dimen name="app_icon_size">48dip</dimen>
diff --git a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
index fcdd56c..ec2abe0 100644
--- a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
+++ b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
@@ -45,7 +45,7 @@
android:fadingEdge="horizontal"
android:scrollbars="none"
android:fadingEdgeLength="@dimen/status_bar_recents_scroll_fading_edge_length"
- android:layout_gravity="bottom|left"
+ android:layout_gravity="bottom|right"
android:orientation="horizontal"
android:clipToPadding="false"
android:clipChildren="false">
diff --git a/packages/SystemUI/res/values-sw600dp-land/values-land-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp-land/values-land-sw600dp/dimens.xml
new file mode 100644
index 0000000..e440de1
--- /dev/null
+++ b/packages/SystemUI/res/values-sw600dp-land/values-land-sw600dp/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2012, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+-->
+<resources>
+ <!-- Recent Applications parameters -->
+ <dimen name="status_bar_recents_app_label_width">190dip</dimen>
+</resources>
diff --git a/packages/SystemUI/res/values-sw600dp-port/dimens.xml b/packages/SystemUI/res/values-sw600dp-port/dimens.xml
new file mode 100644
index 0000000..7dc91d1
--- /dev/null
+++ b/packages/SystemUI/res/values-sw600dp-port/dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (c) 2012, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+*/
+-->
+<resources>
+ <!-- Recent Applications parameters -->
+ <dimen name="status_bar_recents_app_label_width">140dip</dimen>
+</resources>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 2ff62a5..2cb99ff 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -39,4 +39,7 @@
<!-- Extra space above the clock in the panel; on this device, zero -->
<dimen name="notification_panel_header_padding_top">0dp</dimen>
+ <!-- Size of application thumbnail -->
+ <dimen name="status_bar_recents_thumbnail_width">200dp</dimen>
+ <dimen name="status_bar_recents_thumbnail_height">177dp</dimen>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
index e865b9c..995ee43 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
@@ -91,6 +91,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
private int mThumbnailWidth;
private boolean mFitThumbnailToXY;
private int mRecentItemLayoutId;
+ private boolean mFirstScreenful = true;
public static interface OnRecentsPanelVisibilityChangedListener {
public void onRecentsPanelVisibilityChanged(boolean visible);
@@ -206,6 +207,22 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
}
}
+ public RecentsPanelView(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public RecentsPanelView(Context context, AttributeSet attrs, int defStyle) {
+ super(context, attrs, defStyle);
+ mContext = context;
+ updateValuesFromResources();
+
+ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.RecentsPanelView,
+ defStyle, 0);
+
+ mRecentItemLayoutId = a.getResourceId(R.styleable.RecentsPanelView_recentItemLayout, 0);
+ a.recycle();
+ }
+
public int numItemsInOneScreenful() {
if (mRecentsContainer instanceof RecentsScrollView){
RecentsScrollView scrollView
@@ -297,6 +314,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
mRecentTasksDirty = true;
mWaitingToShow = false;
mReadyToShow = false;
+ mRecentsNoApps.setVisibility(View.INVISIBLE);
}
if (animate) {
if (mShowing != show) {
@@ -415,21 +433,6 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
super.setVisibility(visibility);
}
- public RecentsPanelView(Context context, AttributeSet attrs) {
- this(context, attrs, 0);
- }
-
- public RecentsPanelView(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
- mContext = context;
- updateValuesFromResources();
-
- TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.RecentsPanelView,
- defStyle, 0);
-
- mRecentItemLayoutId = a.getResourceId(R.styleable.RecentsPanelView_recentItemLayout, 0);
- }
-
public void updateValuesFromResources() {
final Resources res = mContext.getResources();
mThumbnailWidth = Math.round(res.getDimension(R.dimen.status_bar_recents_thumbnail_width));
@@ -572,7 +575,7 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
showIfReady();
}
- // additional optimization when we have sofware system buttons - start loading the recent
+ // additional optimization when we have software system buttons - start loading the recent
// tasks on touch down
@Override
public boolean onTouch(View v, MotionEvent ev) {
@@ -631,7 +634,6 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
}
}
- boolean mFirstScreenful;
public void onTasksLoaded(ArrayList<TaskDescription> tasks) {
if (!mFirstScreenful && tasks.size() == 0) {
return;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index db7969e..f5f2e28 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -467,6 +467,9 @@ public class PhoneStatusBar extends BaseStatusBar {
// .03, the item disappears entirely (as if alpha = 0) and that discontinuity looks
// a bit jarring
mRecentsPanel.setMinSwipeAlpha(0.03f);
+ if (mNavigationBarView != null) {
+ mNavigationBarView.getRecentsButton().setOnTouchListener(mRecentsPanel);
+ }
}
@Override