Monday, April 8, 2013

Capitalize every letter in EditText - Android

I had an interesting usecase in my application, where I need to make EditText uppercase by default.

After googling it for a while found the solution,


EditText someText = (EditText) findViewById(R.id.someText);
someText.setInputType(0x00001001);



This will solve the problem :) Let me know if there are any alternate ways