public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.page); context = this; passText = (EditText)findViewById(R.id.c_passEdit); passText.requestFocus(); Timer timer = new Timer(); timer.schedule( new TimerTask() { @Override public void run() { // TODO Auto-generated method stub InputMethodManager m = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE); m.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS); }}, 1000); } }
Activity가 실행되면 자동으로 edittext를 지정하고 소프트 키보드가 올라온다.
입력하면 지정한 edittext에 입력이 된다.
'MISCELLANEOUSNESS' 카테고리의 다른 글
android] Soft Keyboard 완료(Done) 키 핸들링하기. (0) | 2011.01.28 |
---|---|
Android ImageView 여백에 투명효과 주기. (0) | 2011.01.09 |
URI로 파일 경로(FILE PATH) 획득하기. (0) | 2011.01.05 |