commit
bd216ac793
2 changed files with 6 additions and 1 deletions
|
@ -33,6 +33,7 @@ import net.osmand.plus.activities.HelpActivity;
|
|||
import net.osmand.plus.activities.actions.AppModeDialog;
|
||||
import net.osmand.plus.dialogs.ConfigureMapMenu;
|
||||
import net.osmand.plus.dialogs.HelpArticleDialogFragment;
|
||||
import net.osmand.plus.helpers.AndroidUiHelper;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
|
||||
|
@ -258,6 +259,9 @@ public class ContextMenuAdapter {
|
|||
icon.setVisibility(View.INVISIBLE);
|
||||
desc.setVisibility(View.GONE);
|
||||
} else {
|
||||
AndroidUiHelper.updateVisibility(icon, true);
|
||||
AndroidUiHelper.updateVisibility(desc, true);
|
||||
AndroidUtils.setTextPrimaryColor(app, title, nightMode);
|
||||
icon.setImageDrawable(mIconsCache.getIcon(item.getIcon(), colorResId));
|
||||
desc.setText(item.getDescription());
|
||||
boolean selectedMode = tag == PROFILES_CHOSEN_PROFILE_TAG;
|
||||
|
|
|
@ -184,13 +184,14 @@ public class MainSettingsFragment extends BaseSettingsFragment {
|
|||
SwitchPreferenceEx pref = new SwitchPreferenceEx(app);
|
||||
pref.setPersistent(false);
|
||||
pref.setKey(applicationMode.getStringKey());
|
||||
preferenceCategory.addPreference(pref);
|
||||
|
||||
pref.setIcon(getAppProfilesIcon(applicationMode, isAppProfileEnabled));
|
||||
pref.setTitle(applicationMode.toHumanString());
|
||||
pref.setSummary(getAppModeDescription(getContext(), applicationMode));
|
||||
pref.setChecked(isAppProfileEnabled);
|
||||
pref.setLayoutResource(R.layout.preference_with_descr_dialog_and_switch);
|
||||
pref.setFragment(ConfigureProfileFragment.class.getName());
|
||||
preferenceCategory.addPreference(pref);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue