larger background for toolbar icons in AccountActivity (#4375)

Looks way better.
[I also wanted to change the color of the status bar, but nobody seems
to like it](https://chaos.social/@ConnyDuck/112178196967742268), so
let's leave it.

before/after
<img
src="https://github.com/tuskyapp/Tusky/assets/10157047/4e93c722-c1a3-4fc4-808f-037a1398a944"
width="260"/> <img
src="https://github.com/tuskyapp/Tusky/assets/10157047/2a58785b-d3f4-4613-9bd9-0e09436f7142"
width="260"/>
This commit is contained in:
Konrad Pozniak 2024-04-17 18:41:51 +02:00 committed by GitHub
commit 4e822c9a0a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 54 additions and 18 deletions

View file

@ -23,7 +23,6 @@ import android.content.Intent
import android.content.res.ColorStateList
import android.graphics.Color
import android.graphics.Typeface
import android.graphics.drawable.LayerDrawable
import android.os.Bundle
import android.text.SpannableStringBuilder
import android.text.TextWatcher
@ -345,21 +344,9 @@ class AccountActivity : BottomSheetActivity(), ActionButtonActivity, MenuProvide
toolbarBackground.fillColor = ColorStateList.valueOf(Color.TRANSPARENT)
binding.accountToolbar.background = toolbarBackground
// Provide a non-transparent background to the navigation and overflow icons to ensure
// they remain visible over whatever the profile background image might be.
val backgroundCircle = AppCompatResources.getDrawable(this, R.drawable.background_circle)!!
backgroundCircle.alpha = 210 // Any lower than this and the backgrounds interfere
binding.accountToolbar.navigationIcon = LayerDrawable(
arrayOf(
backgroundCircle,
binding.accountToolbar.navigationIcon
)
)
binding.accountToolbar.overflowIcon = LayerDrawable(
arrayOf(
backgroundCircle,
binding.accountToolbar.overflowIcon
)
binding.accountToolbar.setNavigationIcon(R.drawable.ic_arrow_back_with_background)
binding.accountToolbar.setOverflowIcon(
AppCompatResources.getDrawable(this, R.drawable.ic_more_with_background)
)
binding.accountHeaderInfoContainer.background = MaterialShapeDrawable.createWithElevationOverlay(this, appBarElevation)