Try this: android:style="@android:style/Widget.TextView"
R/ On Sun, May 17, 2009 at 3:31 PM, Nikola Radosavljevic <nikolaradosavlje...@gmail.com> wrote: > Note: I had troubles posting to android-beginners group, so I came here > hoping this will work. > Hello there, > > 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: > > <EditText > android:id="@+id/lipsum" > android:text="Lorem ipsum" > android:style="@android:style/Widget_TextView" > /> > > ..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 @android:style/ > Widget_TextView definitively exists - I double checked it in code via > android.R.style.Widget_TextView. 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. > > Nikolar > > PS: Check out > http://developer.android.com/guide/topics/ui/themes.html#styles. > Why are id and style written without android: namespace? > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---