summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-10-15 02:08:54 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-15 02:08:54 +0000
commitbd9a88abc916c0a961ff5c50ae2d41bafdc71c59 (patch)
treeed506e0941c1863699687116dd70345386c2fb5a
parent8066fd795576606a7f151e45210fba6bd6fa45e6 (diff)
parent234ddecaefe075c20a767724ff702b864d945679 (diff)
am 234ddeca: am 02419fc8: Handle searchbox long press to speed up copy/paste.
* commit '234ddecaefe075c20a767724ff702b864d945679': Handle searchbox long press to speed up copy/paste.
-rw-r--r--src/com/android/dialer/widget/SearchEditTextLayout.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/dialer/widget/SearchEditTextLayout.java b/src/com/android/dialer/widget/SearchEditTextLayout.java
index 919f65c3c..f22a3be9e 100644
--- a/src/com/android/dialer/widget/SearchEditTextLayout.java
+++ b/src/com/android/dialer/widget/SearchEditTextLayout.java
@@ -101,6 +101,17 @@ public class SearchEditTextLayout extends FrameLayout {
mExpandedSearchBox = findViewById(R.id.search_box_expanded);
mClearButtonView = findViewById(R.id.search_close_button);
+ // Convert a long click into a click to expand the search box, and then long click on the
+ // search view. This accelerates the long-press scenario for copy/paste.
+ mCollapsedSearchBox.setOnLongClickListener(new OnLongClickListener() {
+ @Override
+ public boolean onLongClick(View view) {
+ mCollapsedSearchBox.performClick();
+ mSearchView.performLongClick();
+ return false;
+ }
+ });
+
mSearchView.setOnFocusChangeListener(new OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {