Set all icon sizes to 24dp

This commit is contained in:
Kuba Szczodrzyński 2021-03-29 21:44:28 +02:00
parent 8f10321820
commit 60cc1171f9
5 changed files with 8 additions and 9 deletions

View File

@ -8,6 +8,7 @@ import android.view.Gravity
import android.view.View
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import com.mikepenz.iconics.Iconics
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
import com.mikepenz.iconics.utils.actionBar
@ -42,6 +43,8 @@ class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Iconics.respectFontBoundsDefault = true
if (darkTheme == null)
darkTheme = getSharedPreferences("prefs", Context.MODE_PRIVATE).getBoolean("darkTheme", false)

View File

@ -14,7 +14,6 @@ import androidx.appcompat.content.res.AppCompatResources
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.typeface.IIcon
import com.mikepenz.iconics.utils.actionBar
import com.mikepenz.iconics.utils.paddingDp
import com.mikepenz.iconics.utils.sizeDp
import com.mikepenz.materialdrawer.util.DrawerImageLoader
import pl.droidsonroids.gif.GifDrawable
@ -103,7 +102,6 @@ open class ImageHolder : com.mikepenz.materialdrawer.holder.ImageHolder {
this.icon = ii
colorList = iconColor
sizeDp = 24
this.paddingDp = paddingDp
}
iconRes != -1 -> icon = AppCompatResources.getDrawable(ctx, iconRes)
uri != null -> try {

View File

@ -136,7 +136,7 @@ class NavBottomBar : BottomAppBar {
mutate()
setDrawableByLayerId(R.id.ic_menu, IconicsDrawable(context).apply {
this.icon = NavLibFont.Icon.nav_menu
sizeDp = 20
sizeDp = 24
colorAttr(context, R.attr.colorOnPrimary)
})
setDrawableByLayerId(R.id.ic_badge, BadgeDrawable(context))
@ -146,7 +146,7 @@ class NavBottomBar : BottomAppBar {
menu.add(0, -1, 0, "Menu")
.setIcon(IconicsDrawable(context).apply {
this.icon = NavLibFont.Icon.nav_dots_vertical
sizeDp = 20
sizeDp = 24
colorAttr(context, R.attr.colorOnPrimary)
})
.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS)

View File

@ -280,7 +280,6 @@ class NavBottomSheet : CoordinatorLayout {
return null
return IconicsDrawable(context, icon).apply {
sizeDp = 24
paddingDp = 4
}
}
@ -389,7 +388,7 @@ class NavBottomSheet : CoordinatorLayout {
is Drawable -> value
is IIcon -> IconicsDrawable(context).apply {
icon = value
sizeDp = 34
sizeDp = 24
// colorInt = Color.BLACK
}
is Int -> context.getDrawableFromRes(value)

View File

@ -32,8 +32,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bottom_sheet_background"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingHorizontal="8dp"
tools:paddingBottom="48dp"
android:orientation="vertical">
@ -107,4 +106,4 @@
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>
</layout>