Thanks Sean.. It's been days that the emails didn't go through, so I
also posted on android-developers group, and got an answer:
<EditText android:id="@+id/title" android:layout_width="fill_parent"
style="?android:attr/textViewStyle"
android:background="@null" android:textColor="@null"/>
You can check out the whole thread here:
http://groups.google.rs/group/android-developers/browse_frm/thread/90634ccca4559752/1ee9a6a2f60fb86e?lnk=gst&q=%22Is+there+an+easy+way%22#1ee9a6a2f60fb86e
I guess that changing the TextView to recive input is basically what
EditView does.
Thanks Sean
On 20 мај, 12:04, Sean Hodges <[email protected]> wrote:
> Hello Nikolar,
>
> Your emails are getting sent, we've received it 3 times now. Don't Panic :)
>
> Drop the "android:" prefix to your style attribute and follow the
> style convention given
> here:http://developer.android.com/guide/topics/resources/available-resourc...
>
> <EditText
> android:id="@+id/lipsum"
> android:text="Lorem ipsum"
> style="@android:style/Widget.TextView" />
>
> I don't think this is what you want though, as EditText adds a "thin
> veneer" decoration around it's contents, which the theme does not
> dictate.
>
> What you probably want to do is modify a TextView to be editable. An
> example of this can be seen here:
>
> http://learnandroid.blogspot.com/2008/02/changing-textview-to-receive...
>
> The key modification is to apply
> "myTextView.setInputMethod(TextInputMethod.getInstance());".
>
> Regards,
>
> Sean
>
>
>
> On Tue, May 19, 2009 at 11:02 PM, n5r11 <[email protected]> wrote:
>
> > Okay, this is the third time I'm sending this.. I hope it will finally
> > deliver.
>
> > On 17 мај, 14:39, Nikola Radosavljevic <[email protected]>
> > wrote:
> >> 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
> >> outhttp://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 Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---