Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private object ActionLaunchSendBroadcastEvent {

private object ActionLambda {
@Composable
fun actionLambda() {
fun ActionLambda() {
// [START android_compose_glance_lambda01]
Text(
text = "Submit",
Expand All @@ -237,7 +237,7 @@ private object ActionLambda {
}

@Composable
fun actionLambda2() {
fun ActionLambda2() {
// [START android_compose_glance_lambda02]
Button(
text = "Submit",
Expand Down Expand Up @@ -436,7 +436,7 @@ object ManageAndUpdate {
object BuildUIWithGlance {

@Composable
fun example1() {
fun Example1() {
// [START android_compose_glance_buildUI01]
Row(modifier = GlanceModifier.fillMaxWidth().padding(16.dp)) {
val modifier = GlanceModifier.defaultWeight()
Expand All @@ -448,7 +448,7 @@ object BuildUIWithGlance {
}

@Composable
fun example2() {
fun Example2() {

// [START android_compose_glance_buildUI02]
// Remember to import Glance Composables
Expand All @@ -466,7 +466,7 @@ object BuildUIWithGlance {
}

@Composable
fun example3() {
fun Example3() {
// [START android_compose_glance_buildUI03]
LazyColumn {
item {
Expand All @@ -480,7 +480,7 @@ object BuildUIWithGlance {
}

@Composable
fun example4() {
fun Example4() {
val peopleNameList = arrayListOf<String>()
val peopleList = arrayListOf<Person>()

Expand Down Expand Up @@ -631,7 +631,7 @@ object SizeModeSnippets3 {

object AccessResources {
@Composable
fun example1() {
fun Example1() {
// [START android_compose_glance_buildUI10]
LocalContext.current.getString(R.string.glance_title)
// [END android_compose_glance_buildUI10]
Expand All @@ -651,7 +651,7 @@ object AccessResources {

object CompoundButton {
@Composable
fun example1() {
fun Example1() {
// [START android_compose_glance_buildUI12]
var isApplesChecked by remember { mutableStateOf(false) }
var isEnabledSwitched by remember { mutableStateOf(false) }
Expand Down Expand Up @@ -860,7 +860,7 @@ object GlanceTheming {
}

@Composable
fun shapeExample() {
fun ShapeExample() {
// Note : android_compose_glance_glancetheming04 is found in button_outline.xml
// [START android_compose_glance_glancetheming05]
GlanceModifier.background(
Expand Down Expand Up @@ -898,7 +898,7 @@ object GlanceInnerPadding {

object GlanceInteroperability {
@Composable
fun example01() {
fun Example01() {
// [START android_compose_glance_glanceinteroperability01]
val packageName = LocalContext.current.packageName
Column(modifier = GlanceModifier.fillMaxSize()) {
Expand All @@ -909,7 +909,7 @@ object GlanceInteroperability {
}

@Composable
fun example02() {
fun Example02() {
val packageName = null

// [START android_compose_glance_glanceinteroperability02]
Expand Down