Preferences ui fixes

This commit is contained in:
Vitaliy 2020-02-14 16:53:25 +02:00
parent 8d4d3a4c53
commit 7d5e139210
3 changed files with 5 additions and 5 deletions

View file

@ -181,7 +181,7 @@ public class SelectProfileBottomSheetDialogFragment extends MenuBottomSheetDialo
int activeColorResId = nightMode ? R.color.active_color_primary_dark : R.color.active_color_primary_light;
int iconDefaultColorResId = nightMode ? R.color.icon_color_default_dark : R.color.icon_color_default_light;
View itemView = View.inflate(getContext(), R.layout.bottom_sheet_item_with_descr_and_radio_btn, null);
View itemView = UiUtilities.getInflater(getContext(), nightMode).inflate(R.layout.bottom_sheet_item_with_descr_and_radio_btn, null);
TextView tvTitle = itemView.findViewById(R.id.title);
TextView tvDescription = itemView.findViewById(R.id.description);
ImageView ivIcon = itemView.findViewById(R.id.icon);
@ -239,7 +239,7 @@ public class SelectProfileBottomSheetDialogFragment extends MenuBottomSheetDialo
if (type.equals(TYPE_NAV_PROFILE)) {
profiles.addAll(NavigationFragment.getSortedRoutingProfiles(app));
} else if (type.equals(TYPE_BASE_APP_PROFILE)) {
profiles.addAll(NavigationFragment.getBaseProfiles(app));
profiles.addAll(NavigationFragment.getBaseProfiles());
} else {
LOG.error("Check data type!");
dismiss();

View file

@ -241,9 +241,9 @@ public class NavigationFragment extends BaseSettingsFragment {
return profilesObjects;
}
public static List<ProfileDataObject> getBaseProfiles(Context ctx) {
public static List<ProfileDataObject> getBaseProfiles() {
List<ProfileDataObject> profiles = new ArrayList<>();
for (ApplicationMode mode : ApplicationMode.getDefaultValues()) {
for (ApplicationMode mode : ApplicationMode.allPossibleValues()) {
if (mode != ApplicationMode.DEFAULT) {
profiles.add(new ProfileDataObject(mode.toHumanString(), mode.getDescription(),
mode.getStringKey(), mode.getIconRes(), false, mode.getIconColorInfo()));

View file

@ -348,7 +348,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment {
selectNavTypeBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (getSelectedAppMode().isCustomProfile()) {
if (isNewProfile) {
hideKeyboard();
final SelectProfileBottomSheetDialogFragment fragment = new SelectProfileBottomSheetDialogFragment();
Bundle bundle = new Bundle();