You can also define a STYLE for your editText so you can regroup all properties in common. It is very powerful if you have to multiple edit text that need to has the behaviour
Put the code in res/values/styles.xml
After that you just need to call it in your editText