I have a small program with two textviews, when app starts the second is focused (i want the first one) and whenever I input something into them and then focuses something else, the input data will not be displayed – the textview will be blank but it doesnt really disappear because you can hover over it to see it again.
How do I set these things?
/// This is my main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<AutoCompleteTextView
android:id="@+id/artisttext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:text="Artist.."
android:hint="Artist..">
<requestFocus />
</AutoCompleteTextView>
<AutoCompleteTextView
android:id="@+id/tracktext"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:text="Track.."
android:hint="Track.."> >
<requestFocus />
</AutoCompleteTextView>
<Button
android:id="@+id/artistEnter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Get similar artists" />
<Button
android:id="@+id/songEnter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Get similar tracks" />
<ListView
android:id="@+id/listView1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
</ListView>
</LinearLayout>
I found out how to set focus, but not the issue of when chnging focus from one tetview to the other, the one that lost focus also sets is text to invisible til it get focused again. Why is this?