make tabs contain icons instead of title
|
@ -84,6 +84,15 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
|
|||
viewPager.setOffscreenPageLimit(adapter.getCount());
|
||||
|
||||
tabLayout.setupWithViewPager(viewPager);
|
||||
|
||||
if(PreferenceManager.getDefaultSharedPreferences(getActivity())
|
||||
.getString(getString(R.string.main_page_content_key), getString(R.string.blank_page_key))
|
||||
.equals(getString(R.string.subscription_page_key))) {
|
||||
tabLayout.getTabAt(0).setIcon(R.drawable.ic_channel_white_24dp);
|
||||
} else {
|
||||
tabLayout.getTabAt(0).setIcon(R.drawable.ic_whatshot_white_24dp);
|
||||
tabLayout.getTabAt(1).setIcon(R.drawable.ic_channel_white_24dp);
|
||||
}
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
|
@ -171,7 +180,8 @@ public class MainFragment extends BaseFragment implements TabLayout.OnTabSelecte
|
|||
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
return getString(this.tabTitles[position]);
|
||||
//return getString(this.tabTitles[position]);
|
||||
return "";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -62,7 +62,6 @@ public class SubscriptionFragment extends BaseStateFragment<List<SubscriptionEnt
|
|||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
|
||||
activity.getSupportActionBar().setDisplayShowTitleEnabled(true);
|
||||
activity.getSupportActionBar().setDisplayShowTitleEnabled(true);
|
||||
activity.setTitle(R.string.tab_subscriptions);
|
||||
return inflater.inflate(R.layout.fragment_subscription, container, false);
|
||||
|
|
BIN
app/src/main/res/drawable-hdpi/ic_channel_white_24dp.png
Normal file
After Width: | Height: | Size: 398 B |
BIN
app/src/main/res/drawable-hdpi/ic_whatshot_white_24dp.png
Normal file
After Width: | Height: | Size: 468 B |
BIN
app/src/main/res/drawable-mdpi/ic_channel_white_24dp.png
Normal file
After Width: | Height: | Size: 304 B |
BIN
app/src/main/res/drawable-mdpi/ic_whatshot_white_24dp.png
Normal file
After Width: | Height: | Size: 334 B |
BIN
app/src/main/res/drawable-xhdpi/ic_channel_white_24dp.png
Normal file
After Width: | Height: | Size: 468 B |
BIN
app/src/main/res/drawable-xhdpi/ic_whatshot_white_24dp.png
Normal file
After Width: | Height: | Size: 595 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_channel_white_24dp.png
Normal file
After Width: | Height: | Size: 739 B |
BIN
app/src/main/res/drawable-xxhdpi/ic_whatshot_white_24dp.png
Normal file
After Width: | Height: | Size: 866 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_channel_white_24dp.png
Normal file
After Width: | Height: | Size: 633 B |
BIN
app/src/main/res/drawable-xxxhdpi/ic_whatshot_white_24dp.png
Normal file
After Width: | Height: | Size: 1.1 KiB |