Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UserName: .....
- Password: .....
- LoginButton
- boolean checkFocus=user.requestFocus();
- Log.i("CheckFocus", ""+checkFocus);
- if(checkFocus==true)
- {
- InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
- mgr.showSoftInput(user, InputMethodManager.SHOW_IMPLICIT);
- }
- edittext.requestFocus();
- <EditText...>
- <requestFocus />
- </EditText>
- <activity android:name=".MainActivity"
- android:label="@string/app_name"
- android:windowSoftInputMode="stateAlwaysVisible" />
- oncreate();
- ed1.requestFocus();
- return; //Faça um return para retornar o foco
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement