Skip to content

Can't resize Target widget to 2x1 #2118

@ezio-melotti

Description

@ezio-melotti

Pre-submission checklist

  • I am submitting a bug report, not a feature request.
  • I have searched for similar issues, but did not find any matches.

Description

I used to have (and in fact still do) several 2x1 (width 2, height 1) Target widgets. Today I accidentally resized one, and I am now unable to bring it back to 2x1, even though it allows me to set it to 1x2 (width 1, height 2). Creating a new target widget only allows for 1x2, and it's also marked as such in the widget select screen (see screenshots below).

In addition -- and the reason I reported this as a bug and not a feature request -- the widget is unreadable as 1x2 (see attached screenshot) but looks fine as 2x1.

Steps to reproduce

  1. Long press the home screen and select "Add widget"
  2. Select "Habits" and the "Target" widget
  3. Place it on the home screen and try to resize it to 2x1

Alternatively, if the Target widget is already on the home screen:

  1. Long press the widget
  2. Try to resize it by dragging the borders

System information

  • Phone: Samsung S23
  • Phone Operating System: Android 14, One UI 6.1
  • App version: 2.2.1

Additional details

I found a few related discussions and a closed issue:

In summary, it seems that:

  • The widgets were initially designed with a minimum size limit (2x2?) because the content would have been to difficult to see otherwise (at least on old phones with small screen resolution);
  • Samsung One UI didn't respect the minimum size limit and allowed users to set smaller sizes, and this worked fine for several widgets despite the restrictions (probably on phones with higher screen resolution);
  • At some point, Samsung started respecting the minimum size limit, forcing the users to have bigger widgets (unless they had already set them to a smaller size before the update);
  • In minimum widget sizes #835 (comment) @iSoron seems to agree on removing the size limits.

I'm not familiar with Android development, but by looking at the code and the changes in #1514 I noticed that:

  • The Checkmark widget (which allows 1x1) has minHeight/minWidth of 40dp:
    <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
    android:minHeight="40dp"
    android:minWidth="40dp"
  • The Target widget has minHeight/minWidth/minResizeHeight/minResizeWidth of 80dp (seemingly implying 2x2):
    <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
    android:minHeight="80dp"
    android:minWidth="80dp"
    android:minResizeWidth="80dp"
    android:minResizeHeight="80dp"
  • The targetCellWidth/targetCellHeight are not set (not sure if they are useful though);
  • Despite both sizes being set to 80dp, the OS shows the size as 1x2, even though the initial intention seems to have been having 2x2 as minimum size.

Note that this likely applies to other widgets as well -- I only tested it with the Target widget and since I has some "old" widgets still set to 2x1 I can confirm that the widget works fine as 2x1 (something I can't confirm for the other widgets -- but see e.g. #1625 for the Streak widget).

In addition, if updating the minHeight/minResizeHeight to 40dp is enough to fix the issue, I can create a PR to do that, but I won't be able to test it locally.

Screenshots

This shows two "old" 2x1 widgets on the left, and a "new" 1x2 widget on the right:
Image

This shows the widget selection screen, with the Target widget marked as 1x2:
Image

TL;DR

The devs wanted to set the minimum widget size to 2x2, the users wanted to (and could) set it to 2x1/1x1 (and it worked fine), Samsung now wants to force them to use 1x2 as minimum size (which doesn't quite work).

Removing the minimum size limit should make everyone happy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions