Skip to content
Snippets Groups Projects
Verified Commit 2af0fa49 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Minor formatting improvements

parent 7dd42582
No related branches found
No related tags found
Loading
...@@ -38,8 +38,8 @@ import androidx.annotation.StringRes ...@@ -38,8 +38,8 @@ import androidx.annotation.StringRes
* @param colorPrimary The color used as background for the header of the recents card - passed as Android * @param colorPrimary The color used as background for the header of the recents card - passed as Android
* Color Resource * Color Resource
*/ */
fun Activity.updateRecentsHeaderIfExisting( fun Activity.updateRecentsHeaderIfExisting(label: String, @DrawableRes icon: Int,
label: String, @DrawableRes icon: Int, @ColorRes colorPrimary: Int) { @ColorRes colorPrimary: Int) {
val iconRaw = BitmapFactory.decodeResource(resources, icon) val iconRaw = BitmapFactory.decodeResource(resources, icon)
val colorPrimaryRaw = resources.getColorBackport(colorPrimary, theme) val colorPrimaryRaw = resources.getColorBackport(colorPrimary, theme)
updateRecentsHeaderIfExisting(label, iconRaw, colorPrimaryRaw) updateRecentsHeaderIfExisting(label, iconRaw, colorPrimaryRaw)
...@@ -54,8 +54,8 @@ fun Activity.updateRecentsHeaderIfExisting( ...@@ -54,8 +54,8 @@ fun Activity.updateRecentsHeaderIfExisting(
* @param colorPrimary The color used as background for the header of the recents card - passed as Android * @param colorPrimary The color used as background for the header of the recents card - passed as Android
* Color Resource * Color Resource
*/ */
fun Activity.updateRecentsHeaderIfExisting(@StringRes label: Int, @DrawableRes icon: Int, @ColorRes fun Activity.updateRecentsHeaderIfExisting(@StringRes label: Int, @DrawableRes icon: Int,
colorPrimary: Int) { @ColorRes colorPrimary: Int) {
val labelRaw = resources.getString(label) val labelRaw = resources.getString(label)
val iconRaw = BitmapFactory.decodeResource(resources, icon) val iconRaw = BitmapFactory.decodeResource(resources, icon)
val colorPrimaryRaw = resources.getColorBackport(colorPrimary, theme) val colorPrimaryRaw = resources.getColorBackport(colorPrimary, theme)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment