Skip to content

Commit

Permalink
Merge pull request #615 from mikepenz/develop
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
mikepenz authored Nov 12, 2021
2 parents a93b31b + 5f4f272 commit ff43dbd
Show file tree
Hide file tree
Showing 19 changed files with 6,849 additions and 6,040 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

## Latest releases 🛠

- Kotlin Next Gen | [v5.3.2](https://github.com/mikepenz/Android-Iconics/tree/v5.3.2)
- Kotlin Next Gen | [v5.3.3](https://github.com/mikepenz/Android-Iconics/tree/v5.3.3)
- Kotlin | [v4.0.2](https://github.com/mikepenz/Android-Iconics/tree/v4.0.2)
- Java AndroidX | [v3.2.5](https://github.com/mikepenz/Android-Iconics/tree/v3.2.5)
- Java Appcompat | [v3.0.4](https://github.com/mikepenz/Android-Iconics/tree/v3.0.4)
Expand Down Expand Up @@ -84,7 +84,7 @@ implementation 'com.mikepenz:material-design-iconic-typeface:2.2.0.8-kotlin@aar'
implementation 'com.mikepenz:fontawesome-typeface:5.9.0.2-kotlin@aar'
implementation 'com.mikepenz:octicons-typeface:11.1.0.0-kotlin@aar'
implementation 'com.mikepenz:meteocons-typeface:1.1.0.7-kotlin@aar'
implementation 'com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar' // note 5.3.45.1 alphabetically sorts, and merges in 3 sections
implementation 'com.mikepenz:community-material-typeface:6.4.95.0-kotlin@aar' // note 5.3.45.1 and newer alphabetically sorts, and merges in 3 sections
implementation 'com.mikepenz:weather-icons-typeface:2.0.10.7-kotlin@aar'
implementation 'com.mikepenz:typeicons-typeface:2.0.7.7-kotlin@aar'
implementation 'com.mikepenz:entypo-typeface:1.0.0.7-kotlin@aar'
Expand All @@ -96,6 +96,10 @@ implementation 'com.mikepenz:material-design-icons-dx-typeface:5.0.1.2-kotlin@aa
implementation 'com.mikepenz:phosphor-typeface:1.0.0.0-kotlin@aar'
```

## Note

⚠️ The fonts use the `jetpack startup` library to automatically register themself. If `jetpack startup` is disabled, it is required to manually register the fonts. Please find additional details in the [Register fonts](#register-fonts).

# Usage
## Use as drawable

Expand Down
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
buildToolsVersion setup.buildTools

defaultConfig {
minSdkVersion setup.minSdk
minSdkVersion setup.composeMinSdk
targetSdkVersion setup.targetSdk
versionCode release.versionCode
versionName release.versionName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package com.mikepenz.iconics.sample

import androidx.multidex.MultiDexApplication
import com.google.android.material.color.DynamicColors
import com.mikepenz.iconics.Iconics
import com.mikepenz.iconics.sample.typeface.CustomFont
import com.mikepenz.iconics.typeface.GenericFont
Expand All @@ -25,6 +26,8 @@ class CustomApplication : MultiDexApplication() {
override fun onCreate() {
super.onCreate()

DynamicColors.applyToActivitiesIfAvailable(this)

//register custom fonts like this (or also provide a font definition file)
Iconics.registerFont(CustomFont)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.SearchView
import androidx.drawerlayout.widget.DrawerLayout
import com.mikepenz.aboutlibraries.LibsBuilder
import com.mikepenz.aboutlibraries.util.getThemeColor
import com.mikepenz.iconics.Iconics
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.sample.databinding.ActivityMainBinding
import com.mikepenz.iconics.sample.utils.getThemeColor
import com.mikepenz.iconics.typeface.IIcon
import com.mikepenz.iconics.typeface.ITypeface
import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand
Expand Down Expand Up @@ -217,7 +217,6 @@ class MainActivity : AppCompatActivity() {
}
R.id.action_opensource -> {
LibsBuilder()
.withFields(R.string::class.java.fields)
.withLicenseShown(true)
.withActivityTitle(getString(R.string.action_opensource))
.withEdgeToEdge(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ import android.os.Bundle
import android.text.Spannable
import android.text.SpannableString
import android.text.SpannableStringBuilder
import android.text.style.*
import android.text.style.BackgroundColorSpan
import android.text.style.DynamicDrawableSpan
import android.text.style.ForegroundColorSpan
import android.text.style.ImageSpan
import android.text.style.RelativeSizeSpan
import android.text.style.StyleSpan
import android.view.LayoutInflater
import android.view.Menu
import android.view.MenuItem
Expand All @@ -36,12 +41,12 @@ import android.widget.ImageView
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.BindingAdapter
import androidx.databinding.DataBindingUtil
import com.mikepenz.aboutlibraries.util.getThemeColor
import com.mikepenz.iconics.Iconics
import com.mikepenz.iconics.IconicsArrayBuilder
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.IconicsSize
import com.mikepenz.iconics.sample.databinding.ActivityPlaygroundBinding
import com.mikepenz.iconics.sample.utils.getThemeColor
import com.mikepenz.iconics.typeface.library.community.material.CommunityMaterial
import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome
import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ import android.graphics.Color
import android.view.View
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.mikepenz.aboutlibraries.util.getThemeColor
import com.mikepenz.fastadapter.items.AbstractItem
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.sample.R
import com.mikepenz.iconics.sample.utils.getThemeColor
import com.mikepenz.iconics.utils.colorInt
import com.mikepenz.iconics.utils.contourColorInt
import com.mikepenz.iconics.utils.contourWidthDp
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.mikepenz.iconics.sample.utils

import android.content.Context
import android.util.TypedValue
import androidx.core.content.ContextCompat

fun Context.getThemeColor(attr: Int): Int {
val tv = TypedValue()
return if (this.theme.resolveAttribute(attr, tv, true)) {
if (tv.resourceId != 0) {
ContextCompat.getColor(this, tv.resourceId)
} else {
tv.data
}
} else {
0
}
}
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_playground.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/root"
android:gravity="center">

<androidx.appcompat.widget.Toolbar
Expand Down
7 changes: 1 addition & 6 deletions app/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@

<style name="AppTheme" parent="BaseTheme"></style>

<style name="BaseTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- ...and here we setting appcompat’s color theming attrs -->
<item name="colorPrimary">@color/primary</item>
<item name="colorPrimaryDark">@color/primary_dark</item>
<item name="colorAccent">@color/accent</item>

<style name="BaseTheme" parent="Theme.Material3.DayNight.NoActionBar">
<!-- CAB :D -->
<item name="windowActionModeOverlay">true</item>

Expand Down
18 changes: 9 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ buildscript {

ext {
release = [
versionName: "5.3.2",
versionCode: 50302
versionName: "5.3.3",
versionCode: 50303
]

setup = [
Expand All @@ -31,24 +31,24 @@ buildscript {
]

versions = [
kotlin : '1.5.30',
kotlin : '1.5.31',
androidX : '1.0.0',
recyclerView : '1.2.1',
material : '1.4.0',
material : '1.5.0-beta01',
appcompat : '1.3.1',
drawerlayout : '1.1.0',
constraintLayout: '2.0.4',
cardview : '1.0.0',
ktx : [
core: '1.6.0'
core: '1.7.0'
],
startup : '1.1.0',
detekt : '1.18.1',
aboutLibraries : '8.9.3',
materialDrawer : '8.4.4',
aboutLibraries : '10.0.0-a04',
materialDrawer : '9.0.0-a02',
fastAdapter : '5.5.1',
// compose
compose : '1.0.3'
compose : '1.0.5'
]
}

Expand All @@ -61,7 +61,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.0-alpha13'
classpath 'com.android.tools.build:gradle:7.2.0-alpha04'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${versions.detekt}"
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${versions.aboutLibraries}"
Expand Down
4 changes: 2 additions & 2 deletions community-material-typeface-library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ android {
minSdkVersion setup.minSdk
targetSdkVersion setup.targetSdk
consumerProguardFiles 'consumer-proguard-rules.pro'
versionCode 58550
versionName "5.8.55.0-kotlin"
versionCode 64950
versionName "6.4.95.0-kotlin"

resValue "string", "community_material_version", "${versionName}"
}
Expand Down
Loading

0 comments on commit ff43dbd

Please sign in to comment.