Android coding which used in Every Project
You're android developer - beginner or pro doesn't matter because below any of 13 android code you'll use in your most of project.So read it and bookmark it for faster development in Android.
If you've any other code which you use frequently in your coding then comment me. I'll add in this list.
For full article go to :
How to Disable Home Button
@Override public void onAttachedToWindow() { this.getWindow().setType(WindowManager. LayoutParams.TYPE_KEYGUARD_DIALOG); super.onAttachedToWindow(); }
How to Disable Back Button
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { return false; }
How to Disable Soft Keypad
final EditText txtName = (EditText) findViewById(R.id.txtName); txtName.setInputType(InputType.TYPE_NULL);

Comments