Compare commits

...

8 Commits

Author SHA1 Message Date
Kuba Szczodrzyński
a5a1597e40 Bump version to 0.8.0 2021-03-29 21:51:53 +02:00
Kuba Szczodrzyński
60cc1171f9 Set all icon sizes to 24dp 2021-03-29 21:44:28 +02:00
Kuba Szczodrzyński
8f10321820 Update Iconics to 5.3.0-b01 2021-03-29 21:43:49 +02:00
Kuba Szczodrzyński
30d86d9618 Bump version to 0.7.2 2021-03-21 22:22:03 +01:00
Kuba Szczodrzyński
556d568228 Fix changing drawer selection instead of adding another 2021-03-21 22:21:51 +01:00
Kuba Szczodrzyński
8a0e0438a5 Bump version to 0.7.1 2021-03-21 21:46:58 +01:00
Kuba Szczodrzyński
578306480b Fix setting drawer drag margin on Android 10+ 2021-03-21 21:46:04 +01:00
Kuba Szczodrzyński
7430169359 Update Kotlin, replace MaterialDrawer with a forked version 2021-03-21 21:33:35 +01:00
12 changed files with 23 additions and 28 deletions

View File

@ -42,7 +42,7 @@ dependencies {
implementation "com.google.android.material:material:1.3.0"
implementation 'androidx.multidex:multidex:2.0.1'
implementation "com.mikepenz:iconics-views:5.2.8"
implementation "com.mikepenz:iconics-views:5.3.0-b01"
implementation "com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar"
// implementation "pl.droidsonroids.gif:android-gif-drawable:1.2.15"

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

@ -2,12 +2,12 @@
buildscript {
ext {
kotlin_version = '1.4.30'
kotlin_version = '1.4.31'
release = [
// major.minor.patch.rc.beta
versionName: "0.7.0",
versionCode: 70099
versionName: "0.8.0",
versionCode: 80099
]
setup = [

View File

@ -39,6 +39,6 @@ android {
}
dependencies {
implementation "com.mikepenz:iconics-core:5.2.8"
implementation "com.mikepenz:iconics-typeface-api:5.3.0-b01"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}

View File

@ -36,7 +36,7 @@ android {
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation "androidx.appcompat:appcompat:1.2.0"
implementation "androidx.core:core-ktx:1.3.2"
implementation "androidx.recyclerview:recyclerview:1.1.0"
@ -44,7 +44,7 @@ dependencies {
api "com.mikepenz:materialize:1.2.1"
api "com.mikepenz:materialdrawer:8.3.3"
api "com.mikepenz:iconics-core:5.2.8"
api "com.mikepenz:iconics-core:5.3.0-b01"
api "com.mikepenz:itemanimators:1.1.0"
compileOnly "pl.droidsonroids.gif:android-gif-drawable:1.2.15"

View File

@ -1,2 +1 @@
-keep class androidx.drawerlayout.widget.DrawerLayout { *; }
-keep class androidx.customview.widget.ViewDragHelper { *; }

View File

@ -21,4 +21,3 @@
#-renamesourcefileattribute SourceFile
-keep class androidx.drawerlayout.widget.DrawerLayout { *; }
-keep class androidx.customview.widget.ViewDragHelper { *; }

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

@ -280,19 +280,17 @@ class NavDrawer(
val mDrawerLayout = drawerLayout
val mDragger = mDrawerLayout::class.java.getDeclaredField(
"mLeftDragger"
)//mRightDragger for right obviously
)
mDragger.isAccessible = true
val draggerObj = mDragger.get(mDrawerLayout) as ViewDragHelper?
draggerObj?.edgeSize = size.toInt()
val mEdgeSize = draggerObj?.javaClass?.getDeclaredField(
"mEdgeSize"
// update for SDK >= 29 (Android 10)
val useSystemInsets = mDrawerLayout::class.java.getDeclaredField(
"sEdgeSizeUsingSystemGestureInsets"
)
mEdgeSize?.isAccessible = true
mEdgeSize?.setInt(
draggerObj,
size.toInt()
) //optimal value as for me, you may set any constant in dp
useSystemInsets.isAccessible = true
useSystemInsets.set(null, false)
}
catch (e: Exception) {
e.printStackTrace()
@ -477,7 +475,7 @@ class NavDrawer(
}
if (drawer.selectedItemIdentifier != id.toLong() || !fireOnClick)
drawer.setSelection(id.toLong(), fireOnClick)
drawer.setSelectionAtPosition(drawer.getPosition(id.toLong()), fireOnClick)
miniDrawer.setSelection(-1L)
if (drawerMode == DRAWER_MODE_MINI)

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>