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