Swap tabs

This commit is contained in:
topjohnwu 2017-04-26 00:27:55 +08:00
parent 6a9e39c470
commit 464fe627a3

View File

@ -31,14 +31,14 @@ public class LogFragment extends Fragment {
TabFragmentAdapter adapter = new TabFragmentAdapter(getChildFragmentManager()); TabFragmentAdapter adapter = new TabFragmentAdapter(getChildFragmentManager());
adapter.addTab(new MagiskLogFragment(), getString(R.string.magisk));
if (getApplication().isSuClient) { if (getApplication().isSuClient) {
adapter.addTab(new SuLogFragment(), getString(R.string.superuser)); adapter.addTab(new SuLogFragment(), getString(R.string.superuser));
tab.setupWithViewPager(viewPager); tab.setupWithViewPager(viewPager);
tab.setVisibility(View.VISIBLE); tab.setVisibility(View.VISIBLE);
} }
adapter.addTab(new MagiskLogFragment(), getString(R.string.magisk));
viewPager.setAdapter(adapter); viewPager.setAdapter(adapter);
return v; return v;