|
@@ -1,22 +1,19 @@
|
|
|
package eu.kanade.tachiyomi.ui.base.fragment
|
|
|
|
|
|
-import android.support.v4.app.FragmentActivity
|
|
|
-import eu.kanade.tachiyomi.ui.base.activity.BaseActivity
|
|
|
+import android.support.v7.app.AppCompatActivity
|
|
|
+import eu.kanade.tachiyomi.ui.base.activity.ActivityMixin
|
|
|
|
|
|
interface FragmentMixin {
|
|
|
|
|
|
fun setToolbarTitle(title: String) {
|
|
|
- baseActivity.setToolbarTitle(title)
|
|
|
+ (getActivity() as ActivityMixin).setToolbarTitle(title)
|
|
|
}
|
|
|
|
|
|
fun setToolbarTitle(resourceId: Int) {
|
|
|
- baseActivity.setToolbarTitle(getString(resourceId))
|
|
|
+ (getActivity() as ActivityMixin).setToolbarTitle(getString(resourceId))
|
|
|
}
|
|
|
|
|
|
- val baseActivity: BaseActivity
|
|
|
- get() = getActivity() as BaseActivity
|
|
|
-
|
|
|
- fun getActivity(): FragmentActivity
|
|
|
-
|
|
|
+ fun getActivity(): AppCompatActivity
|
|
|
+
|
|
|
fun getString(resource: Int): String
|
|
|
}
|