-
-
Notifications
You must be signed in to change notification settings - Fork 674
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
Convert wear home activity to compose #1844
Conversation
This is really awesome! I will give it a test spin later today. My first comment based on your screenshot is that I would prefer to make both the chips and the margins a bit smaller (like in the current release). How do you feel about that? |
Good suggestion, will look into that later today :) |
Again, great work! It works really well, and I like this API a lot :) Also, the default scroll animations are great! A few small design remarks from my side:
|
Couldnt agree more, the flow is just so much easier than having to deal with XML and all that comes with it lol
yea I wasnt really sure how I felt about it, a lot of the heading design was based off how much text this took on screen. I suppose we can try to make the text smaller so it can be center aligned. Only concern is what happens if the translated language takes up more space? Calling it booleans doesnt make sense either :/
yea as of now I went with a default design from an article I read that covered ScalingLazyList :) I can change the margins a bit to match the prod version more. I am not much of a design guy but can def take a stab at making it better lol
umm because I was playing around with the API 😂 will convert it to a chip so it matches the rest LOL my bad
Good one, we can probably just trim the name to a certain amount of characters so we don't go over it.
I can look into :)
yea I was trying to do with that
i dont know if its ready for compose yet, I saw they have |
Haha yes definitely!
Hmm yes that is a good one... I'm not sure how to handle different translations like that... For now we can just focus on English, right? Let's see what happens once we get translators
Haha no worries, I'm sure it will turn out fine!
Hahaha yeah I can imagine ;)
Maybe it is indeed not possible yet then. In any case, if it's too much trouble we can always worry about it later ;) |
|
I'm seeing this just now, you can set max lines and type of overflow for a chip. I think that would be better than a maximum nr of characters. Sorry for not seeing this earlier. https://developer.android.com/training/wearables/compose#chips |
Thank you! no need to apologize when you show a better path :) |
Great update! It's looking really nice :) |
@dshokouhi Quick question .. now that we do not have an " EntityButtonViewHolder.kt" and we show icons in a different way do we still need the icon drawable ? ( ex. ic_light.xml ) https://github.com/dshokouhi/home-assistant-android/blob/wear_home_compose/wear/src/main/res/drawable/ p.s. can you also add this and the other merged request in the Wear OS Project |
ah good catch, more files to remove |
wear/src/main/java/io/homeassistant/companion/android/home/HomeActivity.kt
Outdated
Show resolved
Hide resolved
wear/src/main/java/io/homeassistant/companion/android/home/HomeActivity.kt
Outdated
Show resolved
Hide resolved
Thank you so much for contribution for my github feature list here. |
@hkusulja Tile support will be added in a separate PR and will have to wait a tiny bit longer. Right now it will only support one tile with 7 shortcuts. It will be merged once I finish the settings in the wear os app, to select which 7. The same settings will be added to the android app as well, somewhere in the future. Multiple tile support is not considered yet, but could always be a feature request of course |
Ok, no problem about waiting, this team is already doing a great job. |
Summary
Fixes: #1803 and #1838
Converts the home activity to use Compose. Added a few more entity domains with support for more. This requires a minimum SDK bump to API 25 as that is required for compose on Wear OS. There is also a loading screen while we wait for the list of entities to load
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#605
Any other notes