diff --git a/README.md b/README.md index a821f1222..4b7ef8134 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ ## Latest releases 🛠 -- Kotlin && New | [v8.4.3](https://github.com/mikepenz/MaterialDrawer/tree/v8.4.3) +- Kotlin && New | [v8.4.4](https://github.com/mikepenz/MaterialDrawer/tree/v8.4.4) - Kotlin | [v7.0.0](https://github.com/mikepenz/MaterialDrawer/tree/v7.0.0) | (Builder approach like v6.x) - Java && AndroidX | [v6.1.2](https://github.com/mikepenz/MaterialDrawer/tree/v6.1.2) - Java && AppCompat | [v6.0.9](https://github.com/mikepenz/MaterialDrawer/tree/v6.0.9) @@ -212,7 +212,7 @@ implementation 'com.mikepenz:fontawesome-typeface:x.y.z@aar' //FontAwesome //now you can simply use any icon of the Google Material Icons font PrimaryDrawerItem().apply { iconicsIcon = GoogleMaterial.Icon.gmd_wb_sunny } //Or an icon from FontAwesome -SecondaryDrawerItem().apply { iconicsIcon = FontAwesome.Icon.faw_github } +SecondaryDrawerItem().apply { iconicsIcon = FontAwesomeBrand.Icon.fab_github } ``` # Advanced Setup diff --git a/app/build.gradle b/app/build.gradle index a077f802a..d70ef431a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -73,7 +73,7 @@ dependencies { implementation "androidx.swiperefreshlayout:swiperefreshlayout:${versions.swiperefreshLayout}" // used to showcase how to load images - implementation("io.coil-kt:coil:1.3.0") + implementation("io.coil-kt:coil:1.3.2") // the sample uses more advanced functions of the fastadapter // https://github.com/mikepenz/FastAdapter/ @@ -96,8 +96,8 @@ dependencies { // icon fonts used inside the sample // https://github.com/mikepenz/Android-Iconics - implementation 'com.mikepenz:google-material-typeface:4.0.0.1-kotlin@aar' - implementation 'com.mikepenz:fontawesome-typeface:5.9.0.2-kotlin@aar' + implementation 'com.mikepenz:google-material-typeface:4.0.0.2-kotlin@aar' + implementation 'com.mikepenz:fontawesome-typeface:5.13.3.0-kotlin@aar' implementation 'com.mikepenz:octicons-typeface:11.1.0.0-kotlin@aar' // navigation diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/AdvancedActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/AdvancedActivity.kt index 81d99198c..1beac9c38 100755 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/AdvancedActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/AdvancedActivity.kt @@ -10,6 +10,7 @@ import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.widget.PopupMenu import com.mikepenz.iconics.IconicsDrawable import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome +import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.utils.actionBar import com.mikepenz.iconics.utils.backgroundColorRes @@ -77,19 +78,30 @@ class AdvancedActivity : AppCompatActivity() { } iconicsIcon = GoogleMaterial.Icon.gmd_filter_center_focus }, - CustomPrimaryDrawerItem().apply { nameRes = R.string.drawer_item_free_play; iconicsIcon = FontAwesome.Icon.faw_gamepad; background = ColorHolder.fromColorRes(R.color.colorAccent) }, - PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_custom; descriptionText = "This is a description"; iconicsIcon = FontAwesome.Icon.faw_eye }, - CustomUrlPrimaryDrawerItem().apply { nameRes = R.string.drawer_item_fragment_drawer; description = StringHolder(R.string.drawer_item_fragment_drawer_desc); iconUrl = "https://avatars3.githubusercontent.com/u/1476232?v=3&s=460" }, - SectionDrawerItem().apply { nameRes = R.string.drawer_item_section_header }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_settings; iconicsIcon = FontAwesome.Icon.faw_cart_plus }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_help; iconicsIcon = FontAwesome.Icon.faw_database; isEnabled = false }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesome.Icon.faw_github }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_contact; tag = "Bullhorn"; iconDrawable = IconicsDrawable(this@AdvancedActivity, GoogleMaterial.Icon.gmd_add).apply { actionBar(); paddingDp = 5 }; isIconTinted = true }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_help; iconicsIcon = FontAwesome.Icon.faw_question; isEnabled = false } + CustomPrimaryDrawerItem().apply { + nameRes = R.string.drawer_item_free_play; iconicsIcon = FontAwesome.Icon.faw_gamepad; background = + ColorHolder.fromColorRes(R.color.colorAccent) + }, + PrimaryDrawerItem().apply { + nameRes = R.string.drawer_item_custom; descriptionText = "This is a description"; iconicsIcon = FontAwesome.Icon.faw_eye + }, + CustomUrlPrimaryDrawerItem().apply { + nameRes = R.string.drawer_item_fragment_drawer; description = StringHolder(R.string.drawer_item_fragment_drawer_desc); iconUrl = + "https://avatars3.githubusercontent.com/u/1476232?v=3&s=460" + }, + SectionDrawerItem().apply { nameRes = R.string.drawer_item_section_header }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_settings; iconicsIcon = FontAwesome.Icon.faw_cart_plus }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_help; iconicsIcon = FontAwesome.Icon.faw_database; isEnabled = false }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesomeBrand.Icon.fab_github }, + SecondaryDrawerItem().apply { + nameRes = R.string.drawer_item_contact; tag = "Bullhorn"; iconDrawable = + IconicsDrawable(this@AdvancedActivity, GoogleMaterial.Icon.gmd_add).apply { actionBar(); paddingDp = 5 }; isIconTinted = true + }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_help; iconicsIcon = FontAwesome.Icon.faw_question; isEnabled = false } ) addStickyDrawerItems( SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_settings; iconicsIcon = FontAwesome.Icon.faw_cog; identifier = 10 }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesome.Icon.faw_github } + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesomeBrand.Icon.fab_github } ) onDrawerItemClickListener = { _, drawerItem, _ -> if (drawerItem is Nameable) { diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/CollapsingToolbarActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/CollapsingToolbarActivity.kt index ca053d0ad..9234f7fd2 100644 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/CollapsingToolbarActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/CollapsingToolbarActivity.kt @@ -6,6 +6,7 @@ import androidx.appcompat.app.AppCompatActivity import coil.load import com.mikepenz.iconics.IconicsDrawable import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome +import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.utils.actionBar import com.mikepenz.iconics.utils.colorInt @@ -64,14 +65,14 @@ class CollapsingToolbarActivity : AppCompatActivity() { private fun MaterialDrawerSliderView.setDrawerItems() { removeAllItems() itemAdapter.add( - PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_home; iconicsIcon = FontAwesome.Icon.faw_home; identifier = 1 }, - PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_free_play; iconicsIcon = FontAwesome.Icon.faw_gamepad }, - PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_custom; iconicsIcon = FontAwesome.Icon.faw_eye; identifier = 5 }, - SectionDrawerItem().apply { nameRes = R.string.drawer_item_section_header }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_settings; iconicsIcon = FontAwesome.Icon.faw_cog }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_help; iconicsIcon = FontAwesome.Icon.faw_question; isEnabled = false }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesome.Icon.faw_github }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_contact; iconicsIcon = FontAwesome.Icon.faw_bullhorn } + PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_home; iconicsIcon = FontAwesome.Icon.faw_home; identifier = 1 }, + PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_free_play; iconicsIcon = FontAwesome.Icon.faw_gamepad }, + PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_custom; iconicsIcon = FontAwesome.Icon.faw_eye; identifier = 5 }, + SectionDrawerItem().apply { nameRes = R.string.drawer_item_section_header }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_settings; iconicsIcon = FontAwesome.Icon.faw_cog }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_help; iconicsIcon = FontAwesome.Icon.faw_question; isEnabled = false }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesomeBrand.Icon.fab_github }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_contact; iconicsIcon = FontAwesome.Icon.faw_bullhorn } ) } diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/CompactHeaderDrawerActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/CompactHeaderDrawerActivity.kt index 9f4976c6a..266f514c8 100755 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/CompactHeaderDrawerActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/CompactHeaderDrawerActivity.kt @@ -17,6 +17,7 @@ import androidx.core.content.ContextCompat import androidx.core.content.res.ResourcesCompat import com.mikepenz.iconics.IconicsDrawable import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome +import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.utils.actionBar import com.mikepenz.iconics.utils.paddingDp @@ -81,14 +82,14 @@ class CompactHeaderDrawerActivity : AppCompatActivity() { binding.slider.apply { itemAdapter.add( - PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_home; iconicsIcon = FontAwesome.Icon.faw_home; identifier = 1 }, - PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_free_play; iconicsIcon = FontAwesome.Icon.faw_gamepad }, - PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_custom; iconicsIcon = FontAwesome.Icon.faw_eye; identifier = 5 }, - SectionDrawerItem().apply { nameRes = R.string.drawer_item_section_header }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_settings; iconicsIcon = FontAwesome.Icon.faw_cog }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_help; iconicsIcon = FontAwesome.Icon.faw_question; isEnabled = false }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesome.Icon.faw_github }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_contact; iconicsIcon = FontAwesome.Icon.faw_bullhorn } + PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_home; iconicsIcon = FontAwesome.Icon.faw_home; identifier = 1 }, + PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_free_play; iconicsIcon = FontAwesome.Icon.faw_gamepad }, + PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_custom; iconicsIcon = FontAwesome.Icon.faw_eye; identifier = 5 }, + SectionDrawerItem().apply { nameRes = R.string.drawer_item_section_header }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_settings; iconicsIcon = FontAwesome.Icon.faw_cog }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_help; iconicsIcon = FontAwesome.Icon.faw_question; isEnabled = false }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesomeBrand.Icon.fab_github }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_contact; iconicsIcon = FontAwesome.Icon.faw_bullhorn } ) onDrawerItemClickListener = { _, drawerItem, _ -> if (drawerItem.identifier == 1L) { diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/CrossfadeDrawerLayoutActvitiy.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/CrossfadeDrawerLayoutActvitiy.kt index 483f46126..e1f2e2713 100644 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/CrossfadeDrawerLayoutActvitiy.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/CrossfadeDrawerLayoutActvitiy.kt @@ -8,6 +8,7 @@ import androidx.appcompat.app.ActionBarDrawerToggle import androidx.appcompat.app.AppCompatActivity import androidx.core.view.GravityCompat import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome +import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand import com.mikepenz.materialdrawer.app.databinding.ActivitySampleCrossfaderBinding import com.mikepenz.materialdrawer.iconics.iconicsIcon import com.mikepenz.materialdrawer.interfaces.ICrossfader @@ -61,14 +62,14 @@ class CrossfadeDrawerLayoutActvitiy : AppCompatActivity() { binding.crossFadeLargeView.apply { itemAdapter.add( - PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_home; iconicsIcon = FontAwesome.Icon.faw_home; identifier = 1 }, - PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_free_play; iconicsIcon = FontAwesome.Icon.faw_gamepad }, - PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_custom; iconicsIcon = FontAwesome.Icon.faw_eye; identifier = 5 }, - SectionDrawerItem().apply { nameRes = R.string.drawer_item_section_header }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_settings; iconicsIcon = FontAwesome.Icon.faw_cog }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_help; iconicsIcon = FontAwesome.Icon.faw_question; isEnabled = false }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesome.Icon.faw_github }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_contact; iconicsIcon = FontAwesome.Icon.faw_bullhorn } + PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_home; iconicsIcon = FontAwesome.Icon.faw_home; identifier = 1 }, + PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_free_play; iconicsIcon = FontAwesome.Icon.faw_gamepad }, + PrimaryDrawerItem().apply { nameRes = R.string.drawer_item_custom; iconicsIcon = FontAwesome.Icon.faw_eye; identifier = 5 }, + SectionDrawerItem().apply { nameRes = R.string.drawer_item_section_header }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_settings; iconicsIcon = FontAwesome.Icon.faw_cog }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_help; iconicsIcon = FontAwesome.Icon.faw_question; isEnabled = false }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesomeBrand.Icon.fab_github }, + SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_contact; iconicsIcon = FontAwesome.Icon.faw_bullhorn } ) onDrawerItemClickListener = { v, drawerItem, position -> if (drawerItem is Nameable) { diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/DrawerActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/DrawerActivity.kt index 8074f608d..d08482b7c 100755 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/DrawerActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/DrawerActivity.kt @@ -10,6 +10,7 @@ import androidx.appcompat.app.AppCompatActivity import com.mikepenz.aboutlibraries.LibsBuilder import com.mikepenz.iconics.IconicsDrawable import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome +import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.utils.actionBar import com.mikepenz.iconics.utils.paddingDp @@ -114,26 +115,34 @@ class DrawerActivity : AppCompatActivity() { SecondaryDrawerItem().apply { nameText = "CollapsableItem 2"; level = 2; iconicsIcon = GoogleMaterial.Icon.gmd_format_bold; identifier = 2001 } ) }, - ExpandableDrawerItem().apply { - nameText = "Collapsable"; iconicsIcon = GoogleMaterial.Icon.gmd_filter_list; identifier = 19; isSelectable = false - subItems = mutableListOf( - SecondaryDrawerItem().apply { nameText = "CollapsableItem"; level = 2; iconicsIcon = GoogleMaterial.Icon.gmd_filter_list; identifier = 2002 }, - SecondaryDrawerItem().apply { nameText = "CollapsableItem 2"; level = 2; iconicsIcon = GoogleMaterial.Icon.gmd_filter_list; identifier = 2003 } - ) - }, - SectionDrawerItem().apply { nameRes = R.string.drawer_item_section_header }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesome.Icon.faw_github; identifier = 20; isSelectable = false }, - SecondaryDrawerItem().apply { nameRes = R.string.drawer_item_contact; iconicsIcon = GoogleMaterial.Icon.gmd_format_color_fill; identifier = 21; isSelectable = false } - /*, - DividerDrawerItem () - SwitchDrawerItem ().withName("Switch").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener) - SwitchDrawerItem ().withName("Switch2").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener).withSelectable(false) - ToggleDrawerItem ().withName("Toggle").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener) - DividerDrawerItem () - SecondarySwitchDrawerItem ().withName("Secondary switch").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener) - SecondarySwitchDrawerItem ().withName("Secondary Switch2").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener).withSelectable(false) - SecondaryToggleDrawerItem ().withName("Secondary toggle").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener) - */ + ExpandableDrawerItem().apply { + nameText = "Collapsable"; iconicsIcon = GoogleMaterial.Icon.gmd_filter_list; identifier = 19; isSelectable = false + subItems = mutableListOf( + SecondaryDrawerItem().apply { + nameText = "CollapsableItem"; level = 2; iconicsIcon = GoogleMaterial.Icon.gmd_filter_list; identifier = 2002 + }, + SecondaryDrawerItem().apply { + nameText = "CollapsableItem 2"; level = 2; iconicsIcon = GoogleMaterial.Icon.gmd_filter_list; identifier = 2003 + } + ) + }, + SectionDrawerItem().apply { nameRes = R.string.drawer_item_section_header }, + SecondaryDrawerItem().apply { + nameRes = R.string.drawer_item_open_source; iconicsIcon = FontAwesomeBrand.Icon.fab_github; identifier = 20; isSelectable = false + }, + SecondaryDrawerItem().apply { + nameRes = R.string.drawer_item_contact; iconicsIcon = GoogleMaterial.Icon.gmd_format_color_fill; identifier = 21; isSelectable = false + } + /*, + DividerDrawerItem () + SwitchDrawerItem ().withName("Switch").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener) + SwitchDrawerItem ().withName("Switch2").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener).withSelectable(false) + ToggleDrawerItem ().withName("Toggle").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener) + DividerDrawerItem () + SecondarySwitchDrawerItem ().withName("Secondary switch").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener) + SecondarySwitchDrawerItem ().withName("Secondary Switch2").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener).withSelectable(false) + SecondaryToggleDrawerItem ().withName("Secondary toggle").withIcon(Octicons.Icon.oct_tools).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener) + */ ) onDrawerItemClickListener = { _, drawerItem, _ -> //check if the drawerItem is set. @@ -175,7 +184,7 @@ class DrawerActivity : AppCompatActivity() { //slider.addStickyDrawerItems( // SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog).withIdentifier(10), - // SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github) + // SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesomeBrand.Icon.fab_github) //) //only set the active selection or active profile if we do not recreate the activity diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/EmbeddedDrawerActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/EmbeddedDrawerActivity.kt index 776dd0719..08178fed5 100755 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/EmbeddedDrawerActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/EmbeddedDrawerActivity.kt @@ -11,6 +11,7 @@ import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import com.mikepenz.iconics.IconicsDrawable import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome +import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.utils.actionBar import com.mikepenz.iconics.utils.paddingDp @@ -91,17 +92,21 @@ class EmbeddedDrawerActivity : AppCompatActivity() { binding.slider.apply { customWidth = ViewGroup.LayoutParams.MATCH_PARENT itemAdapter.add( - PrimaryDrawerItem().withName(R.string.drawer_item_compact_header).withIcon(GoogleMaterial.Icon.gmd_brightness_5).withIdentifier(1), - PrimaryDrawerItem().withName(R.string.drawer_item_action_bar_drawer).withIcon(FontAwesome.Icon.faw_home).withBadge("22").withBadgeStyle(BadgeStyle(Color.RED, Color.RED)).withIdentifier(2), - PrimaryDrawerItem().withName(R.string.drawer_item_multi_drawer).withIcon(FontAwesome.Icon.faw_gamepad).withIdentifier(3), - PrimaryDrawerItem().withName(R.string.drawer_item_non_translucent_status_drawer).withIcon(FontAwesome.Icon.faw_eye).withIdentifier(4), - PrimaryDrawerItem().withDescription("A more complex sample").withName(R.string.drawer_item_advanced_drawer).withIcon(GoogleMaterial.Icon.gmd_adb).withIdentifier(5), - SectionDrawerItem().withName(R.string.drawer_item_section_header), - SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github), - SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(GoogleMaterial.Icon.gmd_format_color_fill).withTag("Bullhorn"), - DividerDrawerItem(), - SwitchDrawerItem().withName("Switch").withIcon(GoogleMaterial.Icon.gmd_pan_tool).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener), - ToggleDrawerItem().withName("Toggle").withIcon(GoogleMaterial.Icon.gmd_pan_tool).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener) + PrimaryDrawerItem().withName(R.string.drawer_item_compact_header).withIcon(GoogleMaterial.Icon.gmd_brightness_5).withIdentifier(1), + PrimaryDrawerItem().withName(R.string.drawer_item_action_bar_drawer).withIcon(FontAwesome.Icon.faw_home).withBadge("22") + .withBadgeStyle(BadgeStyle(Color.RED, Color.RED)).withIdentifier(2), + PrimaryDrawerItem().withName(R.string.drawer_item_multi_drawer).withIcon(FontAwesome.Icon.faw_gamepad).withIdentifier(3), + PrimaryDrawerItem().withName(R.string.drawer_item_non_translucent_status_drawer).withIcon(FontAwesome.Icon.faw_eye).withIdentifier(4), + PrimaryDrawerItem().withDescription("A more complex sample").withName(R.string.drawer_item_advanced_drawer) + .withIcon(GoogleMaterial.Icon.gmd_adb).withIdentifier(5), + SectionDrawerItem().withName(R.string.drawer_item_section_header), + SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesomeBrand.Icon.fab_github), + SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(GoogleMaterial.Icon.gmd_format_color_fill).withTag("Bullhorn"), + DividerDrawerItem(), + SwitchDrawerItem().withName("Switch").withIcon(GoogleMaterial.Icon.gmd_pan_tool).withChecked(true) + .withOnCheckedChangeListener(onCheckedChangeListener), + ToggleDrawerItem().withName("Toggle").withIcon(GoogleMaterial.Icon.gmd_pan_tool).withChecked(true) + .withOnCheckedChangeListener(onCheckedChangeListener) ) onDrawerItemClickListener = { v, drawerItem, position -> if (drawerItem is Nameable) { diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/FullscreenDrawerActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/FullscreenDrawerActivity.kt index 5fa071123..7bad44cda 100755 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/FullscreenDrawerActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/FullscreenDrawerActivity.kt @@ -9,6 +9,7 @@ import androidx.appcompat.app.AppCompatActivity import androidx.core.view.ViewCompat import androidx.core.view.updatePadding import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome +import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand import com.mikepenz.materialdrawer.app.databinding.ActivitySampleFullscreenBinding import com.mikepenz.materialdrawer.iconics.withIcon import com.mikepenz.materialdrawer.model.PrimaryDrawerItem @@ -40,24 +41,24 @@ class FullscreenDrawerActivity : AppCompatActivity() { binding.slider.apply { itemAdapter.add( - PrimaryDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1), - PrimaryDrawerItem().withName(R.string.drawer_item_free_play).withIcon(FontAwesome.Icon.faw_gamepad), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), - //add some more items to get a scrolling list - SectionDrawerItem().withName(R.string.drawer_item_section_header), - SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog), - SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).withEnabled(false), - SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github), - SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn), - SectionDrawerItem().withName(R.string.drawer_item_section_header), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), + PrimaryDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1), + PrimaryDrawerItem().withName(R.string.drawer_item_free_play).withIcon(FontAwesome.Icon.faw_gamepad), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), + //add some more items to get a scrolling list + SectionDrawerItem().withName(R.string.drawer_item_section_header), + SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog), + SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).withEnabled(false), + SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesomeBrand.Icon.fab_github), + SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn), + SectionDrawerItem().withName(R.string.drawer_item_section_header), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye) diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/MiniDrawerActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/MiniDrawerActivity.kt index a53930536..314c81ad3 100755 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/MiniDrawerActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/MiniDrawerActivity.kt @@ -17,6 +17,7 @@ import com.mikepenz.crossfader.util.UIUtils import com.mikepenz.crossfader.view.CrossFadeSlidingPaneLayout import com.mikepenz.iconics.IconicsDrawable import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome +import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.utils.actionBar import com.mikepenz.iconics.utils.colorInt @@ -107,18 +108,23 @@ class MiniDrawerActivity : AppCompatActivity() { accountHeader = this@MiniDrawerActivity.headerView customWidth = MATCH_PARENT itemAdapter.add( - PrimaryDrawerItem().withName(R.string.drawer_item_compact_header).withIcon(GoogleMaterial.Icon.gmd_brightness_5).withIdentifier(1), - PrimaryDrawerItem().withName("Item NOT in mini drawer").withIcon(GoogleMaterial.Icon.gmd_bluetooth).withIdentifier(100).withIsHiddenInMiniDrawer(true), - PrimaryDrawerItem().withName(R.string.drawer_item_action_bar_drawer).withIcon(FontAwesome.Icon.faw_home).withBadge("22").withBadgeStyle(BadgeStyle(Color.RED, Color.RED)).withIdentifier(2).withSelectable(false), - PrimaryDrawerItem().withName(R.string.drawer_item_multi_drawer).withIcon(FontAwesome.Icon.faw_gamepad).withIdentifier(3), - PrimaryDrawerItem().withName(R.string.drawer_item_non_translucent_status_drawer).withIcon(FontAwesome.Icon.faw_eye).withIdentifier(4), - PrimaryDrawerItem().withDescription("A more complex sample").withName(R.string.drawer_item_advanced_drawer).withIcon(GoogleMaterial.Icon.gmd_adb).withIdentifier(5), - SectionDrawerItem().withName(R.string.drawer_item_section_header), - SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github), - SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(GoogleMaterial.Icon.gmd_format_color_fill).withTag("Bullhorn"), - DividerDrawerItem(), - SwitchDrawerItem().withName("Switch").withIcon(GoogleMaterial.Icon.gmd_pan_tool).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener), - ToggleDrawerItem().withName("Toggle").withIcon(GoogleMaterial.Icon.gmd_pan_tool).withChecked(true).withOnCheckedChangeListener(onCheckedChangeListener) + PrimaryDrawerItem().withName(R.string.drawer_item_compact_header).withIcon(GoogleMaterial.Icon.gmd_brightness_5).withIdentifier(1), + PrimaryDrawerItem().withName("Item NOT in mini drawer").withIcon(GoogleMaterial.Icon.gmd_bluetooth).withIdentifier(100) + .withIsHiddenInMiniDrawer(true), + PrimaryDrawerItem().withName(R.string.drawer_item_action_bar_drawer).withIcon(FontAwesome.Icon.faw_home).withBadge("22") + .withBadgeStyle(BadgeStyle(Color.RED, Color.RED)).withIdentifier(2).withSelectable(false), + PrimaryDrawerItem().withName(R.string.drawer_item_multi_drawer).withIcon(FontAwesome.Icon.faw_gamepad).withIdentifier(3), + PrimaryDrawerItem().withName(R.string.drawer_item_non_translucent_status_drawer).withIcon(FontAwesome.Icon.faw_eye).withIdentifier(4), + PrimaryDrawerItem().withDescription("A more complex sample").withName(R.string.drawer_item_advanced_drawer) + .withIcon(GoogleMaterial.Icon.gmd_adb).withIdentifier(5), + SectionDrawerItem().withName(R.string.drawer_item_section_header), + SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesomeBrand.Icon.fab_github), + SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(GoogleMaterial.Icon.gmd_format_color_fill).withTag("Bullhorn"), + DividerDrawerItem(), + SwitchDrawerItem().withName("Switch").withIcon(GoogleMaterial.Icon.gmd_pan_tool).withChecked(true) + .withOnCheckedChangeListener(onCheckedChangeListener), + ToggleDrawerItem().withName("Toggle").withIcon(GoogleMaterial.Icon.gmd_pan_tool).withChecked(true) + .withOnCheckedChangeListener(onCheckedChangeListener) ) onDrawerItemClickListener = { v, item, position -> if (item is Nameable) { diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/MultiDrawerActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/MultiDrawerActivity.kt index dd4d21625..b484ff937 100755 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/MultiDrawerActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/MultiDrawerActivity.kt @@ -5,6 +5,7 @@ import android.view.MenuItem import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome +import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand import com.mikepenz.materialdrawer.app.databinding.ActivityMultiSampleBinding import com.mikepenz.materialdrawer.app.drawerItems.GmailDrawerItem import com.mikepenz.materialdrawer.iconics.withIcon @@ -31,14 +32,14 @@ class MultiDrawerActivity : AppCompatActivity() { binding.slider.apply { itemAdapter.add( - GmailDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1), - GmailDrawerItem().withName(R.string.drawer_item_free_play).withIcon(FontAwesome.Icon.faw_gamepad), - GmailDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye).withIdentifier(5), - SectionDrawerItem().withName(R.string.drawer_item_section_header), - SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog), - SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).withEnabled(false), - SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github), - SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn) + GmailDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1), + GmailDrawerItem().withName(R.string.drawer_item_free_play).withIcon(FontAwesome.Icon.faw_gamepad), + GmailDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye).withIdentifier(5), + SectionDrawerItem().withName(R.string.drawer_item_section_header), + SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog), + SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).withEnabled(false), + SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesomeBrand.Icon.fab_github), + SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn) ) adapter.onClickListener = { v, adapter, drawerItem, position -> if (drawerItem is Badgeable) { @@ -64,14 +65,14 @@ class MultiDrawerActivity : AppCompatActivity() { binding.sliderEnd.apply { stickyHeaderView = layoutInflater.inflate(R.layout.header, null) itemAdapter.add( - PrimaryDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1), - PrimaryDrawerItem().withName(R.string.drawer_item_free_play).withIcon(FontAwesome.Icon.faw_gamepad), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye).withIdentifier(5), - SectionDrawerItem().withName(R.string.drawer_item_section_header), - SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog), - SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).withEnabled(false), - SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github), - SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn) + PrimaryDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1), + PrimaryDrawerItem().withName(R.string.drawer_item_free_play).withIcon(FontAwesome.Icon.faw_gamepad), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye).withIdentifier(5), + SectionDrawerItem().withName(R.string.drawer_item_section_header), + SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog), + SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).withEnabled(false), + SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesomeBrand.Icon.fab_github), + SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn) ) adapter.onClickListener = { v, adapter, drawerItem, position -> if (drawerItem is Nameable) { diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/PersistentDrawerActivity.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/PersistentDrawerActivity.kt index 7293f78d7..c078b54cc 100755 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/PersistentDrawerActivity.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/PersistentDrawerActivity.kt @@ -15,6 +15,7 @@ import com.mikepenz.crossfader.util.UIUtils import com.mikepenz.crossfader.view.CrossFadeSlidingPaneLayout import com.mikepenz.iconics.IconicsDrawable import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome +import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial import com.mikepenz.iconics.utils.colorInt import com.mikepenz.iconics.utils.sizeDp @@ -83,14 +84,14 @@ class PersistentDrawerActivity : AppCompatActivity() { accountHeader = this@PersistentDrawerActivity.headerView customWidth = ViewGroup.LayoutParams.MATCH_PARENT itemAdapter.add( - PrimaryDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1), - PrimaryDrawerItem().withName(R.string.drawer_item_free_play).withIcon(FontAwesome.Icon.faw_gamepad), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), - SectionDrawerItem().withName(R.string.drawer_item_section_header), - SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog), - SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).withEnabled(false), - SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github), - SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn) + PrimaryDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1), + PrimaryDrawerItem().withName(R.string.drawer_item_free_play).withIcon(FontAwesome.Icon.faw_gamepad), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), + SectionDrawerItem().withName(R.string.drawer_item_section_header), + SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog), + SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).withEnabled(false), + SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesomeBrand.Icon.fab_github), + SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn) ) } diff --git a/app/src/main/java/com/mikepenz/materialdrawer/app/fragment/DrawerFragment.kt b/app/src/main/java/com/mikepenz/materialdrawer/app/fragment/DrawerFragment.kt index c23749d00..fcd9afce1 100644 --- a/app/src/main/java/com/mikepenz/materialdrawer/app/fragment/DrawerFragment.kt +++ b/app/src/main/java/com/mikepenz/materialdrawer/app/fragment/DrawerFragment.kt @@ -7,6 +7,7 @@ import android.view.View import android.view.ViewGroup import androidx.fragment.app.Fragment import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesome +import com.mikepenz.iconics.typeface.library.fontawesome.FontAwesomeBrand import com.mikepenz.materialdrawer.app.R import com.mikepenz.materialdrawer.app.databinding.FragmentSimpleSampleBinding import com.mikepenz.materialdrawer.iconics.withIcon @@ -40,14 +41,14 @@ class DrawerFragment : Fragment() { binding.slider.apply { itemAdapter.add( - PrimaryDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1), - PrimaryDrawerItem().withName(R.string.drawer_item_free_play).withIcon(FontAwesome.Icon.faw_gamepad), - PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), - SectionDrawerItem().withName(R.string.drawer_item_section_header), - SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog), - SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).withEnabled(false), - SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesome.Icon.faw_github), - SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn) + PrimaryDrawerItem().withName(R.string.drawer_item_home).withIcon(FontAwesome.Icon.faw_home).withIdentifier(1), + PrimaryDrawerItem().withName(R.string.drawer_item_free_play).withIcon(FontAwesome.Icon.faw_gamepad), + PrimaryDrawerItem().withName(R.string.drawer_item_custom).withIcon(FontAwesome.Icon.faw_eye), + SectionDrawerItem().withName(R.string.drawer_item_section_header), + SecondaryDrawerItem().withName(R.string.drawer_item_settings).withIcon(FontAwesome.Icon.faw_cog), + SecondaryDrawerItem().withName(R.string.drawer_item_help).withIcon(FontAwesome.Icon.faw_question).withEnabled(false), + SecondaryDrawerItem().withName(R.string.drawer_item_open_source).withIcon(FontAwesomeBrand.Icon.fab_github), + SecondaryDrawerItem().withName(R.string.drawer_item_contact).withIcon(FontAwesome.Icon.faw_bullhorn) ) setSelection(1) setSavedInstance(savedInstanceState) diff --git a/build.gradle b/build.gradle index 78c2b85b7..f59168666 100644 --- a/build.gradle +++ b/build.gradle @@ -3,12 +3,12 @@ buildscript { ext { release = [ - versionName: "8.4.3", - versionCode: 8043 + versionName: "8.4.4", + versionCode: 8044 ] setup = [ - compileSdk: 30, + compileSdk: 31, minSdk : 16, targetSdk : 30 ] @@ -19,16 +19,16 @@ buildscript { recyclerView : '1.2.1', core : '1.6.0', material : '1.4.0', - appcompat : '1.3.0', + appcompat : '1.3.1', drawerlayout : '1.1.1', - constraintLayout : '2.0.4', + constraintLayout : '2.1.1', cardview : '1.0.0', - kotlin : "1.5.30", - fastadapter : "5.4.1", - iconics : "5.2.8", + kotlin : "1.5.31", + fastadapter : "5.5.1", + iconics : "5.3.1", aboutLibs : "8.9.1", navigation : "2.3.5", - detekt : '1.17.1', + detekt : '1.18.1', slidingpaneLayout : "1.1.0", swiperefreshLayout: "1.1.0" ] @@ -40,7 +40,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.0-alpha11' + classpath 'com.android.tools.build:gradle:7.1.0-alpha13' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:${versions.navigation}" classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${versions.detekt}"