diff options
| author | Yorke Lee <yorkelee@google.com> | 2014-07-24 11:31:13 -0700 |
|---|---|---|
| committer | Yorke Lee <yorkelee@google.com> | 2014-07-24 11:31:34 -0700 |
| commit | f543baadd1119bad7cd9ff7ed39e5598c6fc50d6 (patch) | |
| tree | 83995705de8ea2c3c6039f978aeab15f1ca0813e /src/com/android/dialer/widget | |
| parent | a396b7a4d2f9074b57abd6ebdc6e1654d84383e1 (diff) | |
| download | packages_apps_Dialer-f543baadd1119bad7cd9ff7ed39e5598c6fc50d6.tar.gz packages_apps_Dialer-f543baadd1119bad7cd9ff7ed39e5598c6fc50d6.tar.bz2 packages_apps_Dialer-f543baadd1119bad7cd9ff7ed39e5598c6fc50d6.zip | |
Hide keyboard when next key is pressed
Also move some shared utility methods to DialerUtils
Bug: 16542561
Change-Id: Ibc574c24919bdcd11b0786fb9d22d29ff9c21bf1
Diffstat (limited to 'src/com/android/dialer/widget')
| -rw-r--r-- | src/com/android/dialer/widget/SearchEditTextLayout.java | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/com/android/dialer/widget/SearchEditTextLayout.java b/src/com/android/dialer/widget/SearchEditTextLayout.java index 36e578953..919f65c3c 100644 --- a/src/com/android/dialer/widget/SearchEditTextLayout.java +++ b/src/com/android/dialer/widget/SearchEditTextLayout.java @@ -19,15 +19,14 @@ package com.android.dialer.widget; import android.animation.ValueAnimator; import android.animation.ValueAnimator.AnimatorUpdateListener; import android.content.Context; -import android.graphics.Color; import android.util.AttributeSet; import android.view.KeyEvent; import android.view.View; -import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.FrameLayout; import com.android.dialer.R; +import com.android.dialer.util.DialerUtils; import com.android.phone.common.animation.AnimUtils; public class SearchEditTextLayout extends FrameLayout { @@ -106,7 +105,9 @@ public class SearchEditTextLayout extends FrameLayout { @Override public void onFocusChange(View v, boolean hasFocus) { if (hasFocus) { - showInputMethod(v); + DialerUtils.showInputMethod(v); + } else { + DialerUtils.hideInputMethod(v); } } }); @@ -261,14 +262,6 @@ public class SearchEditTextLayout extends FrameLayout { return mIsFadedOut; } - private void showInputMethod(View view) { - final InputMethodManager imm = (InputMethodManager) getContext().getSystemService( - Context.INPUT_METHOD_SERVICE); - if (imm != null) { - imm.showSoftInput(view, 0); - } - } - /** * Assigns margins to the search box as a fraction of its maximum margin size * |
