I want an EditText to look like TextView but still behave like
EditText. I've tried applying TextView style to my EditText in my
layout.xml file, like this:
Using xml Syntax Highlighting
- <EditText
- android:id="@+id/lipsum"
- android:text="Lorem ipsum"
- android:style="@android:style/Widget_TextView"
- />
Parsed in 0.001 seconds, using GeSHi 1.0.8.4
..but I get an error within xml editor: "Error: No resource found that
matches the given name (at 'style' with value '@android:style/
Widget_TextView')." It is strange because [font=Courier New]@android:style/
Widget_TextView[/font] definitively exists - I double checked it in code via
[font=Courier New]android.R.style.Widget_TextView[/font]. Another strange thing is that I don't
get android:style offered in the xml editor while typing? There is
android:id, android:text and everything else.. but not
android:style?!
Note: I consider the hard way (making EditText look like TextView) to
be: extending EditText and overriding it's onDraw method.
Any ideas?
PS: Check out http://developer.android.com/guide/topi ... tml#styles.
Why are id and style written without android: namespace?[font=Font type] [/font]

