Is this possible to interchange a TextView and an EditText. Like display the text when needed, but allow editing when needed. Is there a method (as in NON-XML) way of editing a TextView or non-editing a EditText?
+2
A:
Is this possible to interchange a TextView and an EditText.
Put both in your layout in the same spot. Make one invisible. Toggle visibility as needed.
Or, put both as children of a ViewSwitcher
or ViewFlipper
, and use that to switch between them.
Is there a method (as in NON-XML) way of editing a TextView or non-editing a EditText?
No, AFAIK.
CommonsWare
2010-09-03 17:42:22
What difference between ViewSwitcher and ViewFlipper?
Mohit Deshpande
2010-09-03 18:06:56
@Mohit Deshpande: "A ViewSwitcher can only have two child views, of which only one is shown at a time." (http://developer.android.com/reference/android/widget/ViewSwitcher.html) `ViewFlipper` supports more than two and has extra features, such as animated transitions between them. I have only used `ViewFlipper`.
CommonsWare
2010-09-03 18:10:54