Skip to content

Commit

Permalink
Add scroll to privacy disclaimer screen
Browse files Browse the repository at this point in the history
  • Loading branch information
sabercodic committed Oct 24, 2023
1 parent 089c55e commit 20570bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.text.ClickableText
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -56,20 +58,22 @@ fun PrivacyDisclaimerScreen(
modifier =
Modifier.fillMaxHeight()
.fillMaxWidth()
.padding(it)
// .padding(it)
.background(color = MaterialTheme.colorScheme.background)
) {
val (body, actionButtons) = createRefs()
val sideMargin = Dimens.sideMargin

Column(
modifier =
Modifier.constrainAs(body) {
top.linkTo(parent.top, margin = sideMargin)
start.linkTo(parent.start, margin = sideMargin)
end.linkTo(parent.end, margin = sideMargin)
width = Dimension.fillToConstraints
},
Modifier.padding(bottom = Dimens.privacyPolicyBottomPadding)
.verticalScroll(rememberScrollState())
.constrainAs(body) {
top.linkTo(parent.top, margin = sideMargin)
start.linkTo(parent.start, margin = sideMargin)
end.linkTo(parent.end, margin = sideMargin)
width = Dimension.fillToConstraints
},
) {
Text(
text = stringResource(id = R.string.privacy_disclaimer_title),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ data class Dimensions(
val notificationBannerStartPadding: Dp = 16.dp,
val notificationEndIconPadding: Dp = 4.dp,
val notificationStatusIconSize: Dp = 10.dp,
val privacyPolicyBottomPadding: Dp = 120.dp, //
val problemReportIconToTitlePadding: Dp = 60.dp,
val progressIndicatorSize: Dp = 48.dp,
val relayCircleSize: Dp = 16.dp,
Expand Down

0 comments on commit 20570bb

Please sign in to comment.