mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-17 11:09:19 +01:00
Use support fragments
This commit is contained in:
parent
90b0948968
commit
ff26c38860
@ -1,23 +1,18 @@
|
|||||||
package eu.kanade.mangafeed.ui.activity;
|
package eu.kanade.mangafeed.ui.activity;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.app.FragmentTransaction;
|
import android.support.v4.app.FragmentTransaction;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuItem;
|
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
|
|
||||||
import com.mikepenz.materialdrawer.Drawer;
|
import com.mikepenz.materialdrawer.Drawer;
|
||||||
import com.mikepenz.materialdrawer.DrawerBuilder;
|
import com.mikepenz.materialdrawer.DrawerBuilder;
|
||||||
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem;
|
import com.mikepenz.materialdrawer.model.PrimaryDrawerItem;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
|
||||||
|
|
||||||
import butterknife.Bind;
|
import butterknife.Bind;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import eu.kanade.mangafeed.R;
|
import eu.kanade.mangafeed.R;
|
||||||
import eu.kanade.mangafeed.data.helpers.DatabaseHelper;
|
|
||||||
import eu.kanade.mangafeed.ui.fragment.LibraryFragment;
|
import eu.kanade.mangafeed.ui.fragment.LibraryFragment;
|
||||||
import rx.subscriptions.CompositeSubscription;
|
import rx.subscriptions.CompositeSubscription;
|
||||||
|
|
||||||
@ -92,7 +87,7 @@ public class MainActivity extends BaseActivity {
|
|||||||
private void setFragment(Fragment fragment) {
|
private void setFragment(Fragment fragment) {
|
||||||
try {
|
try {
|
||||||
if (fragment != null && getSupportFragmentManager() != null) {
|
if (fragment != null && getSupportFragmentManager() != null) {
|
||||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
|
||||||
if (ft != null) {
|
if (ft != null) {
|
||||||
ft.replace(R.id.content_layout, fragment);
|
ft.replace(R.id.content_layout, fragment);
|
||||||
ft.commit();
|
ft.commit();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package eu.kanade.mangafeed.ui.fragment;
|
package eu.kanade.mangafeed.ui.fragment;
|
||||||
|
|
||||||
import android.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
|
|
||||||
public class BaseFragment extends Fragment {
|
public class BaseFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user