This code will help you to hide keyboard in touch of outside the edittext or anywhere just write this code in your activity or you can write in base activity of your project