Skip to content

Commit

Permalink
Fixed Dialog Buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
binayshaw7777 committed Mar 5, 2024
1 parent 96a0f70 commit 1569daa
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fun AccountScreen(
) {
Text(
"Logout",
style = medium16
style = medium14
)
}
},
Expand All @@ -134,7 +134,7 @@ fun AccountScreen(
) {
Text(
stringResource(id = R.string.cancel),
style = medium16
style = medium14
)
}
},
Expand Down Expand Up @@ -253,7 +253,9 @@ fun AccountScreen(
}

AccountOptions.HELP_AND_SUPPORT -> {

val openURL = Intent(Intent.ACTION_VIEW)
openURL.data = Uri.parse(context.resources.getString(R.string.mailTo))
context.startActivity(openURL)
}

AccountOptions.LOGOUT -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.BasicAlertDialog
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
Expand All @@ -17,13 +18,15 @@ import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import com.binay.shaw.justap.R
import com.binay.shaw.justap.presentation.sharedViewModels.ThemeViewModel
import com.binay.shaw.justap.presentation.themes.light16
import com.binay.shaw.justap.presentation.themes.medium14
import com.binay.shaw.justap.presentation.themes.normal24

@SuppressLint("ComposeModifierMissing")
Expand Down Expand Up @@ -95,13 +98,23 @@ fun ThemeDialog(
style = light16.copy(color = MaterialTheme.colorScheme.onSurfaceVariant),
)
}

TextButton(
onClick = { onDismissRequest() },
onClick = {
onDismissRequest()
},
colors = ButtonDefaults.buttonColors(
containerColor = Color.Transparent,
contentColor = MaterialTheme.colorScheme.onPrimaryContainer
),
modifier = Modifier
.align(Alignment.End)
.padding(end = 24.dp)
) {
Text("Dismiss")
Text(
text = "Dismiss",
style = medium14
)
}
}
}
Expand Down

0 comments on commit 1569daa

Please sign in to comment.