Yes, this is working as intended, setEnabled() doesn't relate to the
edibility of a text field, it relates usually to focusability, but its
actually up to the View to determine what enabled means. If you'd like
to prevent the EditText from being edited (but then, why are you using
EditText instead of TextView?) you can set android:editable="false" in
your layout.

I believe you call also use the two argument form of setText() and
specify TextView.BufferType.NORMAL as the second argument. I haven't
actually tried this, so I'd be interested in your results if you do.

Cheers,
Justin
Android Team @ Google

On Jul 15, 7:57 am, NitroDesk <gsuku...@gmail.com> wrote:
> We have in our app, a non-editable field described in the layout thus
>
> <EditText android:id="@+id/txtText"
> android:layout_width="fill_parent"
> android:layout_height="wrap_content"
> android:singleLine="false"
> android:selectAllOnFocus="true"
> android:hint="A Hint here"
> android:layout_marginBottom="4dip"
> android:background="@android:drawable/editbox_background"/>
>
> and in code, this is disabled using setEnabled(false).
>
> All was well before Cupcake, but when the on-screen keyboard came
> along, now you are able to tap on the field (or navigate focus to the
> field using the ball)  and then using the on-screen keyboard, start
> typing into the field, replacing the text with anything you type.
>
> I think this is an unexpected behavior.. Anyone else ?
> -g
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to