hiden tutor portion of drawer if student logged in

This commit is contained in:
marcin.jedynski 2018-11-21 04:59:50 +01:00
parent 955f823b25
commit b8eedc565c
3 changed files with 5 additions and 1 deletions

View File

@ -138,6 +138,7 @@ public abstract class BaseActivity
if (!isTutor) { if (!isTutor) {
navigationView.findViewById(R.id.nav_profile).setVisibility(View.GONE); navigationView.findViewById(R.id.nav_profile).setVisibility(View.GONE);
drawerNavigationView.getMenu().setGroupVisible(R.id.drawer_group_tutor, false);
} }
} }

View File

@ -45,6 +45,8 @@ public class SharingFragment extends PreferenceFragment {
locationLevelMapping.put(0, SharingLevel.PRESENCE.toString()); locationLevelMapping.put(0, SharingLevel.PRESENCE.toString());
locationLevelMapping.put(1, SharingLevel.APPROXIMATED.toString()); locationLevelMapping.put(1, SharingLevel.APPROXIMATED.toString());
locationLevelMapping.put(2, SharingLevel.EXACT.toString()); locationLevelMapping.put(2, SharingLevel.EXACT.toString());
locationLevelMapping.put(3, SharingLevel.MANUAL.toString());
addPreferencesFromResource(R.layout.pref_sharing); addPreferencesFromResource(R.layout.pref_sharing);
Preference manualStatus = findPreference("key_manual_status"); Preference manualStatus = findPreference("key_manual_status");

View File

@ -3,7 +3,8 @@ package com.uam.wmi.findmytutor.utils;
public enum SharingLevel { public enum SharingLevel {
PRESENCE("presence"), PRESENCE("presence"),
APPROXIMATED("approximated"), APPROXIMATED("approximated"),
EXACT("exact"); EXACT("exact"),
MANUAL("manuak");
private final String text; private final String text;