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

Glance Widget WIP #38

Merged
merged 12 commits into from
Apr 19, 2024
Merged

Glance Widget WIP #38

merged 12 commits into from
Apr 19, 2024

Conversation

secondsun
Copy link
Contributor

This is the first draft / MVP of a widget for SociaLite built with Glance.

Copy link
Contributor

@yaraki yaraki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think read/unread states should be recorded for each Message like read_timestamp, but that can come later.

@secondsun
Copy link
Contributor Author

Hey guys I've done some updates. I've collapsed the PR down to two commits. The first is the "base" to be cherry picked for the codelab starter and the second is the solution for the codelab

@secondsun secondsun force-pushed the io24_widget branch 2 times, most recently from c39c8cd to 83a0fa4 Compare March 25, 2024 15:16
@secondsun secondsun force-pushed the io24_widget branch 5 times, most recently from 2c2637c to c2852dd Compare March 28, 2024 13:49
@secondsun secondsun marked this pull request as ready for review March 28, 2024 15:42
@secondsun secondsun requested review from yaraki and arriolac March 28, 2024 15:42
@secondsun
Copy link
Contributor Author

secondsun commented Apr 1, 2024

@ashnohe @yaraki @arriolac Friend ping, can you guys PTAL? This code is the solution to the codelab for glance and adds a widget to SociaLite.

There is going to be a design review this week and there may be some changes from that, but if possible I would like to try and get them in a follow-up PR.

import com.google.android.samples.socialite.widget.model.WidgetModel

@Composable
fun FavoriteContact(model: WidgetModel, onClick: Action) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here - this should accept a modifier

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

import kotlinx.coroutines.runBlocking

@Composable
fun ZeroState(repository: WidgetModelRepository, widgetId: Int, context: Context) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you get the context from LocalContext rather than having to pass it here as an argument?

This should also accept a modifier.

@@ -0,0 +1,9 @@
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license notice

secondsun and others added 3 commits April 3, 2024 16:48
Change-Id: Ibba72892121de5f6b30f951857cb5760a4449f54
Change-Id: Ibba72892121de5f6b30f951857cb5760a4449f54
Change-Id: Ie75625aa5ca568f41f94ef58b98a583c79aebe0d
Change-Id: I9536635d414af6fad22ebc79ef8d400810b9ffb4
@secondsun secondsun merged commit 1458370 into main Apr 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants