summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2011-09-02 16:35:54 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-09-02 16:35:54 -0700
commit32041c1602e6bc753f4ab055fd1bb95952f1e15b (patch)
tree696f9b150c400dcf50418eea40ebbb7b97d43a43 /packages
parent8064ec61d62be074a06f446c512560b9bcf63813 (diff)
parent7725a4e3071c6450deb89dcb1e234ed96142edc9 (diff)
downloadframeworks_base-32041c1602e6bc753f4ab055fd1bb95952f1e15b.zip
frameworks_base-32041c1602e6bc753f4ab055fd1bb95952f1e15b.tar.gz
frameworks_base-32041c1602e6bc753f4ab055fd1bb95952f1e15b.tar.bz2
Merge "Click on whitespace dismisses Recents in landscape"
Diffstat (limited to 'packages')
-rw-r--r--packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java19
1 files changed, 15 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
index 85cde7c..5c1bbf0 100644
--- a/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
+++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsHorizontalScrollView.java
@@ -26,6 +26,7 @@ import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
+import android.view.View.OnClickListener;
import android.widget.HorizontalScrollView;
import android.widget.LinearLayout;
@@ -75,13 +76,23 @@ public class RecentsHorizontalScrollView extends HorizontalScrollView
mPerformanceHelper.addViewCallback(view);
}
- final View thumbnail = view.findViewById(R.id.app_thumbnail);
- // thumbnail is set to clickable in the layout file
- thumbnail.setOnClickListener(new OnClickListener() {
+ view.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
- mCallback.handleOnClick(view);
+ mCallback.dismiss();
}
});
+
+ OnClickListener launchAppListener = new OnClickListener() {
+ public void onClick(View v) {
+ mCallback.handleOnClick(view);
+ }
+ };
+ final View thumbnail = view.findViewById(R.id.app_thumbnail);
+ thumbnail.setClickable(true);
+ thumbnail.setOnClickListener(launchAppListener);
+ final View appTitle = view.findViewById(R.id.app_label);
+ appTitle.setClickable(true);
+ appTitle.setOnClickListener(launchAppListener);
mLinearLayout.addView(view);
}
// Scroll to end after layout.