Skip to content

Instantly share code, notes, and snippets.

@rodrigobravo
Created June 29, 2017 22:17
Show Gist options
  • Save rodrigobravo/dd79017de21abfac7f0698aeeac3074d to your computer and use it in GitHub Desktop.
Save rodrigobravo/dd79017de21abfac7f0698aeeac3074d to your computer and use it in GitHub Desktop.
package br.com.laborumtech.wincomanda;
import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
public class LoginActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
}
EditText yourEditText= (EditText) findViewById(R.id.campoLogin);
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(yourEditText,InputMethodManager.SHOW_IMPLICIT);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment