Hi guys,
I am having an EditText. If i specify image for the EditText in the layout
XML file (android:background) it looks different and looks different when i
specify it at runtime
EditText et = (EditText)findViewById(R.drawable.et1);
et.setBackgroundDrawable(Main.themes.getDrawable(EDRAWABLES.EditTextBackgroundImage));
Both codes point to the same image. When i specify the image at runtime ,
the EditText leaves a margin at the top and bottom of the cursor in the
edittext which does not happen when i do it in XML.
I have attached the screenshots of both images. Top image is the one drawn
from XML and bottom one is given at runtime.
I am not getting the difference ?
Actually i am facing similar problems with other Widgets too if i change the
logic of specifying the drawable at runtime and not at compile time..
Is this the default SDK behaviour ?
Thanks,
Alok

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<<attachment: EditTextProblem.JPG>>

Reply via email to