How to get focus on a text view?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

How to get focus on a text view?

Postby ShirleyGao » Sat Jan 23, 2010 1:48 pm

Hi all,

I want to create the linearlayout with several textview .My problem is i am not able to get focus on my text_view.
Textview.requestFocus() does not work on this case. The return value of requestFocus() is false, means this view can't actually took focus. What the problem with my textview? Thanks

FYI.

/Layout XML
<LinearLayout>
<TextView android:id="@+id/text_view"
android:focusable="true"
style="@style/TxtMsgItem" />

<TextView android:id="@+id/date_view"
android:focusable="true"
style="@style/TxtMsgItem" />

</LinearLayout>
ShirleyGao
Once Poster
Once Poster
 
Posts: 1
Joined: Sat Jan 23, 2010 1:30 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 2 guests