mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +00:00
Better styling
This commit is contained in:
parent
6fff1e1832
commit
cab8c03a84
@ -40,7 +40,8 @@ object AvatarSelection {
|
||||
inputFile: Uri?,
|
||||
outputFile: Uri?,
|
||||
@StringRes title: Int,
|
||||
bgColor: Int
|
||||
bgColor: Int,
|
||||
txtColor: Int
|
||||
) {
|
||||
launcher.launch(
|
||||
options(inputFile) {
|
||||
@ -53,6 +54,7 @@ object AvatarSelection {
|
||||
setBackgroundColor(ContextCompat.getColor(activity, R.color.avatar_background))
|
||||
setToolbarColor(bgColor)
|
||||
setActivityBackgroundColor(bgColor)
|
||||
setToolbarTintColor(txtColor)
|
||||
setActivityTitle(activity.getString(title))
|
||||
}
|
||||
)
|
||||
|
@ -113,6 +113,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
private val hexEncodedPublicKey: String get() = TextSecurePreferences.getLocalNumber(this)!!
|
||||
|
||||
private val bgColor by lazy { getColorFromAttr(android.R.attr.colorPrimary) }
|
||||
private val txtColor by lazy { getColorFromAttr(android.R.attr.textColorPrimary) }
|
||||
|
||||
private val onAvatarCropped = registerForActivityResult(CropImageContract()) { result ->
|
||||
when {
|
||||
@ -230,7 +231,8 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
inputFile = inputFile,
|
||||
outputFile = outputFile,
|
||||
title = R.string.CropImageActivity_profile_avatar,
|
||||
bgColor = bgColor
|
||||
bgColor = bgColor,
|
||||
txtColor = txtColor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user