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:
parent
703641bf06
commit
4e822c9a0a
|
@ -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)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
<solid android:color="?attr/colorSurface" />
|
||||
android:shape="oval" >
|
||||
<solid android:color="@color/toolbar_icon_background" />
|
||||
</shape>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#fff"
|
||||
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z" />
|
||||
</vector>
|
|
@ -0,0 +1,12 @@
|
|||
<layer-list
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/background_circle" android:width="32dp" android:height="32dp"/>
|
||||
|
||||
<item android:drawable="@drawable/ic_arrow_back"
|
||||
android:top="4dp"
|
||||
android:bottom="4dp"
|
||||
android:left="4dp"
|
||||
android:right="4dp"/>
|
||||
|
||||
</layer-list>
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#fff"
|
||||
android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z" />
|
||||
</vector>
|
|
@ -0,0 +1,12 @@
|
|||
<layer-list
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item android:drawable="@drawable/background_circle" android:width="32dp" android:height="32dp"/>
|
||||
|
||||
<item android:drawable="@drawable/ic_more"
|
||||
android:top="4dp"
|
||||
android:bottom="4dp"
|
||||
android:left="4dp"
|
||||
android:right="4dp"/>
|
||||
|
||||
</layer-list>
|
|
@ -28,6 +28,8 @@
|
|||
<color name="botBadgeForeground">@color/white</color>
|
||||
<color name="botBadgeBackground">@color/tusky_grey_10</color>
|
||||
|
||||
<color name="toolbar_icon_background">#CC444B5D</color>
|
||||
|
||||
<!-- colors used to show inserted/deleted text -->
|
||||
<color name="view_edits_background_insert">#00731B</color>
|
||||
<color name="view_edits_background_delete">#DF0000</color>
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
<color name="botBadgeForeground">@color/tusky_grey_20</color>
|
||||
<color name="botBadgeBackground">@color/white</color>
|
||||
|
||||
<color name="toolbar_icon_background">#CCEBEFF4</color>
|
||||
|
||||
<!-- colors used to show inserted/deleted text -->
|
||||
<color name="view_edits_background_insert">#CCFFD8</color>
|
||||
<color name="view_edits_background_delete">#FFC0C0</color>
|
||||
|
|
Loading…
Reference in New Issue