Tuesday, 16 October 2012

Values set in EditText visible only when clicked..android problem fix..tested on HTC wildfire

Problem:
Sometimes, values set in EditText is displayed properly in android emulator but it does not show on device(tested with HTC wildfire). It shows only when the field is clicked and disappears when not focused.

Solution:
Set the theme before calling the setcontent() in oncreate.
It can be done in the following way...
setTheme(android.R.style.Theme);