Skip to content

Commit be901c5

Browse files
committed
Small UI changes on the Sample app
1 parent 3fd402c commit be901c5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

sample/src/main/kotlin/com/leinardi/android/speeddial/sample/compose/ComposeActivity.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import androidx.compose.foundation.layout.padding
3535
import androidx.compose.foundation.lazy.LazyColumn
3636
import androidx.compose.material.AppBarDefaults
3737
import androidx.compose.material.BottomAppBar
38+
import androidx.compose.material.ContentAlpha
3839
import androidx.compose.material.ExperimentalMaterialApi
3940
import androidx.compose.material.Icon
4041
import androidx.compose.material.IconButton
@@ -55,6 +56,7 @@ import androidx.compose.runtime.rememberCoroutineScope
5556
import androidx.compose.runtime.saveable.rememberSaveable
5657
import androidx.compose.runtime.setValue
5758
import androidx.compose.ui.Modifier
59+
import androidx.compose.ui.draw.alpha
5860
import androidx.compose.ui.graphics.Color
5961
import androidx.compose.ui.platform.LocalContext
6062
import androidx.compose.ui.res.painterResource
@@ -309,7 +311,9 @@ fun MainContent() {
309311
) {
310312
Text(
311313
text = "This is element #$index",
314+
style = MaterialTheme.typography.body1,
312315
modifier = Modifier
316+
.alpha(ContentAlpha.medium)
313317
.fillMaxWidth()
314318
.padding(16.dp),
315319
)

sample/src/main/res/layout/text_row_item.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<!--
1+
<?xml version="1.0" encoding="utf-8"?><!--
32
~ Copyright 2022 Roberto Leinardi.
43
~
54
~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -30,6 +29,7 @@
3029
android:layout_width="wrap_content"
3130
android:layout_height="wrap_content"
3231
android:layout_gravity="center_vertical"
33-
android:textAppearance="?android:textAppearanceMedium"
32+
android:alpha="0.74"
33+
android:textSize="16.sp"
3434
tools:text="An element" />
3535
</FrameLayout>

0 commit comments

Comments
 (0)