]> gitweb.fperrin.net Git - Dictionary.git/blob - res/layout/dictionary_activity.xml
Relayout search bar to improve usability, use ImageButton for clear
[Dictionary.git] / res / layout / dictionary_activity.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3     android:layout_width="fill_parent"
4     android:layout_height="fill_parent"
5     android:orientation="vertical" >
6
7     <LinearLayout
8         android:id="@+id/SearchBarLinearLayout"
9         android:layout_width="fill_parent"
10         android:layout_height="wrap_content" >
11
12         <Button
13             android:id="@+id/LangButton"
14             android:layout_width="wrap_content"
15             android:layout_height="wrap_content"
16             android:maxLines="1"
17             android:minWidth="50dip"
18             android:text="" />
19
20         <EditText
21             android:id="@+id/SearchText"
22             android:layout_width="0dip"
23             android:layout_height="wrap_content"
24             android:layout_weight="1.0"
25             android:hint="@string/searchText"
26             android:imeOptions="actionSearch|flagNoEnterAction|flagNoExtractUi"
27             android:inputType="text" />
28
29         <ImageButton
30             android:id="@+id/ClearSearchTextButton"
31             style="@style/BorderlessButton"
32             android:layout_width="wrap_content"
33             android:layout_height="wrap_content"
34             android:padding="@dimen/default_padding"
35             android:src="@drawable/ic_input_delete" />
36
37         <Button
38             android:id="@+id/DownButton"
39             android:layout_width="wrap_content"
40             android:layout_height="wrap_content"
41             android:background="#00000000"
42             android:drawableLeft="@drawable/arrow_down_float"
43             android:minHeight="30dip"
44             android:minWidth="30dip" />
45
46         <Button
47             android:id="@+id/UpButton"
48             android:layout_width="wrap_content"
49             android:layout_height="wrap_content"
50             android:background="#00000000"
51             android:drawableLeft="@drawable/arrow_up_float"
52             android:minHeight="30dip"
53             android:minWidth="30dip" />
54     </LinearLayout>
55
56     <ListView
57         android:id="@id/android:list"
58         android:layout_width="fill_parent"
59         android:layout_height="fill_parent"
60         android:choiceMode="singleChoice"
61         android:clickable="true"
62         android:fastScrollEnabled="true"
63         android:focusable="true"
64         android:focusableInTouchMode="true" />
65
66     <TextView
67         android:id="@android:id/empty"
68         android:layout_width="match_parent"
69         android:layout_height="match_parent"
70         android:text="@string/noSearchResults" />
71
72 </LinearLayout>