diff options
Diffstat (limited to 'packages')
8 files changed, 82 insertions, 34 deletions
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/SearchPanelView.java b/packages/SystemUI/src/com/android/systemui/SearchPanelView.java index 185ca5b..57f15a8 100644 --- a/packages/SystemUI/src/com/android/systemui/SearchPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/SearchPanelView.java @@ -146,7 +146,7 @@ public class SearchPanelView extends FrameLayout implements } } - public void show(boolean show, boolean animate) { + public void show(final boolean show, boolean animate) { if (animate) { if (mShowing != show) { mShowing = show; @@ -156,21 +156,24 @@ public class SearchPanelView extends FrameLayout implements mShowing = show; onAnimationEnd(null); } - setVisibility(show ? View.VISIBLE : View.GONE); - if (show) { - setFocusable(true); - setFocusableInTouchMode(true); - requestFocus(); - } + postDelayed(new Runnable() { + public void run() { + setVisibility(show ? View.VISIBLE : View.INVISIBLE); + if (show) { + setFocusable(true); + setFocusableInTouchMode(true); + requestFocus(); + } + } + }, show ? 0 : 100); } public void hide(boolean animate) { - if (!animate) { - setVisibility(View.GONE); - } if (mBar != null) { // This will indirectly cause show(false, ...) to get called mBar.animateCollapse(); + } else { + setVisibility(View.INVISIBLE); } } 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 f53a282..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 @@ -482,7 +485,6 @@ public class PhoneStatusBar extends BaseStatusBar { WindowManager.LayoutParams lp = (android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams(); lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; - lp.flags &= ~WindowManager.LayoutParams.FLAG_SLIPPERY; WindowManagerImpl.getDefault().updateViewLayout(mNavigationBarView, lp); } @@ -492,7 +494,6 @@ public class PhoneStatusBar extends BaseStatusBar { WindowManager.LayoutParams lp = (android.view.WindowManager.LayoutParams) mNavigationBarView.getLayoutParams(); lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; - lp.flags |= WindowManager.LayoutParams.FLAG_SLIPPERY; WindowManagerImpl.getDefault().updateViewLayout(mNavigationBarView, lp); } @@ -573,8 +574,7 @@ public class PhoneStatusBar extends BaseStatusBar { | WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL - | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH - | WindowManager.LayoutParams.FLAG_SLIPPERY, + | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH, PixelFormat.OPAQUE); // this will allow the navbar to run in an overlay on devices that support this if (ActivityManager.isHighEndGfx(mDisplay)) { 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 a394596..b0830ee 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -704,7 +704,6 @@ public class TabletStatusBar extends BaseStatusBar implements WindowManager.LayoutParams lp = (android.view.WindowManager.LayoutParams) mStatusBarView.getLayoutParams(); lp.flags &= ~WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; - lp.flags &= ~WindowManager.LayoutParams.FLAG_SLIPPERY; WindowManagerImpl.getDefault().updateViewLayout(mStatusBarView, lp); } @@ -714,7 +713,6 @@ public class TabletStatusBar extends BaseStatusBar implements WindowManager.LayoutParams lp = (android.view.WindowManager.LayoutParams) mStatusBarView.getLayoutParams(); lp.flags |= WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL; - lp.flags |= WindowManager.LayoutParams.FLAG_SLIPPERY; WindowManagerImpl.getDefault().updateViewLayout(mStatusBarView, lp); } |