Fix titles
This commit is contained in:
parent
74d6cb8041
commit
42caaa9dc9
|
@ -77,20 +77,26 @@ public class MainActivity extends AppCompatActivity {
|
|||
switch (item.getItemId()) {
|
||||
case R.id.navigation_subscription:
|
||||
displayVideosFragment = subscriptionFragment;
|
||||
setTitle(R.string.subscriptions);
|
||||
break;
|
||||
case R.id.navigation_trending:
|
||||
setTitle(R.string.title_trending);
|
||||
displayVideosFragment = trendingFragment;
|
||||
break;
|
||||
case R.id.navigation_most_liked:
|
||||
setTitle(R.string.title_most_liked);
|
||||
displayVideosFragment = mostLikedFragment;
|
||||
break;
|
||||
case R.id.navigation_recently_added:
|
||||
setTitle(R.string.title_recently_added);
|
||||
displayVideosFragment = recentFragment;
|
||||
break;
|
||||
case R.id.navigation_local:
|
||||
setTitle(R.string.title_local);
|
||||
displayVideosFragment = locaFragment;
|
||||
break;
|
||||
case R.id.navigation_discover:
|
||||
setTitle(R.string.title_discover);
|
||||
fm.beginTransaction().hide(active).show(overviewFragment).commit();
|
||||
active = overviewFragment;
|
||||
return true;
|
||||
|
@ -161,6 +167,8 @@ public class MainActivity extends AppCompatActivity {
|
|||
}
|
||||
});
|
||||
|
||||
setTitle(R.string.title_discover);
|
||||
|
||||
if (Helper.isLoggedIn(MainActivity.this)) {
|
||||
navView.inflateMenu(R.menu.bottom_nav_menu_connected);
|
||||
final SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||
|
|
Loading…
Reference in New Issue