Skip to content

Commit

Permalink
Address theme adapter review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Rout committed Nov 23, 2022
1 parent 86c683f commit 8f2210f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.material3.Button
import androidx.compose.material3.Card
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.Checkbox
import androidx.compose.material3.CircularProgressIndicator
import androidx.compose.material3.ElevatedButton
Expand Down Expand Up @@ -69,8 +70,10 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.google.accompanist.sample.R
import com.google.accompanist.themeadapter.material3.Mdc3Theme
import com.google.android.material.color.DynamicColors

Expand Down Expand Up @@ -102,12 +105,12 @@ fun Material3Sample() {
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior(rememberTopAppBarState())
Scaffold(
modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
/*topBar = {
topBar = {
CenterAlignedTopAppBar(
title = { Text(text = stringResource(R.string.material_3_integration)) },
title = { Text(text = stringResource(R.string.themeadapter_title_material3)) },
scrollBehavior = scrollBehavior
)
}*/
}
) { padding ->
Column(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,16 @@ import androidx.compose.material.Scaffold
import androidx.compose.material.Text
import androidx.compose.material.TextButton
import androidx.compose.material.TextField
import androidx.compose.material.TopAppBar
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.ComposeView
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.google.accompanist.sample.R
import com.google.accompanist.themeadapter.material.MdcTheme

class MdcThemeSample : ComponentActivity() {
Expand All @@ -68,11 +71,11 @@ fun MaterialSamplePreview() {
@Composable
fun MaterialSample() {
Scaffold(
/*topBar = {
topBar = {
TopAppBar(
title = { Text(text = stringResource(R.string.material_integration)) }
title = { Text(text = stringResource(R.string.themeadapter_title_material)) }
)
}*/
}
) { padding ->
Column(
modifier = Modifier
Expand Down

0 comments on commit 8f2210f

Please sign in to comment.