summaryrefslogtreecommitdiffstats
path: root/res/layout
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-03-26 12:10:31 -0700
committerSunny Goyal <sunnygoyal@google.com>2018-03-26 15:52:03 -0700
commit81b4c7bb3c76f5f83848d536b1783e0aa75ace0d (patch)
treef43bbe3e28f9e22175ee0f8d04cdb99ba1829e7c /res/layout
parent864ae5a2b39fe2b756bb2b28a672598dc88fa2ed (diff)
downloadandroid_packages_apps_Trebuchet-81b4c7bb3c76f5f83848d536b1783e0aa75ace0d.tar.gz
android_packages_apps_Trebuchet-81b4c7bb3c76f5f83848d536b1783e0aa75ace0d.tar.bz2
android_packages_apps_Trebuchet-81b4c7bb3c76f5f83848d536b1783e0aa75ace0d.zip
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
Diffstat (limited to 'res/layout')
-rw-r--r--res/layout/drag_handle_indicator.xml23
-rw-r--r--res/layout/hotseat.xml9
-rw-r--r--res/layout/launcher.xml6
3 files changed, 28 insertions, 10 deletions
diff --git a/res/layout/drag_handle_indicator.xml b/res/layout/drag_handle_indicator.xml
new file mode 100644
index 000000000..d5a7b8a03
--- /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 01cd92a63..00f0b5ff8 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 4693917e5..a4acf06be 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"