From ff26c388609acfddc95e3cc9ffc22d19d1183361 Mon Sep 17 00:00:00 2001 From: inorichi Date: Thu, 1 Oct 2015 23:44:17 +0200 Subject: [PATCH] Use support fragments --- .../eu/kanade/mangafeed/ui/activity/MainActivity.java | 11 +++-------- .../eu/kanade/mangafeed/ui/fragment/BaseFragment.java | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/activity/MainActivity.java b/app/src/main/java/eu/kanade/mangafeed/ui/activity/MainActivity.java index 5d09b5ef2..6587d816c 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/activity/MainActivity.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/activity/MainActivity.java @@ -1,23 +1,18 @@ package eu.kanade.mangafeed.ui.activity; import android.os.Bundle; -import android.app.Fragment; -import android.app.FragmentTransaction; +import android.support.v4.app.Fragment; +import android.support.v4.app.FragmentTransaction; import android.support.v7.widget.Toolbar; -import android.view.Menu; -import android.view.MenuItem; import android.widget.FrameLayout; import com.mikepenz.materialdrawer.Drawer; import com.mikepenz.materialdrawer.DrawerBuilder; import com.mikepenz.materialdrawer.model.PrimaryDrawerItem; -import javax.inject.Inject; - import butterknife.Bind; import butterknife.ButterKnife; import eu.kanade.mangafeed.R; -import eu.kanade.mangafeed.data.helpers.DatabaseHelper; import eu.kanade.mangafeed.ui.fragment.LibraryFragment; import rx.subscriptions.CompositeSubscription; @@ -92,7 +87,7 @@ public class MainActivity extends BaseActivity { private void setFragment(Fragment fragment) { try { if (fragment != null && getSupportFragmentManager() != null) { - FragmentTransaction ft = getFragmentManager().beginTransaction(); + FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); if (ft != null) { ft.replace(R.id.content_layout, fragment); ft.commit(); diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/fragment/BaseFragment.java b/app/src/main/java/eu/kanade/mangafeed/ui/fragment/BaseFragment.java index d2cf43adf..505cddc92 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/fragment/BaseFragment.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/fragment/BaseFragment.java @@ -1,6 +1,6 @@ package eu.kanade.mangafeed.ui.fragment; -import android.app.Fragment; +import android.support.v4.app.Fragment; public class BaseFragment extends Fragment { }