]> gitweb.fperrin.net Git - Dictionary.git/blobdiff - res/layout/dictionary_activity.xml
Some improvements to keyboard navigation.
[Dictionary.git] / res / layout / dictionary_activity.xml
index aca497c312408f07d728ca0797c3bc877a758160..5e88bd7f6b1e79fe8c36ec9d6ffdd8a412a6cdd0 100644 (file)
         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" />
 
+     <!-- 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" />
 
      <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" />
 
     <TextView