hi i have the following xml layout
<Button android:id="@+id/signupButton"
android:layout_gravity="left"
android:layout_width="100sp"
android:layout_height="wrap_content"
android:layout_marginLeft = "10px"
android:layout_marginTop = "10px"
android:text="Sign-Up"/>
<TextView
android:id="@+id/accountlabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text = "Forgot password"
android:textColor = "#000000"
android:layout_marginLeft = "10px"
android:layout_marginTop = "10px"
android:textSize="15sp"
android:paddingLeft="3px"
android:paddingRight="3px"
/>
<Button
android:id="@+id/cancelButton"
android:layout_gravity="right"
android:layout_width="100sp"
android:layout_height="wrap_content"
android:layout_marginLeft = "10px"
android:layout_marginTop = "10px"
android:text="SignOut"/>
</LinearLayout>
my problem is that focus only goes to one button to another.it doesn’t go to textview because my text is clickable so i need focus on it as well.
i read few solutions like android:focusable = “true” adding in textview but it didnt work.
Someone have any solution for this.
Thanks
The easy solution is to make the TextView into a Button with an empty background by adding the property:
to the XML. So your TextView would become:
You could also use an ImageButton if you want to use a selector for different states to add some feedback for the user when the object has focus.
In that case, instead of setting the background to transparent, you could make an XML file with a selector for different states and reference that for the background. See ImageButton reference