diff options
author | 2023-09-14 16:25:18 -0700 | |
---|---|---|
committer | 2023-09-17 00:12:00 +0000 | |
commit | a509ca0b4f1f4621394f7c951842f11bdfc7e3bf (patch) | |
tree | b8ba7eb8eb355917a1fc515fa9a782fd7168288c /java/src | |
parent | 612699ebe9b85888eba873fadf95ac86ac015481 (diff) |
Make chooser full-width in phone-portrait orientation
Max Chooser width for phones increased based on Pixel 6/7 pro dimensions
and max configurable display density (System Settings -> Display ->
Dispaly size and text).
Fix: 297980420
Test: visual testing on a phone and tablet with various display settings
Merged-In: I6111fd214075646832e667a84d2ea9ada7626536
Change-Id: I6111fd214075646832e667a84d2ea9ada7626536
(cherry picked from commit 369287f575566fda8d2173f3dc76c3388fea18a5)
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/intentresolver/grid/ChooserGridAdapter.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/src/com/android/intentresolver/grid/ChooserGridAdapter.java b/java/src/com/android/intentresolver/grid/ChooserGridAdapter.java index 77ae20f5..fadea934 100644 --- a/java/src/com/android/intentresolver/grid/ChooserGridAdapter.java +++ b/java/src/com/android/intentresolver/grid/ChooserGridAdapter.java @@ -164,8 +164,10 @@ public final class ChooserGridAdapter extends RecyclerView.Adapter<RecyclerView. return false; } - // Limit width to the maximum width of the chooser activity - width = Math.min(mChooserWidthPixels, width); + // Limit width to the maximum width of the chooser activity, if the maximum width is set + if (mChooserWidthPixels >= 0) { + width = Math.min(mChooserWidthPixels, width); + } int newWidth = width / mMaxTargetsPerRow; if (newWidth != mChooserTargetWidth) { |