diff --git a/twidere/src/main/kotlin/org/mariotaku/ktextension/MenuExtensions.kt b/twidere/src/main/kotlin/org/mariotaku/ktextension/MenuExtensions.kt index 01b909121..6e95f2668 100644 --- a/twidere/src/main/kotlin/org/mariotaku/ktextension/MenuExtensions.kt +++ b/twidere/src/main/kotlin/org/mariotaku/ktextension/MenuExtensions.kt @@ -19,6 +19,7 @@ package org.mariotaku.ktextension +import android.graphics.drawable.Drawable import android.support.v4.view.MenuItemCompat import android.view.Menu @@ -41,6 +42,10 @@ fun Menu.setMenuItemIcon(id: Int, icon: Int) { findItem(id)?.setIcon(icon) } +fun Menu.setMenuItemIcon(id: Int, icon: Drawable) { + findItem(id)?.setIcon(icon) +} + fun Menu.setMenuItemTitle(id: Int, title: Int) { findItem(id)?.setTitle(title) } diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/AccountsDashboardFragment.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/AccountsDashboardFragment.kt index 25176a679..cfad1c73a 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/AccountsDashboardFragment.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/fragment/AccountsDashboardFragment.kt @@ -42,7 +42,9 @@ import android.os.Looper import android.support.design.widget.NavigationView import android.support.v4.app.LoaderManager.LoaderCallbacks import android.support.v4.content.AsyncTaskLoader +import android.support.v4.content.ContextCompat import android.support.v4.content.Loader +import android.support.v4.graphics.drawable.DrawableCompat import android.support.v4.view.MenuItemCompat import android.support.v4.view.ViewPager import android.support.v7.view.SupportMenuInflater @@ -344,10 +346,14 @@ class AccountsDashboardFragment : BaseSupportFragment(), LoaderCallbacks