diff --git a/res/drawable/bg_widgets_header_large_screen.xml b/res/drawable/bg_widgets_header_two_pane.xml similarity index 100% rename from res/drawable/bg_widgets_header_large_screen.xml rename to res/drawable/bg_widgets_header_two_pane.xml diff --git a/res/layout/widgets_list_row_header_two_pane.xml b/res/layout/widgets_list_row_header_two_pane.xml index 6465db593e..c0a6ea8226 100644 --- a/res/layout/widgets_list_row_header_two_pane.xml +++ b/res/layout/widgets_list_row_header_two_pane.xml @@ -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" > @@ -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" /> @@ -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" /> diff --git a/res/layout/widgets_full_sheet_paged_view_large_screen.xml b/res/layout/widgets_two_pane_sheet_paged_view.xml similarity index 96% rename from res/layout/widgets_full_sheet_paged_view_large_screen.xml rename to res/layout/widgets_two_pane_sheet_paged_view.xml index f729981d3d..5cc24068fd 100644 --- a/res/layout/widgets_full_sheet_paged_view_large_screen.xml +++ b/res/layout/widgets_two_pane_sheet_paged_view.xml @@ -17,7 +17,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> @@ -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"> @@ -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"> diff --git a/res/layout/widgets_full_sheet_recyclerview_large_screen.xml b/res/layout/widgets_two_pane_sheet_recyclerview.xml similarity index 94% rename from res/layout/widgets_full_sheet_recyclerview_large_screen.xml rename to res/layout/widgets_two_pane_sheet_recyclerview.xml index 8fef303ca9..09cef88543 100644 --- a/res/layout/widgets_full_sheet_recyclerview_large_screen.xml +++ b/res/layout/widgets_two_pane_sheet_recyclerview.xml @@ -17,7 +17,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> @@ -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"> @@ -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"> diff --git a/res/values-sw720dp-land/dimens.xml b/res/values-sw720dp-land/dimens.xml index b89910dede..4d0ac383d3 100644 --- a/res/values-sw720dp-land/dimens.xml +++ b/res/values-sw720dp-land/dimens.xml @@ -31,7 +31,7 @@ 49dp - 24dp + 24dp 0dp diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 68e668f704..923883b5f0 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -193,7 +193,7 @@ 20dp 2dp 16dp - 24dp + 24dp 0.5dp 1dp diff --git a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java index 2325376ebb..46cfb3c096 100644 --- a/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java +++ b/src/com/android/launcher3/widget/picker/WidgetsFullSheet.java @@ -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 { diff --git a/src/com/android/launcher3/widget/picker/WidgetsTwoPaneSheet.java b/src/com/android/launcher3/widget/picker/WidgetsTwoPaneSheet.java index 46aae9d425..d85737b28f 100644 --- a/src/com/android/launcher3/widget/picker/WidgetsTwoPaneSheet.java +++ b/src/com/android/launcher3/widget/picker/WidgetsTwoPaneSheet.java @@ -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();