diff options
-rw-r--r-- | res/values/strings.xml | 2 | ||||
-rw-r--r-- | src/com/android/dialer/DialtactsActivity.java | 21 |
2 files changed, 20 insertions, 3 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index eec9b0ca7..3d7d5f16a 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -458,7 +458,7 @@ <!-- Hint displayed in dialer search box when there is no query that is currently typed. [CHAR LIMIT=30] --> - <string name="dialer_hint_find_contact">Enter a name or phone number</string> + <string name="dialer_hint_find_contact">Search contacts</string> <!-- String resource for the font-family to use for the call log activity's title Do not translate. --> diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 98f34b57d..c88f70cd1 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -55,6 +55,7 @@ import android.widget.EditText; import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.PopupMenu; +import android.widget.TextView; import android.widget.Toast; import com.android.contacts.common.activity.TransactionSafeActivity; @@ -393,8 +394,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O actionBar.setDisplayShowCustomEnabled(true); actionBar.setBackgroundDrawable(null); - SearchEditTextLayout searchEditTextLayout = - (SearchEditTextLayout) actionBar.getCustomView().findViewById(R.id.search_view_container); + SearchEditTextLayout searchEditTextLayout = (SearchEditTextLayout) actionBar + .getCustomView().findViewById(R.id.search_view_container); searchEditTextLayout.setPreImeKeyListener(mSearchEditTextLayoutListener); mActionBarController = new ActionBarController(this, searchEditTextLayout); @@ -545,6 +546,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O mListsFragment.showTab(ListsFragment.TAB_INDEX_RECENTS); } + setSearchBoxHint(); + Trace.endSection(); } @@ -839,6 +842,20 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O } } + protected int getSearchBoxHint () { + return R.string.dialer_hint_find_contact; + } + + /** + * Sets the hint text for the contacts search box + */ + private void setSearchBoxHint() { + SearchEditTextLayout searchEditTextLayout = (SearchEditTextLayout) getActionBar() + .getCustomView().findViewById(R.id.search_view_container); + ((TextView) searchEditTextLayout.findViewById(R.id.search_box_start_search)) + .setHint(getSearchBoxHint()); + } + protected OptionsPopupMenu buildOptionsMenu(View invoker) { final OptionsPopupMenu popupMenu = new OptionsPopupMenu(this, invoker); popupMenu.inflate(R.menu.dialtacts_options); |