아래에 3 개의 토글 버튼이있는 EditText가 있습니다.버튼을 누르는 경우 EditText 포커스 유지
EditText에 초점을 맞추고 세 가지 토글 중 하나를 누르면 키보드가 계속 표시됩니다. 즉 포커스가 EditText 밖에있을 때 키보드를 숨기지 않으려 고합니다 (키보드 숨기기가 다시 열리는 것을 보지 말아야 함).
toggleButton.setOnFocusChangeListener(new View.OnFocusChangeListener()
{
@Override
public void onFocusChange(View v, boolean hasFocus)
{
editText.requestFocus();
// This doesn't fully work.
// Focus is on editText but keyboard still hides when I
// tap on the toggle button.
}
});
글고 치기와 ToggleButtons이 조각에, 부모 활동 AndroidManifest를이 구성이 있습니다
는 나는 아무 소용에 다음을 시도했습니다.
<activity
android:name=".activities.MyActivity"
android:label="@string/m_activity"
android:theme="@style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateHidden|adjustResize" />
이 문제를 해결하는 가장 좋은 방법은 무엇입니까?
내 대답을 확인하셨습니까? –