Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit ac21ad7

Browse files
committed
Remove colorBranded attrs in favor of colorPrimarySurface
- Removed legacy colorBranded used before colorPrimarySurface was added - Updaed drawables to use colorControlNormal tinting - Updated drawable file names - Updated BottomAppBar style to be .PrimarySurface Change-Id: I8d134b26978cd61823effd58d07c6b11e96a35a8
1 parent 9048daa commit ac21ad7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+88
-195
lines changed

app/src/main/java/com/materialstudies/reply/data/Account.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ data class Account(
3434
var isCurrentAccount: Boolean = false
3535
) {
3636
val fullName: String = "$firstName $lastName"
37-
@DrawableRes val checkedIcon: Int = if (isCurrentAccount) R.drawable.ic_done_on_branded else 0
37+
@DrawableRes val checkedIcon: Int = if (isCurrentAccount) R.drawable.ic_done else 0
3838
}
3939

4040
object AccountDiffCallback : DiffUtil.ItemCallback<Account>() {

app/src/main/java/com/materialstudies/reply/ui/MainActivity.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ class MainActivity : AppCompatActivity(),
9696

9797
// Set up the BottomAppBar menu
9898
binding.bottomAppBar.apply {
99-
overflowIcon = ContextCompat.getDrawable(
100-
this@MainActivity,
101-
R.drawable.ic_more_vert_on_branded
102-
)
10399
setNavigationOnClickListener {
104100
bottomNavDrawer.toggle()
105101
}

app/src/main/java/com/materialstudies/reply/ui/nav/BottomNavDrawerFragment.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,29 +84,31 @@ class BottomNavDrawerFragment :
8484
private val sandwichSlideActions = mutableListOf<OnSandwichSlideAction>()
8585

8686
private val backgroundShapeDrawable: MaterialShapeDrawable by lazy(NONE) {
87+
val backgroundContext = binding.backgroundContainer.context
8788
MaterialShapeDrawable(
88-
binding.backgroundContainer.context,
89+
backgroundContext,
8990
null,
9091
R.attr.bottomSheetStyle,
9192
0
9293
).apply {
9394
fillColor = ColorStateList.valueOf(
94-
requireContext().themeColor(R.attr.colorBrandedVariantSurface)
95+
backgroundContext.themeColor(R.attr.colorPrimarySurfaceVariant)
9596
)
9697
elevation = resources.getDimension(R.dimen.plane_08)
9798
initializeElevationOverlay(requireContext())
9899
}
99100
}
100101

101102
private val foregroundShapeDrawable: MaterialShapeDrawable by lazy(NONE) {
103+
val foregroundContext = binding.foregroundContainer.context
102104
MaterialShapeDrawable(
103-
binding.foregroundContainer.context,
105+
foregroundContext,
104106
null,
105107
R.attr.bottomSheetStyle,
106108
0
107109
).apply {
108110
fillColor = ColorStateList.valueOf(
109-
requireContext().themeColor(R.attr.colorBrandedSurface)
111+
foregroundContext.themeColor(R.attr.colorPrimarySurface)
110112
)
111113
elevation = resources.getDimension(R.dimen.plane_16)
112114
shadowCompatibilityMode = MaterialShapeDrawable.SHADOW_COMPAT_MODE_NEVER

app/src/main/java/com/materialstudies/reply/ui/nav/NavigationModel.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,37 +29,37 @@ object NavigationModel {
2929
private var navigationMenuItems = mutableListOf(
3030
NavigationModelItem.NavMenuItem(
3131
id = 0,
32-
icon = R.drawable.ic_twotone_inbox_on_branded,
32+
icon = R.drawable.ic_twotone_inbox,
3333
titleRes = R.string.navigation_inbox,
3434
checked = false
3535
),
3636
NavigationModelItem.NavMenuItem(
3737
id = 1,
38-
icon = R.drawable.ic_twotone_stars_on_branded,
38+
icon = R.drawable.ic_twotone_stars,
3939
titleRes = R.string.navigation_starred,
4040
checked = false
4141
),
4242
NavigationModelItem.NavMenuItem(
4343
id = 2,
44-
icon = R.drawable.ic_twotone_send_on_branded,
44+
icon = R.drawable.ic_twotone_send,
4545
titleRes = R.string.navigation_sent,
4646
checked = false
4747
),
4848
NavigationModelItem.NavMenuItem(
4949
id = 3,
50-
icon = R.drawable.ic_twotone_delete_on_branded,
50+
icon = R.drawable.ic_twotone_delete,
5151
titleRes = R.string.navigation_trash,
5252
checked = false
5353
),
5454
NavigationModelItem.NavMenuItem(
5555
id = 4,
56-
icon = R.drawable.ic_twotone_error_on_branded,
56+
icon = R.drawable.ic_twotone_error,
5757
titleRes = R.string.navigation_spam,
5858
checked = false
5959
),
6060
NavigationModelItem.NavMenuItem(
6161
id = 5,
62-
icon = R.drawable.ic_twotone_drafts_on_branded,
62+
icon = R.drawable.ic_twotone_drafts,
6363
titleRes = R.string.navigation_drafts,
6464
checked = false
6565
)

app/src/main/res/color/color_navigation_drawer_menu_item.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
-->
1515
<selector xmlns:android="http://schemas.android.com/apk/res/android">
1616
<item android:color="?attr/colorSecondary" android:state_checked="true"/>
17-
<item android:color="@color/color_on_branded_surface_emphasis_medium" />
17+
<item android:color="@color/color_on_primary_surface_emphasis_medium" />
1818
</selector>

app/src/main/res/color/color_on_branded_surface_divider.xml renamed to app/src/main/res/color/color_on_primary_surface_divider.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
the License.
1414
-->
1515
<selector xmlns:android="http://schemas.android.com/apk/res/android">
16-
<item android:color="?attr/colorOnBrandedSurface" android:alpha="0.1" />
16+
<item android:color="?attr/colorOnPrimarySurface" android:alpha="0.1" />
1717
</selector>

app/src/main/res/color/color_on_branded_surface_emphasis_disabled.xml renamed to app/src/main/res/color/color_on_primary_surface_emphasis_disabled.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
the License.
1414
-->
1515
<selector xmlns:android="http://schemas.android.com/apk/res/android">
16-
<item android:color="?attr/colorOnBrandedSurface" android:alpha="?attr/emphasisDisabledAlpha" />
16+
<item android:color="?attr/colorOnPrimarySurface" android:alpha="?attr/emphasisDisabledAlpha" />
1717
</selector>

app/src/main/res/color/color_on_branded_surface_emphasis_high.xml renamed to app/src/main/res/color/color_on_primary_surface_emphasis_high.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
the License.
1414
-->
1515
<selector xmlns:android="http://schemas.android.com/apk/res/android">
16-
<item android:color="?attr/colorOnBrandedSurface" android:alpha="?attr/emphasisHighAlpha" />
16+
<item android:color="?attr/colorOnPrimarySurface" android:alpha="?attr/emphasisHighAlpha" />
1717
</selector>

app/src/main/res/color/color_on_branded_surface_emphasis_medium.xml renamed to app/src/main/res/color/color_on_primary_surface_emphasis_medium.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
the License.
1414
-->
1515
<selector xmlns:android="http://schemas.android.com/apk/res/android">
16-
<item android:color="?attr/colorOnBrandedSurface" android:alpha="?attr/emphasisMediumAlpha" />
16+
<item android:color="?attr/colorOnPrimarySurface" android:alpha="?attr/emphasisMediumAlpha" />
1717
</selector>

app/src/main/res/drawable/asl_edit_reply.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
<item
1818
android:id="@+id/edit"
19-
android:drawable="@drawable/ic_edit_on_secondary"
19+
android:drawable="@drawable/ic_edit"
2020
android:state_activated="false"/>
2121

2222
<item
2323
android:id="@+id/reply"
24-
android:drawable="@drawable/ic_reply_all_on_secondary"
24+
android:drawable="@drawable/ic_reply_all"
2525
android:state_activated="true"/>
2626

2727
<transition

0 commit comments

Comments
 (0)