-
Notifications
You must be signed in to change notification settings - Fork 870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widgets take up more space than needed #1752
Comments
Hey @Naudiz this is something mostly handled by the launcher you use. We just indicate the size of our widget and the launcher calculates the required grids. Not sure why it shows 5x2 whereas we can see 5x1 on other launchers. |
Hi @cmonfortep why this bug was closed without any further investigation? I have similar issue on Sony Xperia 1 III with native Sony Xperia Home Launcher and Android 12 |
@cmonfortep I recompiled project and located the bug is related to minHeight attribute
If set minHeight to 31dp then Sony Launcher set size of SearchBar widget to 5x1 |
@cmonfortep screenshots after set minHeight to 31dp Widget windowLauncher desk |
I will review the values on the minheight, thanks. If I'm not wrong, our small widget uses more than 31dp. |
I read Android article about widget on Android 12 -> Determine a size for your widget I made res/xml-v31/search_widget_info.xml for Android 12 and higher, where minHeight was replaced on targetCellHeight attribute that is work perfectly. If mix minHeight with targetCellHeight then Sony Launcher displays widget as 5x2 <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:initialKeyguardLayout="@layout/search_widget"
android:initialLayout="@layout/search_widget"
android:minWidth="314dp"
android:minResizeWidth="110dp"
android:targetCellHeight="1"
android:previewImage="@drawable/search_widget_preview"
android:resizeMode="horizontal"
android:updatePeriodMillis="86400000"
android:widgetCategory="home_screen|keyguard" /> |
This widget took up almost half of the screen size; it could also not be moved and/or resized. It also cluttered up all the icons to make room for itself. Along with its "smaller" companion widget, more than half the screen was unusable. After forcibly killing DuckDuckGo, and seeing the widgets persisting, the only remaining option was to uninstall it and reboot the phone. This from a long time DuckDuckGo user. Way to go folks. |
Hi @cmonfortep any updates? I provided to you a final solution year ago, why this issue is still closed? Could you re-open it? |
Describe the bug
Widgets take up too much space without the possibility to resize them to a smaller ratio. The simple search bar looks like a 5x1 widget, but demands 5x2 space on the home screen. The favorites widget has a preview picture that looks like a 5x2 widget, but takes up 5x3 space with a minimum of 2 favorites rows, opposed to the one row shown in the preview.
How to Reproduce
Simply place a widget on the homescreen.
Expected behavior
Search widget should have a space requirement of 5x1 only.
Favorites widget should be freely resizable with a minimum of 5x2 (search bar + one row of favorites, like in the preview)
Environment
The text was updated successfully, but these errors were encountered: