diff --git a/OsmAnd/res/layout/free_backup_card.xml b/OsmAnd/res/layout/free_backup_card.xml index e142af05e6f..de3131a6728 100644 --- a/OsmAnd/res/layout/free_backup_card.xml +++ b/OsmAnd/res/layout/free_backup_card.xml @@ -7,7 +7,8 @@ android:layout_marginTop="@dimen/content_padding" android:background="?attr/bg_color" android:orientation="horizontal" - android:paddingStart="@dimen/content_padding"> + android:paddingStart="@dimen/content_padding" + > + android:textSize="@dimen/default_desc_text_size" /> - + android:layout_marginBottom="@dimen/content_padding" + android:layout_weight="0"/> diff --git a/OsmAnd/src/net/osmand/plus/backup/ui/BackupTypesAdapter.java b/OsmAnd/src/net/osmand/plus/backup/ui/BackupTypesAdapter.java index 40d7c034cba..4f3e91a403e 100644 --- a/OsmAnd/src/net/osmand/plus/backup/ui/BackupTypesAdapter.java +++ b/OsmAnd/src/net/osmand/plus/backup/ui/BackupTypesAdapter.java @@ -133,10 +133,9 @@ public View getChildView(int groupPosition, int childPosition, boolean isLastChi UiUtilities.setupCompoundButton(compoundButton, nightMode, CompoundButtonType.GLOBAL); ImageView proIcon = view.findViewById(R.id.pro_icon); - setupChildIcon(view, type.getIconRes(), selected && type.isAllowedInFreeVersion()); - boolean proAvailable = InAppPurchaseHelper.isOsmAndProAvailable(app); + boolean showProIcon = !InAppPurchaseHelper.isOsmAndProAvailable(app) && !type.isAllowedInFreeVersion(); + setupChildIcon(view, type.getIconRes(), selected && !showProIcon); proIcon.setImageResource(nightMode ? R.drawable.img_button_pro_night : R.drawable.img_button_pro_day); - proIcon.setVisibility(type.isAllowedInFreeVersion() || proAvailable ? View.GONE : View.VISIBLE); view.setOnClickListener(view1 -> { compoundButton.performClick(); if (listener != null) { @@ -144,8 +143,8 @@ public View getChildView(int groupPosition, int childPosition, boolean isLastChi } notifyDataSetChanged(); }); - AndroidUiHelper.updateVisibility(proIcon, !type.isAllowedInFreeVersion()); - AndroidUiHelper.updateVisibility(view.findViewById(R.id.switch_container), type.isAllowedInFreeVersion()); + AndroidUiHelper.updateVisibility(proIcon, showProIcon); + AndroidUiHelper.updateVisibility(view.findViewById(R.id.switch_container), !showProIcon); setupSelectableBackground(view); AndroidUiHelper.updateVisibility(view.findViewById(R.id.divider), false); AndroidUiHelper.updateVisibility(view.findViewById(R.id.card_top_divider), false); diff --git a/OsmAnd/src/net/osmand/plus/backup/ui/BaseBackupTypesFragment.java b/OsmAnd/src/net/osmand/plus/backup/ui/BaseBackupTypesFragment.java index b34d862bd95..cd90a6c8d56 100644 --- a/OsmAnd/src/net/osmand/plus/backup/ui/BaseBackupTypesFragment.java +++ b/OsmAnd/src/net/osmand/plus/backup/ui/BaseBackupTypesFragment.java @@ -160,7 +160,7 @@ public void onCategorySelected(ExportSettingsCategory category, boolean selected @Override public void onTypeSelected(ExportSettingsType type, boolean selected) { boolean proAvailable = InAppPurchaseHelper.isOsmAndProAvailable(app); - if (type.isAllowedInFreeVersion() && !proAvailable) { + if (type.isAllowedInFreeVersion() || proAvailable) { List items = getItemsForType(type); selectedItemsMap.put(type, selected ? items : null); if (!selected && !Algorithms.isEmpty(items)) { diff --git a/OsmAnd/src/net/osmand/plus/myplaces/favorites/dialogs/FavoritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/favorites/dialogs/FavoritesTreeFragment.java index a6c016e6a24..b511798b3f2 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/favorites/dialogs/FavoritesTreeFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/favorites/dialogs/FavoritesTreeFragment.java @@ -667,7 +667,7 @@ public void shareFavoritesFinished() { } private void setupGetOsmAndCloudButton(@NonNull View view) { - View dismissButton = view.findViewById(R.id.dismiss_button); + View dismissButtonContainer = view.findViewById(R.id.dismiss_button_container); UiUtilities iconsCache = app.getUIUtilities(); ImageView closeBtn = view.findViewById(R.id.btn_close); closeBtn.setImageDrawable(iconsCache.getIcon(R.drawable.ic_action_cancel, isNightMode())); @@ -683,15 +683,12 @@ private void setupGetOsmAndCloudButton(@NonNull View view) { } }); - int buttonTextId = R.string.get_osmand_cloud; - UiUtilities.setupDialogButton(nightMode, dismissButton, SECONDARY, buttonTextId); - dismissButton.setOnClickListener(v -> { + dismissButtonContainer.setOnClickListener(v -> { FragmentActivity activity = getActivity(); if (activity != null) { ((MyPlacesActivity) getActivity()).showOsmAndCloud(this); } }); - AndroidUiHelper.updateVisibility(dismissButton, true); } class FavouritesAdapter extends OsmandBaseExpandableListAdapter implements Filterable { diff --git a/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureProfileFragment.java b/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureProfileFragment.java index 1a5e2f256b4..4c198056f20 100644 --- a/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureProfileFragment.java +++ b/OsmAnd/src/net/osmand/plus/settings/fragments/ConfigureProfileFragment.java @@ -299,9 +299,8 @@ protected void onBindPreferenceViewHolder(Preference preference, PreferenceViewH preference.setVisible(false); app.getSettings().CONFIGURE_PROFILE_FREE_ACCOUNT_CARD_DISMISSED.set(true); }); - View getCloudBtn = holder.findViewById(R.id.dismiss_button); - UiUtilities.setupDialogButton(isNightMode(), getCloudBtn, SECONDARY, R.string.get_osmand_cloud); - getCloudBtn.setOnClickListener(v -> { + View getCloudBtnContainer = holder.findViewById(R.id.dismiss_button_container); + getCloudBtnContainer.setOnClickListener(v -> { FragmentActivity activity = getActivity(); if (activity != null) { BackupAuthorizationFragment.showInstance(activity.getSupportFragmentManager());