Rename widgets two pane sheet layout files and spec files to more fitting name

Currently the names used for widgets two pane sheet files are similar to full sheet files, just with "_large_screen" added to it. This is not a good name as it can cause confusion. The new name includes "_two_pane" which is more indicative of the actual functionality of these files.

Fix: 276917926
Test: verify widget picker two pane still works
Change-Id: I23cf2a20fc137cc3e99c5fdc90100648a0926368
This commit is contained in:
fbaron
2023-04-04 09:48:44 -07:00
parent 9529f08b1b
commit 55fed64ced
9 changed files with 21 additions and 21 deletions

View File

@@ -24,7 +24,7 @@
android:focusable="true"
launcher:appIconSize="48dp"
android:descendantFocusability="afterDescendants"
android:background="@drawable/bg_widgets_header_large_screen" >
android:background="@drawable/bg_widgets_header_two_pane" >
<ImageView
android:id="@+id/app_icon"

View File

@@ -42,7 +42,7 @@
android:layout_marginTop="24dp"
android:gravity="center_horizontal"
android:layout_below="@id/collapse_handle"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:text="@string/widget_button_text"
android:textColor="?android:attr/textColorSecondary"
android:textSize="24sp" />
@@ -76,7 +76,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:visibility="gone" />
</FrameLayout>
@@ -85,8 +85,8 @@
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.67"
android:layout_marginEnd="@dimen/widget_list_horizontal_margin_large_screen"
android:paddingTop="@dimen/widget_list_horizontal_margin_large_screen"
android:layout_marginEnd="@dimen/widget_list_horizontal_margin_two_pane"
android:paddingTop="@dimen/widget_list_horizontal_margin_two_pane"
android:gravity="end"
android:layout_gravity="end"
android:orientation="horizontal">
@@ -118,7 +118,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal=
"@dimen/widget_list_horizontal_margin_large_screen"
"@dimen/widget_list_horizontal_margin_two_pane"
android:visibility="gone" />
</LinearLayout>
</ScrollView>

View File

@@ -17,7 +17,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<FrameLayout
android:id="@+id/widgets_full_sheet_paged_view_large_screen"
android:id="@+id/widgets_two_pane_sheet_paged_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start"
@@ -29,7 +29,7 @@
android:layout_height="match_parent"
android:clipToPadding="false"
android:descendantFocusability="afterDescendants"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
launcher:pageIndicator="@+id/tabs" >
<com.android.launcher3.widget.picker.WidgetsRecyclerView
@@ -62,7 +62,7 @@
android:clipToPadding="false"
android:elevation="0.1dp"
android:paddingBottom="8dp"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
launcher:layout_sticky="true">
<include layout="@layout/widgets_search_bar" />
@@ -73,7 +73,7 @@
android:layout_height="match_parent"
android:id="@+id/suggestions_header"
android:layout_marginTop="8dp"
android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:orientation="horizontal">
</LinearLayout>
@@ -84,7 +84,7 @@
android:gravity="center_horizontal"
android:orientation="horizontal"
android:paddingVertical="8dp"
android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:background="?android:attr/colorBackground"
style="@style/TextHeadline"
launcher:layout_sticky="true">

View File

@@ -17,7 +17,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
<FrameLayout
android:id="@+id/widgets_full_sheet_recyclerview_large_screen"
android:id="@+id/widgets_two_pane_sheet_recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="start"
@@ -28,7 +28,7 @@
android:id="@+id/primary_widgets_list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:clipToPadding="false" />
<!-- SearchAndRecommendationsView without the tab layout as well -->
@@ -47,7 +47,7 @@
android:clipToPadding="false"
android:elevation="0.1dp"
android:paddingBottom="8dp"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
android:paddingHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
launcher:layout_sticky="true">
<include layout="@layout/widgets_search_bar" />
@@ -58,7 +58,7 @@
android:layout_height="match_parent"
android:id="@+id/suggestions_header"
android:layout_marginTop="8dp"
android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_large_screen"
android:layout_marginHorizontal="@dimen/widget_list_horizontal_margin_two_pane"
android:orientation="horizontal">
</LinearLayout>
</com.android.launcher3.views.StickyHeaderLayout>

View File

@@ -31,7 +31,7 @@
<!-- Widget picker-->
<dimen name="widget_list_horizontal_margin">49dp</dimen>
<dimen name="widget_list_horizontal_margin_large_screen">24dp</dimen>
<dimen name="widget_list_horizontal_margin_two_pane">24dp</dimen>
<!-- Bottom sheet-->
<dimen name="bottom_sheet_extra_top_padding">0dp</dimen>

View File

@@ -193,7 +193,7 @@
<dimen name="widget_list_header_view_vertical_padding">20dp</dimen>
<dimen name="widget_list_entry_spacing">2dp</dimen>
<dimen name="widget_list_horizontal_margin">16dp</dimen>
<dimen name="widget_list_horizontal_margin_large_screen">24dp</dimen>
<dimen name="widget_list_horizontal_margin_two_pane">24dp</dimen>
<dimen name="widget_preview_shadow_blur">0.5dp</dimen>
<dimen name="widget_preview_key_shadow_distance">1dp</dimen>

View File

@@ -688,7 +688,7 @@ public class WidgetsFullSheet extends BaseWidgetSheet
WidgetsFullSheet sheet;
if (isTwoPane) {
sheet = (WidgetsTwoPaneSheet) launcher.getLayoutInflater().inflate(
R.layout.widgets_full_sheet_large_screen,
R.layout.widgets_two_pane_sheet,
launcher.getDragLayer(),
false);
} else {

View File

@@ -64,7 +64,7 @@ public class WidgetsTwoPaneSheet extends WidgetsFullSheet {
0,
view.getMeasuredWidth(),
view.getMeasuredHeight() - getResources().getDimensionPixelSize(
R.dimen.widget_list_horizontal_margin_large_screen),
R.dimen.widget_list_horizontal_margin_two_pane),
view.getResources().getDimensionPixelSize(
R.dimen.widget_list_top_bottom_corner_radius)
);
@@ -91,8 +91,8 @@ public class WidgetsTwoPaneSheet extends WidgetsFullSheet {
LayoutInflater layoutInflater = LayoutInflater.from(getContext());
int contentLayoutRes = mHasWorkProfile ? R.layout.widgets_full_sheet_paged_view_large_screen
: R.layout.widgets_full_sheet_recyclerview_large_screen;
int contentLayoutRes = mHasWorkProfile ? R.layout.widgets_two_pane_sheet_paged_view
: R.layout.widgets_two_pane_sheet_recyclerview;
layoutInflater.inflate(contentLayoutRes, findViewById(R.id.recycler_view_container), true);
setupViews();