android edittext hide keyboard on focus

In android if you want to hide keyboard on focus and you dont want to show user default keyboard of android . You can do it with following code

EditText editTextBarcode=(EditText) findViewById(R.id.editTextBarcodes);
       editTextBarcode.requestFocus();
       editTextBarcode.setShowSoftInputOnFocus(false);

 

Leave a Reply

Your email address will not be published. Required fields are marked *