Closed G-Rath closed 11 months ago
I think I've gotten it as good as I can for now by myself - there is still a bit of an annoying initial loading UX race that goes on that isn't helped by how long it can take to load the list afresh, but I think it sits in the OS space (in particular, I think sometimes the widget is delayed because Android itself has delayed processing the intent) and I've not found anyway to handle that better.
Ultimately this boils down to users just having to sometimes press the refresh button a couple of times initially - this is actually consistent with the original widget, which is also why I think it's more of an Android OS thing.
Also I couldn't figure out the bug where the app would sometimes open on the old question and not switch to the new one - while I've had this happen frequently, I've not found a consistent way to reproduce it and it always can be fixed by just refreshing the widget to a new question so I don't think it should be worried about for now.
Finally, I ended up decompiling the APK for the original app to have a look at the layouts so the widget now resembles the original a lot more (not that it was too differently, but mainly the refresh button is now better and gives visual feedback)
@tylerbwong I've run the majority of CI locally and confirmed it passes since GHA won't run without approval :)
@G-Rath This is awesome, thanks so much for your contribution! I'm unfortunately a little busy right now and haven't had much time to work on Stack lately, but I'll hopefully be able to get to this in the coming weeks. Again, thanks so much for your hard work!
4x2 Widget | Widget Selection |
---|---|
This is what it looks like for me when I run it on API 33. Is there a reason why I can't resize them?
This is what it looks like for me when I run it on API 33.
That's odd - would you mind playing around with a smaller minWidth
setting? My guess is that it's because thats dp based (and probably why in Android 12 you can specify cells rather than dps but the min android version means we can't use that for now).
When I'm back on the laptop I use for doing Android, I'll look into what values the original app was using too.
@tylerbwong ready for another look - I've also adjusted the minWidth
and minHeight
of the widget to match the values used by the original widget; this might resolve your size problem, but if not could you play around with those values as I suspect that's what's doing that.
@tylerbwong ready for another look - I've also adjusted the
minWidth
andminHeight
of the widget to match the values used by the original widget; this might resolve your size problem, but if not could you play around with those values as I suspect that's what's doing that.
I think those values looks fine. Can we also look into specifying targetCellWidth
and targetCellHeight
for newer API levels? More info here.
Seems like there are other sizing attributes to use as well:
android:minResizeWidth="40dp"
android:minResizeHeight="40dp"
android:maxResizeWidth="120dp"
android:maxResizeHeight="120dp"
android:resizeMode="horizontal|vertical"
I didn't think that you could use them with the min android level, but maybe I'm wrong.
I'm on mobile right now so if you're comfortable would you mind just pushing up the min cell sizes if that's the last thing needed to land this? Otherwise I can try take a look over the next couple of days (or as a follow up if you're happy to merge as is for now)
I don't think it makes sense to allow resizing though because the widget is only really designed for one size - which makes sense because titles are generally less than three lines...
I didn't think that you could use them with the min android level, but maybe I'm wrong.
I'm on mobile right now so if you're comfortable would you mind just pushing up the min cell sizes if that's the last thing needed to land this? Otherwise I can try take a look over the next couple of days (or as a follow up if you're happy to merge as is for now)
I don't think it makes sense to allow resizing though because the widget is only really designed for one size - which makes sense because titles are generally less than three lines...
I think they would just get ignored on newer API levels, but I agree that resizing probably doesn't make much sense. Never mind then!
No worries, thanks for landing it! How long does it usually take to get published to the play store?
No worries, thanks for landing it! How long does it usually take to get published to the play store?
It's been quite awhile since I've published a new release to the Play Store. There was never a set cadence, just when there was something new/stable enough to release.
There have been a few changes since the last release so I have to do some testing, but I will try my best to land it within the next week or so.
Sweet as - let me know if you find anything that could help address, and I'll see what I can do
Description
This implements the widget aspect of #142, which I realised is the main thing that is important to me - I'm happy to edit that issue to explicitly remove the ask for a view, but figure it's not a big deal as this still the meat of what's needed for that too.
~Overall this is pretty complete, there's just a couple of minor things I need to address - specifically:~
android:tint
works butandroid:app
doesn't...), and ideally it would be nice to have the question title text size itself according to content to always fit like the original widget (though that's not critical imo)~I've tried my best to do things sensibly but this is my first time writing Koltin and my first time working on such a big Android app so I totally expect and am prepared to be told parts are wrong and that they should be redone - this is also why I've not written any tests.
I'm happy to keep working on this, but would appreciate help and guidance from some folks with more experience with Android and Koltin 😅 hence opening this as a draft until I've addressed some of the above.
Checklist
./gradlew ktlintCheck detekt
before submitting this PRResolves #142