分析github android 客戶端 android:imeOptions="actionNext" //鍵盤顯示下一步 android:inputType="textEmailAddress" android:nextFocusDown="@+id/et_password"//下一步所指向的位置 指定下一步鍵盤 所放位置 android:nextFocusDownandroid
passwordText.setOnKeyListener(new OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if (event != null && ACTION_DOWN == event.getAction() && keyCode == KEYCODE_ENTER) { //登錄 return true; } else return false; } }); passwordText.setOnEditorActionListener(new OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == IME_ACTION_DONE ) { //登錄 return true; } return false; } });
//以上是控制鍵盤 登錄git