diff options
author | Winson <winsonc@google.com> | 2016-07-11 18:59:18 -0700 |
---|---|---|
committer | Peter Schiller <peterschiller@google.com> | 2016-07-12 12:16:26 -0700 |
commit | b655b8850064cc4f8e59652b4e3bffc09090769a (patch) | |
tree | 35903c193119dbea9f704ad0449f45398ffd1d3e /res | |
parent | 7ed42af3398c1764424ebbf2dd6e2a51e05eaf5f (diff) | |
download | android_packages_apps_Trebuchet-b655b8850064cc4f8e59652b4e3bffc09090769a.tar.gz android_packages_apps_Trebuchet-b655b8850064cc4f8e59652b4e3bffc09090769a.tar.bz2 android_packages_apps_Trebuchet-b655b8850064cc4f8e59652b4e3bffc09090769a.zip |
Cleaning up scrollbar logic to properly calculate stable extents.
- Removing old logic which assumed that views were the same size,
especially now we can have variable dividers, etc.
- Simplifying old scroll position logic.
- Removing unnecessary prediction icon layout (same as normal icon)
Bug: 30023608
Change-Id: I39e1126fa586a76a9bdd3ff38cd6e360ac3021e6
Diffstat (limited to 'res')
-rw-r--r-- | res/drawable/all_apps_divider.xml | 20 | ||||
-rw-r--r-- | res/drawable/all_apps_search_divider.xml | 20 | ||||
-rw-r--r-- | res/layout/all_apps_divider.xml | 15 | ||||
-rw-r--r-- | res/layout/all_apps_search_divider.xml (renamed from res/layout/all_apps_prediction_bar_icon.xml) | 19 | ||||
-rw-r--r-- | res/values/dimens.xml | 1 |
5 files changed, 56 insertions, 19 deletions
diff --git a/res/drawable/all_apps_divider.xml b/res/drawable/all_apps_divider.xml new file mode 100644 index 000000000..3fe529556 --- /dev/null +++ b/res/drawable/all_apps_divider.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2016 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. +--> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="@color/all_apps_divider_color" /> + <size android:height="1dp" /> +</shape>
\ No newline at end of file diff --git a/res/drawable/all_apps_search_divider.xml b/res/drawable/all_apps_search_divider.xml new file mode 100644 index 000000000..99905e423 --- /dev/null +++ b/res/drawable/all_apps_search_divider.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2016 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. +--> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <solid android:color="?android:attr/colorAccent" /> + <size android:height="1dp" /> +</shape>
\ No newline at end of file diff --git a/res/layout/all_apps_divider.xml b/res/layout/all_apps_divider.xml index b2ee7c1b4..1eaf685c4 100644 --- a/res/layout/all_apps_divider.xml +++ b/res/layout/all_apps_divider.xml @@ -13,13 +13,14 @@ See the License for the specific language governing permissions and limitations under the License. --> -<View xmlns:android="http://schemas.android.com/apk/res/android" +<ImageView xmlns:android="http://schemas.android.com/apk/res/android" android:importantForAccessibility="no" android:layout_width="match_parent" - android:layout_height="@dimen/all_apps_divider_height" - android:layout_marginBottom="@dimen/all_apps_divider_margin_vertical" - android:layout_marginLeft="@dimen/container_fastscroll_thumb_max_width" - android:layout_marginRight="@dimen/container_fastscroll_thumb_max_width" - android:layout_marginTop="@dimen/all_apps_divider_margin_vertical" - android:background="@color/all_apps_divider_color" + android:layout_height="wrap_content" + android:paddingTop="@dimen/all_apps_divider_margin_vertical" + android:paddingBottom="@dimen/all_apps_divider_margin_vertical" + android:paddingLeft="@dimen/container_fastscroll_thumb_max_width" + android:paddingRight="@dimen/container_fastscroll_thumb_max_width" + android:src="@drawable/all_apps_divider" + android:scaleType="fitXY" android:focusable="false" />
\ No newline at end of file diff --git a/res/layout/all_apps_prediction_bar_icon.xml b/res/layout/all_apps_search_divider.xml index 3836fed89..d2ef691ea 100644 --- a/res/layout/all_apps_prediction_bar_icon.xml +++ b/res/layout/all_apps_search_divider.xml @@ -13,16 +13,13 @@ See the License for the specific language governing permissions and limitations under the License. --> -<com.android.launcher3.BubbleTextView - xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:launcher="http://schemas.android.com/apk/res-auto" - style="@style/Icon.AllApps" - android:id="@+id/icon" +<ImageView xmlns:android="http://schemas.android.com/apk/res/android" + android:importantForAccessibility="no" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_gravity="center" - android:paddingTop="@dimen/all_apps_icon_top_bottom_padding" - android:paddingBottom="@dimen/all_apps_icon_top_bottom_padding" - android:focusable="true" - launcher:iconDisplay="all_apps" /> - + android:paddingBottom="@dimen/all_apps_divider_margin_vertical" + android:paddingLeft="@dimen/container_fastscroll_thumb_max_width" + android:paddingRight="@dimen/container_fastscroll_thumb_max_width" + android:src="@drawable/all_apps_search_divider" + android:scaleType="fitXY" + android:focusable="false" />
\ No newline at end of file diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 9abe3e601..1775d098f 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -80,7 +80,6 @@ <dimen name="all_apps_header_scroll_to_elevation">16dp</dimen> <dimen name="all_apps_header_shadow_height">6dp</dimen> - <dimen name="all_apps_divider_height">1dp</dimen> <dimen name="all_apps_divider_margin_vertical">8dp</dimen> <dimen name="all_apps_bezel_swipe_height">24dp</dimen> |