[android] Changed strings for welcome screen (title, subtitle)

This commit is contained in:
Dmitry Donskoy 2019-12-09 13:24:48 +03:00 committed by Arsentiy Milchakov
parent f130fa9003
commit 2b412b937f
3 changed files with 14 additions and 6 deletions

View file

@ -5,6 +5,7 @@ import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.view.Window;
import android.widget.CheckBox;
@ -28,6 +29,8 @@ import com.mapswithme.util.ThemeUtils;
import com.mapswithme.util.UiUtils;
import com.mapswithme.util.statistics.Statistics;
import java.util.Arrays;
import java.util.List;
import java.util.Stack;
public class WelcomeDialogFragment extends BaseMwmDialogFragment implements View.OnClickListener
@ -179,9 +182,12 @@ public class WelcomeDialogFragment extends BaseMwmDialogFragment implements View
mImage = mContentView.findViewById(R.id.iv__image);
mImage.setImageResource(R.drawable.img_welcome);
mTitle = mContentView.findViewById(R.id.tv__title);
mTitle.setText(R.string.onboarding_welcome_title);
List<String> headers = Arrays.asList(getString(R.string.new_onboarding_step1_header),
getString(R.string.new_onboarding_step1_header_2));
String titleText = TextUtils.join(UiUtils.NEW_STRING_DELIMITER, headers);
mTitle.setText(titleText);
mSubtitle = mContentView.findViewById(R.id.tv__subtitle1);
mSubtitle.setText(R.string.onboarding_welcome_first_subtitle);
mSubtitle.setText(R.string.sign_message_gdpr);
initUserAgreementViews();
bindWelcomeScreenType();

View file

@ -47,6 +47,7 @@ public final class UiUtils
{
private static final int DEFAULT_TINT_COLOR = Color.parseColor("#20000000");
public static final int NO_ID = -1;
public static final String NEW_STRING_DELIMITER = "\n";
public static final String PHRASE_SEPARATOR = "";
public static final String APPROXIMATE_SYMBOL = "~";
private static float sScreenDensity;

View file

@ -8,13 +8,13 @@ import androidx.annotation.Nullable;
import com.mapswithme.maps.Framework;
import com.mapswithme.maps.R;
import com.mapswithme.maps.widget.placepage.Sponsored;
import com.mapswithme.util.UiUtils;
import com.mapswithme.util.statistics.Statistics;
import java.util.Arrays;
class BookmarkInfoShareable<T extends ShareableInfoProvider> extends BaseShareable
{
private static final String DELIMITER = "\n";
@NonNull
private final T mProvider;
@ -33,7 +33,7 @@ class BookmarkInfoShareable<T extends ShareableInfoProvider> extends BaseShareab
private static String makeEmailBody(@NonNull Activity activity, @Nullable Sponsored sponsored,
@NonNull Iterable<String> emailBodyContent)
{
String text = TextUtils.join(DELIMITER, emailBodyContent);
String text = TextUtils.join(UiUtils.NEW_STRING_DELIMITER, emailBodyContent);
if (sponsored != null && sponsored.getType() == Sponsored.TYPE_BOOKING)
text = concatSponsoredText(activity, sponsored, text);
@ -45,8 +45,9 @@ class BookmarkInfoShareable<T extends ShareableInfoProvider> extends BaseShareab
private static String concatSponsoredText(@NonNull Activity activity, @NonNull Sponsored sponsored,
@NonNull String src)
{
return TextUtils.join(DELIMITER, Arrays.asList(src, activity.getString(R.string.sharing_booking)))
+ sponsored.getUrl();
String mainSegment = TextUtils.join(UiUtils.NEW_STRING_DELIMITER,
Arrays.asList(src, activity.getString(R.string.sharing_booking)));
return mainSegment + sponsored.getUrl();
}
@NonNull