Adding a custom view for DragHandle
> Separating page indicator and drag handle
> Page indicator always draws irrespactive of oriantation
> Drag handle is responsible for accessibility interactions
> Adding assissibility actions for DragHandle
Bug: 72500733
Change-Id: I9030337456964af1bdf77f1c01956452321f9229
diff --git a/res/layout/drag_handle_indicator.xml b/res/layout/drag_handle_indicator.xml
new file mode 100644
index 0000000..d5a7b8a
--- /dev/null
+++ b/res/layout/drag_handle_indicator.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2018 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<com.android.launcher3.views.LauncherDragIndicator
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/drag_indicator"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:contentDescription="@string/all_apps_button_label"
+ android:scaleType="centerInside"
+ android:tint="?attr/workspaceTextColor" />
diff --git a/res/layout/hotseat.xml b/res/layout/hotseat.xml
index 01cd92a..00f0b5f 100644
--- a/res/layout/hotseat.xml
+++ b/res/layout/hotseat.xml
@@ -18,15 +18,6 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res-auto">
- <ImageView
- android:id="@+id/drag_indicator"
- android:layout_width="@dimen/hotseat_drag_indicator_height"
- android:layout_height="@dimen/hotseat_drag_indicator_height"
- android:src="@drawable/ic_drag_indicator"
- android:tint="?attr/workspaceTextColor"
- android:scaleType="centerInside"
- android:layout_gravity="top|center_horizontal"/>
-
<com.android.launcher3.CellLayout
android:id="@+id/layout"
android:layout_width="wrap_content"
diff --git a/res/layout/launcher.xml b/res/layout/launcher.xml
index 4693917..a4acf06 100644
--- a/res/layout/launcher.xml
+++ b/res/layout/launcher.xml
@@ -49,7 +49,8 @@
<com.android.launcher3.pageindicators.WorkspacePageIndicator
android:id="@+id/page_indicator"
android:layout_width="match_parent"
- android:layout_height="@dimen/dynamic_grid_min_page_indicator_size"
+ android:layout_height="4dp"
+ android:layout_gravity="bottom|center_horizontal"
android:theme="@style/HomeScreenElementTheme" />
<include
@@ -63,6 +64,9 @@
android:layout_height="match_parent"
android:visibility="invisible" />
+ <include android:id="@+id/drag_indicator"
+ layout="@layout/drag_handle_indicator" />
+
<!-- DO NOT CHANGE THE ID -->
<include
android:id="@+id/hotseat"