diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-05-09 20:43:21 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-06-08 15:00:09 -0700 |
commit | 3333b0ced8e6743c41909f6f6b916f1f9ec5a004 (patch) | |
tree | 7fd735821e3393a0dfe8691087f58ebbaa9dafae /res | |
parent | ab06999a70c773ffbc0aadaf938e0e90f8ca09b2 (diff) | |
download | android_packages_apps_Trebuchet-3333b0ced8e6743c41909f6f6b916f1f9ec5a004.tar.gz android_packages_apps_Trebuchet-3333b0ced8e6743c41909f6f6b916f1f9ec5a004.tar.bz2 android_packages_apps_Trebuchet-3333b0ced8e6743c41909f6f6b916f1f9ec5a004.zip |
Unifying focus indicator handling for workspace and all-apps
Adding an abstract FocusIndicatorHelper based on FocusIndicatorView
which draws the background instead of using a dummy view.
Change-Id: Id560195323d2ddad8fcd77ba675cf3f4fd4a94ab
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/focusable_view_bg.xml | 26 | ||||
-rw-r--r-- | res/layout-land/launcher.xml | 5 | ||||
-rw-r--r-- | res/layout-port/launcher.xml | 5 | ||||
-rw-r--r-- | res/layout-sw720dp/launcher.xml | 5 | ||||
-rw-r--r-- | res/layout/all_apps_icon.xml | 1 | ||||
-rw-r--r-- | res/layout/all_apps_prediction_bar_icon.xml | 1 | ||||
-rw-r--r-- | res/layout/user_folder.xml | 27 | ||||
-rw-r--r-- | res/layout/user_folder_icon_normalized.xml | 27 |
8 files changed, 14 insertions, 83 deletions
diff --git a/res/drawable/focusable_view_bg.xml b/res/drawable/focusable_view_bg.xml deleted file mode 100644 index e156513ef..000000000 --- a/res/drawable/focusable_view_bg.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - Copyright (C) 2011 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. ---> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - - <item android:state_focused="true"> - <shape android:shape="rectangle"> - <solid android:color="@color/focused_background" /> - </shape> - </item> - -</selector>
\ No newline at end of file diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml index 1147326f7..d193e2f6d 100644 --- a/res/layout-land/launcher.xml +++ b/res/layout-land/launcher.xml @@ -30,11 +30,6 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - <com.android.launcher3.FocusIndicatorView - android:id="@+id/focus_indicator" - android:layout_width="52dp" - android:layout_height="52dp" /> - <!-- The workspace contains 5 screens of cells --> <!-- DO NOT CHANGE THE ID --> <com.android.launcher3.Workspace diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml index fed99f331..527ed54ec 100644 --- a/res/layout-port/launcher.xml +++ b/res/layout-port/launcher.xml @@ -31,11 +31,6 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - <com.android.launcher3.FocusIndicatorView - android:id="@+id/focus_indicator" - android:layout_width="52dp" - android:layout_height="52dp" /> - <!-- The workspace contains 5 screens of cells --> <!-- DO NOT CHANGE THE ID --> <com.android.launcher3.Workspace diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml index 23e673cbf..184e688f3 100644 --- a/res/layout-sw720dp/launcher.xml +++ b/res/layout-sw720dp/launcher.xml @@ -30,11 +30,6 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - <com.android.launcher3.FocusIndicatorView - android:id="@+id/focus_indicator" - android:layout_width="52dp" - android:layout_height="52dp" /> - <!-- The workspace contains 5 screens of cells --> <!-- DO NOT CHANGE THE ID --> <com.android.launcher3.Workspace diff --git a/res/layout/all_apps_icon.xml b/res/layout/all_apps_icon.xml index bb95c5fb8..3836fed89 100644 --- a/res/layout/all_apps_icon.xml +++ b/res/layout/all_apps_icon.xml @@ -24,6 +24,5 @@ android:paddingTop="@dimen/all_apps_icon_top_bottom_padding" android:paddingBottom="@dimen/all_apps_icon_top_bottom_padding" android:focusable="true" - android:background="@drawable/focusable_view_bg" launcher:iconDisplay="all_apps" /> diff --git a/res/layout/all_apps_prediction_bar_icon.xml b/res/layout/all_apps_prediction_bar_icon.xml index f15aeaf75..295b0b708 100644 --- a/res/layout/all_apps_prediction_bar_icon.xml +++ b/res/layout/all_apps_prediction_bar_icon.xml @@ -24,6 +24,5 @@ android:paddingTop="@dimen/all_apps_prediction_icon_top_padding" android:paddingBottom="@dimen/all_apps_prediction_icon_bottom_padding" android:focusable="true" - android:background="@drawable/focusable_view_bg" launcher:iconDisplay="all_apps" /> diff --git a/res/layout/user_folder.xml b/res/layout/user_folder.xml index 8a1b7d0f3..d95075058 100644 --- a/res/layout/user_folder.xml +++ b/res/layout/user_folder.xml @@ -22,27 +22,14 @@ android:elevation="5dp" android:orientation="vertical" > - <FrameLayout - android:id="@+id/folder_content_wrapper" + <com.android.launcher3.folder.FolderPagedView + android:id="@+id/folder_content" android:layout_width="match_parent" - android:layout_height="match_parent" > - - <!-- Actual size of the indicator doesn't matter as it is scaled to match the view size --> - - <com.android.launcher3.FocusIndicatorView - android:id="@+id/focus_indicator" - android:layout_width="20dp" - android:layout_height="20dp" /> - - <com.android.launcher3.folder.FolderPagedView - android:id="@+id/folder_content" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:paddingLeft="4dp" - android:paddingRight="4dp" - android:paddingTop="8dp" - launcher:pageIndicator="@+id/folder_page_indicator" /> - </FrameLayout> + android:layout_height="match_parent" + android:paddingLeft="4dp" + android:paddingRight="4dp" + android:paddingTop="8dp" + launcher:pageIndicator="@+id/folder_page_indicator" /> <LinearLayout android:id="@+id/folder_footer" diff --git a/res/layout/user_folder_icon_normalized.xml b/res/layout/user_folder_icon_normalized.xml index de1316ebb..bb6bd765b 100644 --- a/res/layout/user_folder_icon_normalized.xml +++ b/res/layout/user_folder_icon_normalized.xml @@ -22,27 +22,14 @@ android:elevation="5dp" android:orientation="vertical" > - <FrameLayout - android:id="@+id/folder_content_wrapper" + <com.android.launcher3.folder.FolderPagedView + android:id="@+id/folder_content" android:layout_width="match_parent" - android:layout_height="match_parent" > - - <!-- Actual size of the indicator doesn't matter as it is scaled to match the view size --> - - <com.android.launcher3.FocusIndicatorView - android:id="@+id/focus_indicator" - android:layout_width="20dp" - android:layout_height="20dp" /> - - <com.android.launcher3.folder.FolderPagedView - android:id="@+id/folder_content" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:paddingLeft="8dp" - android:paddingRight="8dp" - android:paddingTop="8dp" - launcher:pageIndicator="@+id/folder_page_indicator" /> - </FrameLayout> + android:layout_height="match_parent" + android:paddingLeft="8dp" + android:paddingRight="8dp" + android:paddingTop="8dp" + launcher:pageIndicator="@+id/folder_page_indicator" /> <LinearLayout android:id="@+id/folder_footer" |