aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt4
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt5
2 files changed, 3 insertions, 6 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt
index 5d7e3625..57cda44a 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/MainActivity.kt
@@ -210,9 +210,7 @@ class MainActivity : BaseActivity(),
}
adapter.pages.forEach {
tabs.addTab(tabs.newTab()
- .setCustomView(BadgedIcon(this).apply {
- iicon = it.icon
- }))
+ .setCustomView(BadgedIcon(this).apply { iicon = it.icon }))
}
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt
index c1015aad..ed7a3c4f 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/BadgedIcon.kt
@@ -7,6 +7,7 @@ import android.util.AttributeSet
import android.widget.ImageView
import android.widget.TextView
import ca.allanwang.kau.utils.*
+import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.typeface.IIcon
import com.pitchedapps.frost.R
import com.pitchedapps.frost.utils.Prefs
@@ -31,12 +32,10 @@ class BadgedIcon @JvmOverloads constructor(
badgeTextView.setTextColor(Prefs.mainActivityLayout.iconColor())
}
-
var iicon: IIcon? = null
- get() = field
set(value) {
field = value
- badgeImage.setImageDrawable(value?.toDrawable(context, color = Prefs.mainActivityLayout.iconColor()))
+ badgeImage.setImageDrawable(value?.toDrawable(context, sizeDp = 20, color = Prefs.mainActivityLayout.iconColor()))
}
fun setAllAlpha(alpha: Float) {