Reorder menu
This commit is contained in:
parent
dae411e938
commit
d6fbba857f
|
@ -74,15 +74,17 @@ public class MainActivity extends AppCompatActivity {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
MenuItem instanceItem = menu.findItem(R.id.action_change_instance);
|
||||||
MenuItem uploadItem = menu.findItem(R.id.action_upload);
|
MenuItem uploadItem = menu.findItem(R.id.action_upload);
|
||||||
MenuItem myVideosItem = menu.findItem(R.id.action_myvideos);
|
MenuItem myVideosItem = menu.findItem(R.id.action_myvideos);
|
||||||
MenuItem playslistItem = menu.findItem(R.id.action_playlist);
|
MenuItem playslistItem = menu.findItem(R.id.action_playlist);
|
||||||
if (Helper.isLoggedIn(MainActivity.this)) {
|
if (Helper.isLoggedIn(MainActivity.this)) {
|
||||||
|
instanceItem.setVisible(false);
|
||||||
uploadItem.setVisible(true);
|
uploadItem.setVisible(true);
|
||||||
myVideosItem.setVisible(true);
|
myVideosItem.setVisible(true);
|
||||||
playslistItem.setVisible(true);
|
playslistItem.setVisible(true);
|
||||||
} else {
|
} else {
|
||||||
|
instanceItem.setVisible(true);
|
||||||
uploadItem.setVisible(false);
|
uploadItem.setVisible(false);
|
||||||
myVideosItem.setVisible(false);
|
myVideosItem.setVisible(false);
|
||||||
playslistItem.setVisible(false);
|
playslistItem.setVisible(false);
|
||||||
|
|
|
@ -15,7 +15,11 @@
|
||||||
android:icon="@drawable/ic_baseline_track_changes_24"
|
android:icon="@drawable/ic_baseline_track_changes_24"
|
||||||
android:title="@string/change_instance"
|
android:title="@string/change_instance"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_playlist"
|
||||||
|
android:icon="@drawable/ic_baseline_playlist_play_24"
|
||||||
|
android:title="@string/playlists"
|
||||||
|
app:showAsAction="ifRoom" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/action_account"
|
android:id="@+id/action_account"
|
||||||
android:icon="@drawable/ic_outline_account_circle_24"
|
android:icon="@drawable/ic_outline_account_circle_24"
|
||||||
|
@ -31,9 +35,5 @@
|
||||||
android:icon="@drawable/ic_baseline_personal_video_24"
|
android:icon="@drawable/ic_baseline_personal_video_24"
|
||||||
android:title="@string/my_videos"
|
android:title="@string/my_videos"
|
||||||
app:showAsAction="ifRoom" />
|
app:showAsAction="ifRoom" />
|
||||||
<item
|
|
||||||
android:id="@+id/action_playlist"
|
|
||||||
android:icon="@drawable/ic_baseline_playlist_play_24"
|
|
||||||
android:title="@string/playlists"
|
|
||||||
app:showAsAction="ifRoom" />
|
|
||||||
</menu>
|
</menu>
|
||||||
|
|
Loading…
Reference in New Issue