summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-05-17 22:00:11 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-05-17 22:00:12 +0000
commite026fac8868f7393ccab2ce4ceb8faa9bd2530b2 (patch)
tree6413043c579801372c098dd37eede02ca55031d4 /src
parent6020ea4ec166f2a168c8ecf73a9a605169838da1 (diff)
parentd4cde838ea2bc23679e8656d04ed096e82d938d4 (diff)
Merge "Add magnifying glass to search box."
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/DialtactsActivity.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index 6fdf5499e..2b66355cf 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -190,6 +190,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
private String mPendingSearchViewQuery;
private EditText mSearchView;
+ private View mSearchIcon;
private View mSearchViewCloseButton;
private View mVoiceSearchButton;
@@ -334,6 +335,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
SearchEditTextLayout actionBarView = (SearchEditTextLayout) actionBar.getCustomView();
actionBarView.setPreImeKeyListener(mSearchEditTextLayoutListener);
+ mSearchIcon = actionBarView.findViewById(R.id.search_magnifying_glass);
+
mSearchView = (EditText) actionBarView.findViewById(R.id.search_view);
mSearchView.addTextChangedListener(mPhoneSearchQueryTextListener);
mSearchView.setOnTouchListener(mSearchViewOnTouchListener);
@@ -604,6 +607,9 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
}
mListsFragment.maybeShowActionBar();
+ if (isInSearchUi()) {
+ mSearchIcon.setVisibility(View.GONE);
+ }
}
/**
@@ -810,6 +816,10 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
transaction.commit();
mListsFragment.getView().animate().alpha(0).withLayer();
+
+ if (!mIsDialpadShown) {
+ mSearchIcon.setVisibility(View.GONE);
+ }
}
/**
@@ -837,6 +847,7 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O
transaction.commit();
mListsFragment.getView().animate().alpha(1).withLayer();
+ mSearchIcon.setVisibility(View.VISIBLE);
}
/** Returns an Intent to launch Call Settings screen */