Android Question Can editting of an edittext field be disabled?

kostefar

Active Member
Licensed User
Dear All,

I know.. sounds like a weird question but the reason is as follows: Under some circumstances, an edittext field in my app should be editable by the user, and under other circumstances, it should just be static, like a label, and show what´s been entered by the user earlier.
So why not replace it with a label? Well, if I define a label with the exact same position, font, etc.etc., also in the designer and on the same activity which contains the same text, the label appears about 5-10 % further to the left than the edittext box would have done.
I first thought the problem was inserting it with code, but when using the designer instead, the result was no different.
This is a problem because it needs to allign with other edittext fields in the layout. I could of course just try to push it some 5-10 % more to the right, but I have the feeling that it will not necessarily look that way on all devices.
 
Top