diff options
| author | 2023-09-14 16:25:18 -0700 | |
|---|---|---|
| committer | 2023-09-14 16:25:18 -0700 | |
| commit | 369287f575566fda8d2173f3dc76c3388fea18a5 (patch) | |
| tree | 0cf19bd0ebba48f513fd7f61dddd632822e0feee /java/src | |
| parent | 585df3df6d2dd7a7b65fa2b164637cad91b0edfb (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
Change-Id: I6111fd214075646832e667a84d2ea9ada7626536
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) { |