Skip to content

Commit

Permalink
[Jetchat] Adds nav bar padding to FAB
Browse files Browse the repository at this point in the history
Change-Id: Id8fc09af891b15c34509b19159623bd9b26c11e5
  • Loading branch information
JoseAlcerreca committed Dec 15, 2020
1 parent 2c91ab2 commit 244576b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ import com.example.compose.jetchat.components.JetchatAppBar
import com.example.compose.jetchat.components.baselineHeight
import com.example.compose.jetchat.data.meProfile
import com.example.compose.jetchat.theme.JetchatTheme
import dev.chrisbanes.accompanist.insets.navigationBarsPadding
import dev.chrisbanes.accompanist.insets.statusBarsPadding

@Composable
Expand Down Expand Up @@ -226,11 +227,13 @@ fun ProfileError() {

@Composable
fun ProfileFab(extended: Boolean, userIsMe: Boolean, modifier: Modifier = Modifier) {

key(userIsMe) { // Prevent multiple invocations to execute during composition
FloatingActionButton(
onClick = { /* TODO */ },
modifier = modifier
.padding(16.dp)
.navigationBarsPadding()
.preferredHeight(48.dp)
.widthIn(min = 48.dp),
backgroundColor = MaterialTheme.colors.primary,
Expand Down
42 changes: 0 additions & 42 deletions Jetchat/app/src/main/res/layout/activity_main.xml

This file was deleted.

28 changes: 0 additions & 28 deletions Jetchat/app/src/main/res/layout/app_bar_main.xml

This file was deleted.

38 changes: 0 additions & 38 deletions Jetchat/app/src/main/res/layout/nav_header_main.xml

This file was deleted.

0 comments on commit 244576b

Please sign in to comment.