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?,
|
inputFile: Uri?,
|
||||||
outputFile: Uri?,
|
outputFile: Uri?,
|
||||||
@StringRes title: Int,
|
@StringRes title: Int,
|
||||||
bgColor: Int
|
bgColor: Int,
|
||||||
|
txtColor: Int
|
||||||
) {
|
) {
|
||||||
launcher.launch(
|
launcher.launch(
|
||||||
options(inputFile) {
|
options(inputFile) {
|
||||||
@ -53,6 +54,7 @@ object AvatarSelection {
|
|||||||
setBackgroundColor(ContextCompat.getColor(activity, R.color.avatar_background))
|
setBackgroundColor(ContextCompat.getColor(activity, R.color.avatar_background))
|
||||||
setToolbarColor(bgColor)
|
setToolbarColor(bgColor)
|
||||||
setActivityBackgroundColor(bgColor)
|
setActivityBackgroundColor(bgColor)
|
||||||
|
setToolbarTintColor(txtColor)
|
||||||
setActivityTitle(activity.getString(title))
|
setActivityTitle(activity.getString(title))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -113,6 +113,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
private val hexEncodedPublicKey: String get() = TextSecurePreferences.getLocalNumber(this)!!
|
private val hexEncodedPublicKey: String get() = TextSecurePreferences.getLocalNumber(this)!!
|
||||||
|
|
||||||
private val bgColor by lazy { getColorFromAttr(android.R.attr.colorPrimary) }
|
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 ->
|
private val onAvatarCropped = registerForActivityResult(CropImageContract()) { result ->
|
||||||
when {
|
when {
|
||||||
@ -230,7 +231,8 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
|||||||
inputFile = inputFile,
|
inputFile = inputFile,
|
||||||
outputFile = outputFile,
|
outputFile = outputFile,
|
||||||
title = R.string.CropImageActivity_profile_avatar,
|
title = R.string.CropImageActivity_profile_avatar,
|
||||||
bgColor = bgColor
|
bgColor = bgColor,
|
||||||
|
txtColor = txtColor
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user