Skip to content
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

Small widget has only one button #136

Closed
3 tasks done
KraXen72 opened this issue May 24, 2022 · 32 comments
Closed
3 tasks done

Small widget has only one button #136

KraXen72 opened this issue May 24, 2022 · 32 comments
Labels
enhancement New feature or request

Comments

@KraXen72
Copy link

Describe the feature you want to implement:

small widget only has one button:
Screenshot_20220524-090004_Niagara Launcher.png. this is pretty limiting.
i think atleast a forward and back buttons would fit, like in the notification:
Screenshot_20220524-090844_GitHub.png

Is your feature request related to a problem? Please describe:

small widget is annoying to use

Do other music players handle this? If so, how?

Oto music(sorry for big screenshot):
Screenshot_20220524-091220_Gallery.png

Why do you think this will improve everyone's usage of Auxio?

ease of use/ux

Due Diligence:

@KraXen72 KraXen72 added the enhancement New feature or request label May 24, 2022
@OxygenCobalt
Copy link
Owner

That's odd. That widget is what the app calls the "tiny" widget, which was designed solely to be an edge case for landscape or exceptionally small screens.

How many tiles have you configured Auxio's widget with, and how many tiles did you configure Oto Music's widget with? I could possibly narrow it down from there further.

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented May 24, 2022

Also, Oto may not be the right comparison here to use. Most music apps (like Oto) use multiple widgets for different sizing configurations. This is not ideal, because as soon as you resize a widget beyond it's intended sizing, it looks terrible.

Auxio tries to leverage new android APIs to cram all those widget sizings into a single adaptive widget, but there are a lot of edge-cases where that breaks down (mostly because the widget API was designed for phones in 2011 and is basically unusable for modern apps).

Can you try this new APK? Rename it from ZIP. I tried to rework it to have more buttons, like the Oto one you showed. No guarantees this works to your liking. If I trigger this layout on my phone (using the launcher in landscape mode), it ends up squishing the buttons.

app-debug.zip

@KraXen72
Copy link
Author

did try debug apk, no change at all.
evev tried fill screen widget option. i am using niagara launcher, no idea how many tiles it allocates to a widget but i could fit a KWGT 4x4 widget without a problem.
Screenshot_20220524-224236_Niagara Launcher.png

@KraXen72
Copy link
Author

fully uninstalled and reinstalled, now it works really wellScreenshot_20220524-225146_Niagara Launcher.png

@KraXen72
Copy link
Author

KraXen72 commented May 24, 2022

would be a fan of an option to not use app theme on widget, because the contrast is,,, interesting to say the least and it doesen't fit. (i know it would fit if i didn't cheese the wallpaper theming to get nice colors with a gray wallpaper, but still)
some options that come to mind:

  1. just full white icons and text on widget regardless
  2. just use the bg color from the app as widget bg, not the accented bg
  3. both of the above

also making the center play/pause button circle would be nice.
so this is kind of how it would look:
image
padding consistend over sides, icons good size, main icon in circle

@KraXen72
Copy link
Author

also if i make it normal height and not super fat, the icons are invisible. would suggest a minimal size for the icons to be what it is in the above comment
Screenshot_20220524-225539_Niagara Launcher.png

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented May 24, 2022

Sigh, exactly what I thought would happen :(

@KraXen72, Would you be okay if I removed the title and artist from the widget, like the other short widgets? This is really the only way to resolve the button size issue.

As for the button contrast, none of the other widgets really use that, so it would feel a bit inconsistent. I don't think I'll add that.

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented May 24, 2022

Here's another debug APK with an alternative widget design. Can you confirm that it works well?

app-debug.zip

@KraXen72
Copy link
Author

this is better.
Screenshot_20220525-071944_Niagara Launcher.png
here atleast the song title could fit, if buttons moved down a tiny bit

Screenshot_20220525-072015_Niagara Launcher.png
and here, in largest small size, both Title and artist could fit imo, but definitely atleast the title.

if you need to use a separate widget for small and big, fine by me.

@KraXen72
Copy link
Author

KraXen72 commented May 25, 2022

i checked the layout bounds for the small widget and i think if you removed top margin for the icons, and added text with only top margin, it would definitely fit.
Screenshot_20220525-072646_Niagara Launcher.png

so it would be like:

padding/margin
songtitle
icongroup
padding/margin

@KraXen72
Copy link
Author

also, app color scheme doesent apply to the widget, the widget is always dynamic color scheme. i tried restarting both app and launcher to no avail

@KraXen72
Copy link
Author

sorry if unrelated the debug app froze with the bird icon (im assuming some debug mode thing) and found a memory leak.
Screenshot_20220525-073807_Auxio Debug.png

@OxygenCobalt
Copy link
Owner

Okay @KraXen72, this is a lot to unpack.

  1. Good that the layout finally works. Sadly, due to the wide variation of screen sizes and widget cells, I can't assume that there is always enough space for a title and artist. As a result, I've forgone them.
  2. The color scheme not applying to widgets is entirely intentional. You cannot properly theme widgets with the limited APIs widgets provide to you, so I decided to theme them based on either dynamic colors on Android 12, or the default color scheme on older devices.
  3. That memory leak is completely unrelated and is probably due to some stupid things I do with the menus in Auxio.

I think this issue is solved enough to be resolved now. I'm quite sorry I could not implement everything you wanted, but again, the widget API is terribly designed and I can't believe that they haven't replaced it yet with something better.

@KraXen72
Copy link
Author

okay. thanks.
i played around with the widget and really liked conformation;
Screenshot_20220525-150043_Niagara Launcher.png
would be somehow possible to have this without the album cover? maybe as a separate widget or something?
i reliazed i would much rather see the title and artist + these controls, than the album cover in the minimal widget. (fine by me if you even replace the minimal widget with this, just please, this is so much better than just having controls and trying to guess the song from the album cover...)

@KraXen72
Copy link
Author

like this for the small widget: Screenshot_20220525-150553_Niagara Launcher.png
possibly reduce padding if wouldn't fit or worst case remove artist if too small.

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented May 25, 2022

I don't think I can do that.

The padding is there in the first place because of the widget's rounded corners. If I were to reduce it, the widget may start clipping with the rounded corners. As a result, I simply cannot ensure that there is enough space in all situations and that the buttons will not be crushed. This is the same reason why some of the other types of widgets only show an album cover, there just isn't enough space in all cases.

@OxygenCobalt
Copy link
Owner

Also, since I have no way to trigger your specific widget sizing, I can't add an in-between widget with more information.

@KraXen72
Copy link
Author

KraXen72 commented May 25, 2022

Also, since I have no way to trigger your specific widget sizing, I can't add an in-between widget with more information.

you could test it on niagara launcher, but i understand if that's too much work. however, i still find the current widget state quite unsatisfactory.
let me make a mockup where only new stuff get's added as the widget is bigger.

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented May 25, 2022

I have no idea if Niagara Launcher is using the new Android 12 widget sizing mechanism or not. If they aren't, then Auxio backports the responsive behavior in an inferior way.

To elaborate further, I can't just tell Android "use this widget if it's 2x1 cells". I have to separate them into "size buckets" of precise dimensions, in which I have to balance:

  • Widget sizing on older devices with the responsiveness hack
  • Widget sizing on Android 12
  • A variety of grid layouts and grid sizing across launchers and configuration settings
  • A variety of screen sizes which can change the dimensions of the same grid size
  • All of the edge cases where the prior conditions intersect

As a result, I just separate widget layouts into vague forms that may not have desirable amount of information (such as just a cover) so that they work across the whole sizing range that Android will use the layout in.

It doesn't have to be this way. For example, iOS widgets just give the app a canvas to draw on and it's dimensions. The app then lays out and draws their own views. That would be far easier to work with since I can measure exact dimensions and add/remove/move elements at will. I can't believe android widgets don't do the same.

@KraXen72
Copy link
Author

thanks for explaining this. here are my mockups, i tried to make them so they could easily work across sizes:
widgets1
would this be doable?
inbetween medium and large would be whatever is currently, where there is a small album cover that gets larger and larger until large.

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented May 25, 2022

  • For the widget designs as a whole, I still think such sizing is still too precise for me to fully implement them.
  • I might be able to implement the one-line design. However, I've phased out the use of a divider to put two types of metadata on one line, and I couldn't style the text in that way, even if I wanted to.

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented May 25, 2022

Okay, I've tried out Niagara Launcher. I now somewhat understand where you're coming from. The way Niagara allows you to resize widgets really is unlike the rest of Android though. Most launchers use a grid, while Niagara allows precise resizing. I can't think of a way I can feasibly rework Auxio widgets to accommodate this unorthodox launcher model while still working well on the vast majority of grid-based launchers.

I am extremely sorry about this, but I will be keeping the current widget layouts and locking this discussion. There is simply no way I can improve this. My only choices are either more controls and less metadata, or more metadata and less controls. Any other in-between solution is highly inconsistent or mangles the layout.

Repository owner locked as resolved and limited conversation to collaborators May 25, 2022
Repository owner unlocked this conversation May 25, 2022
@OxygenCobalt
Copy link
Owner

Still, I have to ask @KraXen72. Out of the two unsatisfactory widget options, which would you end up preferring? One with more metadata, or one with more controls?

@KraXen72
Copy link
Author

im not sure exactly what both of those include, so let me give each thing on the widget an importance: (1 must have, 0 optional):

song title - 1
play/pause button - 1
skip buttons - 0.9
artist 0.7
shuffle and repeat buttons 0.4
album cover 0.2

if you think this is unfeasible, just let me know which xml is the small widget im using and I'll try to impelemt it and submit a pull request.i am new to android dev but i have done some ui stuff, i would be glad to try my hand at it if it means i could have this really important feature.

@KraXen72
Copy link
Author

KraXen72 commented May 25, 2022

honestly I'd rather have more widgets than whatever is now.
you could have this adaptive widget, and then the widget 1 or 2 from my mockup as the second widget and leave it looking bad if squished to be niagaras fault

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented May 25, 2022

Oh. So what you actually want is a text-based widget layout, basically. This explains a lot. Auxio's widget is primarily designed around cover art since it's the most useful at-a-glance information for most. I originally planned several widget styles, but then decided against it, as something like a text-only widget simply was not responsive enough to create the best UX. I've spent countless hours tweaking the existing widgets, and I've settled on this setup simply because it seems to work great for the vast majority of users, at the cost of users with more esoteric preferences.

If you really want to update the widget layouts to your liking, the layout XMLs are here under the files named widget_[size].xml. Note that they are incredibly hard to work with, as the hacks I do to get them working with the widget API makes them largely not conform to modern UI practices.

I'd also would be unlikely to accept a PR changing them for the many reasons I've stated above. If you desire, you can maintain a fork with your widget layouts, and just periodically update the app from the upstream project. This way, you can have the layouts you desire, while most Auxio users continue to have the widget less prone to breakages and other responsiveness issues.

Now, if someone with a more common use-case makes an issue also complaining about the one-button widget layout, I will actually re-consider the current setup and try to add a new layout with more buttons. But for now, I will be keeping the original one-button layout. Similarly, if another comes along and requests something akin to the youtube music widget (or some other new widget style that Auxio does not cover), I might change my mind on several widget types and implement your type of widget.

@KraXen72
Copy link
Author

okay thanks. would you merge a fully new text-style widget? of course, you'd review and comment the code etc, so I won't be merging garbage. ill try to base it off of the small widget and register it as a separate widget in the os.

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented May 25, 2022

I will only merge new widget styles if there is sufficient demand. Since you are really the only one that I am aware of who desires text-only widgets, I don't feel comfortable merging something that might cause indirection or unexpected UX issues. This is why I brought it up previously that if other people ask for new widget styles, I'll reconsider merging text-only (or other) widget types.

@KraXen72
Copy link
Author

alright. well to close this off:

  1. I'd definitley love to see a textwidget, but i can live with the playpause, title, artist and album cover widget (original). i can quickly see song on homescreen, play it or pause. i can skip with my headphones or through notifications.
  2. thank you for leading this conversation into this much detail, considering it throughoutly and explaining how and why stuff works.

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented Oct 14, 2022

Sorry for necroing, but I've been toying with some new micro widget layouts so that I can improve the state of the thin widgets on launchers like yours. Once again I'm sacrificing title/artist info for more controls, but I think it's much more aesthetically pleasing than prior.

image

image

I thought you might want to see this and answer if this is a improvement or not. Note that these are not final at all. I can't even implement them right now due to an annoying bug with widgets that limits me to only 5 layouts at most.

@KraXen72
Copy link
Author

it's quite interesting, although i feel like there's too much padding.
currently, im quite satisfied with the amount of control the current setup provides for me, so I don't necessarily need a different widget anymore, see:
Screenshot_20221014-074351_Niagara Launcher.png

@OxygenCobalt
Copy link
Owner

OxygenCobalt commented Oct 14, 2022

Ah, no issue. I'll take that into consideration. Note that your current widget layout would not change if I added this, just the really thin layout that only has a play/pause button right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants