kopia lustrzana https://github.com/ryukoposting/Signal-Android
rodzic
2bcbbb0601
commit
11dbb82bf1
|
@ -9,11 +9,15 @@ import android.text.Editable;
|
|||
import android.text.InputType;
|
||||
import android.text.TextWatcher;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.TouchDelegate;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
import org.thoughtcrime.securesms.components.AnimatingToggle;
|
||||
|
@ -96,6 +100,18 @@ public class GiphyActivityToolbar extends Toolbar {
|
|||
}
|
||||
});
|
||||
|
||||
this.searchText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
||||
@Override
|
||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
|
||||
InputMethodManager inputMethodManager = (InputMethodManager)getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
inputMethodManager.hideSoftInputFromWindow(searchText.getWindowToken(), 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
expandTapArea(this, action);
|
||||
expandTapArea(toggleContainer, gridToggle);
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue