I am trying to create a search widget for the homescreen but running into a few issues. I found out that you cannot use a EditTextView on a widget, so instead I have created a TextView, however it wont let me enter any text into the TextView.
I have a basic widget in place, and found many guides on how to create a widget, but nothing for a search bar in a widget. Here is my layout file:
<?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="match_parent"
android:background="@color/white"
android:orientation="horizontal" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginLeft="10dp"
android:src="@drawable/logo_menu" />
<TextView
android:id="@+id/etBlahblah"
style="@android:style/Widget.EditText"
android:layout_width="0dp"
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:layout_marginLeft="2dp"
android:clickable="true"
android:layout_weight="1" />
</LinearLayout>
Can anyone see anything wrong?
Cheers