Merge "Fix few UI bugs in widget picker." into sc-dev am: af4806067f
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14199562 Change-Id: Ib3053504efc0c96bdfb8892bef6f2cd482fc40a0
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2021, 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:color="@android:color/system_neutral1_800" />
|
||||
</selector>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2021, 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:color="@android:color/system_neutral1_500" android:lStar="98"/>
|
||||
</selector>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2021, 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:color="?android:attr/colorBackgroundFloating" />
|
||||
</selector>
|
||||
@@ -30,7 +30,7 @@
|
||||
</item>
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?android:attr/colorBackground" />
|
||||
<solid android:color="@color/widgets_picker_surface" />
|
||||
<corners
|
||||
android:topLeftRadius="@dimen/widget_list_content_corner_radius"
|
||||
android:topRightRadius="@dimen/widget_list_content_corner_radius"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?android:attr/colorBackground" />
|
||||
<solid android:color="@color/widgets_picker_surface" />
|
||||
<corners
|
||||
android:topLeftRadius="@dimen/widget_list_content_corner_radius"
|
||||
android:topRightRadius="@dimen/widget_list_content_corner_radius"
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</item>
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?android:attr/colorBackground" />
|
||||
<solid android:color="@color/widgets_picker_surface" />
|
||||
<corners
|
||||
android:topLeftRadius="@dimen/widget_list_top_bottom_corner_radius"
|
||||
android:topRightRadius="@dimen/widget_list_top_bottom_corner_radius"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="?android:attr/colorBackground" />
|
||||
<solid android:color="@color/widgets_picker_surface" />
|
||||
<corners
|
||||
android:topLeftRadius="@dimen/widget_list_top_bottom_corner_radius"
|
||||
android:topRightRadius="@dimen/widget_list_top_bottom_corner_radius"
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
**
|
||||
** Copyright 2021, 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 android:shape="rectangle"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/widgets_picker_surface" />
|
||||
<corners android:radius="@dimen/widget_list_top_bottom_corner_radius"/>
|
||||
</shape>
|
||||
@@ -25,7 +25,7 @@
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?android:attr/colorBackgroundFloating"
|
||||
android:background="?android:attr/colorBackground"
|
||||
android:elevation="4dp">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:orientation="vertical">
|
||||
android:orientation="vertical"
|
||||
android:clipToPadding="false">
|
||||
<View
|
||||
android:id="@+id/collapse_handle"
|
||||
android:layout_width="48dp"
|
||||
@@ -44,6 +45,8 @@
|
||||
android:id="@+id/recommended_widget_table"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/widgets_recommendation_background"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:visibility="gone" />
|
||||
android:visibility="gone"/>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
android:id="@+id/widgets_list_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:background="@drawable/widgets_list_middle_ripple"
|
||||
android:layout_marginBottom="@dimen/widget_list_entry_bottom_margin"
|
||||
android:paddingVertical="@dimen/widget_list_header_view_vertical_padding"
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
android:id="@+id/widgets_table"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="8dp"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:background="@drawable/widgets_list_middle_ripple"
|
||||
android:layout_marginBottom="@dimen/widget_list_entry_bottom_margin"/>
|
||||
|
||||
@@ -181,8 +181,8 @@ public class WidgetsDiffReporter {
|
||||
}
|
||||
if (newRow instanceof WidgetsListSearchHeaderEntry
|
||||
&& curRow instanceof WidgetsListSearchHeaderEntry) {
|
||||
return ((WidgetsListSearchHeaderEntry) newRow).hasEntryUpdated()
|
||||
|| !curRow.equals(newRow);
|
||||
// Always refresh search header entries to reset rounded corners in their view holder.
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user