Last active
June 29, 2022 17:35
-
-
Save Astroa7m/c385c0343763f6a032092396e44e7793 to your computer and use it in GitHub Desktop.
RemoteWidget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import androidx.compose.runtime.Composable | |
import androidx.glance.GlanceModifier | |
import androidx.glance.Image | |
import androidx.glance.ImageProvider | |
import androidx.glance.appwidget.GlanceAppWidget | |
import androidx.glance.layout.ContentScale | |
import androidx.glance.layout.fillMaxSize | |
import com.example.remotewidget.R | |
class RemoteWidget : GlanceAppWidget() { | |
@Composable | |
override fun Content() { | |
Image( | |
provider = ImageProvider(R.drawable.ic_launcher_foreground), | |
contentDescription = null, | |
modifier = GlanceModifier.fillMaxSize(), | |
contentScale = ContentScale.Crop | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment