]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - res/layout/dictionary_activity.xml
Remove unused images and XML sections.
[Dictionary.git] / res / layout / dictionary_activity.xml
index 56bb7555863b3565988f168025acab6977a8dc67..40b1f24aece45421872e6c5c59ac69b043556398 100644 (file)
@@ -1,67 +1,50 @@
 <?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="vertical" >
 
-<LinearLayout 
-       xmlns:android="http://schemas.android.com/apk/res/android"
-       android:orientation="vertical" android:layout_width="fill_parent"
-       android:layout_height="fill_parent">
+    <ListView
+        android:id="@id/android:list"
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent"
+        android:nextFocusRight="@+id/floatSearchButton"
+        android:choiceMode="singleChoice"
+        android:clickable="true"
+        android:fastScrollEnabled="true"
+        android:focusable="true"
+        android:focusableInTouchMode="true" />
 
-       <LinearLayout 
-               android:id="@+id/SearchBarLinearLayout"
-               android:layout_height="wrap_content"
-               android:layout_width="fill_parent">
-               
-                       <EditText 
-                               android:id="@+id/SearchText"
-                               android:hint="@string/searchText"
-                               android:layout_width="0dip"
-                               android:layout_height="wrap_content" 
-        android:imeOptions="actionSearch|flagNoEnterAction|flagNoExtractUi"
-                               android:layout_weight="1.0" 
-        android:inputType="text"/>
-
-<!--          android:imeOptions="actionSearch|flagNoEnterAction|flagNoExtractUi" -->
-                               
-      <Button 
-        android:id="@+id/ClearSearchTextButton"
-        android:text="&lt;x"
-        android:minWidth="50dip"
+     <!-- force fabSize to mini, otherwise it is normal on some
+          phones and mini on others, with not particular sense to it.
+          Also leaves more space for content. -->
+     <android.support.design.widget.FloatingActionButton
+        android:id="@+id/floatSwapButton"
+        app:fabSize="mini"
+        app:useCompatPadding="true"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentRight="true"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        />
+        android:onClick="onLanguageButtonClick"
+        android:src="@drawable/ic_swap_horiz_black_24dp" />
 
-                       <Button 
-                               android:id="@+id/LangButton"
-                               android:text="LANG"
-                               android:minWidth="50dip"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content"
-                               />
-                               
-                       <Button
-                               android:id="@+id/DownButton"
-                               android:text="v"
-                               android:minWidth="50dip"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content" 
-                               />
-                               
-                       <Button 
-                               android:id="@+id/UpButton"
-                               android:text="^"
-                               android:minWidth="50dip"
-                               android:layout_width="wrap_content"
-                               android:layout_height="wrap_content" 
-                               />
-               
-       </LinearLayout>
+     <android.support.design.widget.FloatingActionButton
+        android:id="@+id/floatSearchButton"
+        app:fabSize="mini"
+        app:useCompatPadding="true"
+        android:layout_toLeftOf="@+id/floatSwapButton"
+        android:layout_alignParentBottom="true"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:nextFocusLeft="@id/android:list"
+        android:onClick="onSearchButtonClick"
+        android:src="@drawable/ic_search_black_24dp" />
 
-       <ListView 
-               android:id="@id/android:list" 
-               android:layout_width="fill_parent"
-               android:layout_height="fill_parent" 
-               android:choiceMode="singleChoice"
-               android:clickable="true" 
-               android:focusableInTouchMode="true"
-               android:focusable="true"/>
+    <TextView
+        android:id="@android:id/empty"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:text="@string/noSearchResults" />
 
-</LinearLayout>
+</RelativeLayout>