Fixing focus issues in Launcher (keyboard support).

Change-Id: Ieafd713393daf5628f229a66441bd3ed293245da
diff --git a/res/layout-xlarge/button_bar.xml b/res/layout-xlarge/button_bar.xml
index 5c96c5c..618f4e5 100644
--- a/res/layout-xlarge/button_bar.xml
+++ b/res/layout-xlarge/button_bar.xml
@@ -15,31 +15,33 @@
 -->
 <RelativeLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher">
+    xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
+    android:focusable="false">
 
    <!-- Global search icon -->
    <ImageView
-       android:id="@+id/search_button"
-       android:layout_width="wrap_content"
-       android:layout_height="wrap_content"
-       android:layout_alignParentTop="true"
-       android:layout_alignParentLeft="true"
-       android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
-       android:paddingRight="@dimen/toolbar_button_horizontal_padding"
-       android:paddingTop="@dimen/toolbar_button_vertical_padding"
-       android:paddingBottom="@dimen/toolbar_button_vertical_padding"
-       android:src="@drawable/ic_generic_search"
-       android:background="@drawable/button_bg"
-       android:onClick="onClickSearchButton"
-       android:focusable="true"
-       android:clickable="true" />
+        android:id="@+id/search_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentLeft="true"
+        android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
+        android:paddingRight="@dimen/toolbar_button_horizontal_padding"
+        android:paddingTop="@dimen/toolbar_button_vertical_padding"
+        android:paddingBottom="@dimen/toolbar_button_vertical_padding"
+        android:src="@drawable/ic_generic_search"
+        android:background="@drawable/button_bg"
+        android:onClick="onClickSearchButton"
+
+        android:focusable="true"
+        android:clickable="true" />
 
     <ImageView
         android:id="@+id/search_divider"
         android:src="@drawable/divider_launcher_holo"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
-        android:layout_toRightOf="@id/search_button"
+        android:layout_toRightOf="@+id/search_button"
         android:paddingTop="@dimen/toolbar_button_vertical_padding"
         android:paddingBottom="@dimen/toolbar_button_vertical_padding"
 
@@ -52,7 +54,7 @@
         android:id="@+id/voice_button"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_toRightOf="@id/search_divider"
+        android:layout_toRightOf="@+id/search_divider"
         android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
         android:paddingRight="@dimen/toolbar_button_horizontal_padding"
         android:paddingTop="@dimen/toolbar_button_vertical_padding"
@@ -60,35 +62,11 @@
         android:src="@drawable/ic_voice_search"
         android:background="@drawable/button_bg"
         android:onClick="onClickVoiceButton"
+
         android:focusable="true"
         android:clickable="true"/>
 
-    <ImageView
-        android:id="@+id/configure_button"
-        android:src="@drawable/ic_home_add_holo_dark"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_alignParentTop="true"
-        android:layout_alignParentRight="true"
-        android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
-        android:paddingRight="@dimen/toolbar_button_horizontal_padding"
-        android:paddingTop="@dimen/toolbar_button_vertical_padding"
-        android:paddingBottom="@dimen/toolbar_button_vertical_padding"
-        android:background="@drawable/button_bg"
-
-        android:focusable="true"
-        android:clickable="true" />
-    <ImageView
-        android:id="@+id/divider"
-        android:src="@drawable/divider_launcher_holo"
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        android:layout_toLeftOf="@id/configure_button"
-        android:paddingTop="@dimen/toolbar_button_vertical_padding"
-        android:paddingBottom="@dimen/toolbar_button_vertical_padding"
-
-        android:focusable="false"
-        android:clickable="true" />
+    <!-- AllApps icon -->
     <com.android.launcher2.StrokedTextView
         android:id="@+id/all_apps_button"
         android:text="@string/all_apps_button_label"
@@ -96,12 +74,12 @@
         android:drawableLeft="@drawable/ic_home_all_apps_holo_dark"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_toLeftOf="@id/divider"
+        android:layout_toLeftOf="@+id/all_apps_divider"
         android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
         android:paddingRight="@dimen/toolbar_button_horizontal_padding"
         android:paddingTop="@dimen/all_apps_button_vertical_padding"
         android:paddingBottom="@dimen/all_apps_button_vertical_padding"
-        android:background="@drawable/button_bg"
+       android:background="@drawable/button_bg"
 
         android:gravity="center_horizontal|center_vertical"
         android:textColor="#CCFFFFFF"
@@ -118,15 +96,36 @@
 
         android:focusable="true"
         android:clickable="true" />
+
     <ImageView
-        android:id="@+id/divider_during_drag"
+        android:id="@+id/all_apps_divider"
         android:src="@drawable/divider_launcher_holo"
         android:layout_width="wrap_content"
         android:layout_height="match_parent"
-        android:layout_toLeftOf="@id/configure_button"
+        android:layout_toLeftOf="@+id/configure_button"
         android:paddingTop="@dimen/toolbar_button_vertical_padding"
         android:paddingBottom="@dimen/toolbar_button_vertical_padding"
-        android:visibility="gone" />
+
+        android:focusable="false"
+        android:clickable="true" />
+
+    <!-- Customize icon -->
+    <ImageView
+        android:id="@+id/configure_button"
+        android:src="@drawable/ic_home_add_holo_dark"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentRight="true"
+        android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
+        android:paddingRight="@dimen/toolbar_button_horizontal_padding"
+        android:paddingTop="@dimen/toolbar_button_vertical_padding"
+        android:paddingBottom="@dimen/toolbar_button_vertical_padding"
+        android:background="@drawable/button_bg"
+        android:focusable="true"
+ />
+
+    <!-- Delete icon -->
     <com.android.launcher2.DeleteZone
         android:id="@+id/delete_zone"
         android:text="@string/delete_zone_label_workspace"
@@ -134,12 +133,12 @@
         android:drawableLeft="@drawable/delete_zone_selector"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_alignRight="@id/configure_button"
+        android:layout_alignRight="@+id/configure_button"
         android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
         android:paddingRight="@dimen/toolbar_button_horizontal_padding"
         android:paddingTop="@dimen/toolbar_button_vertical_padding"
         android:paddingBottom="@dimen/toolbar_button_vertical_padding"
-        android:background="@drawable/button_bg"
+       android:background="@drawable/button_bg"
 
         android:gravity="center_horizontal|center_vertical"
         android:textColor="@color/workspace_all_apps_and_delete_zone_text_color"
@@ -150,5 +149,8 @@
         android:shadowRadius="2.0"
 
         android:visibility="gone"
-        launcher:direction="horizontal" />
-</RelativeLayout>
\ No newline at end of file
+        launcher:direction="horizontal"
+
+        android:focusable="true"
+ />
+</RelativeLayout>