Fix Manage Profiles (rename some titles)

This commit is contained in:
Nazar-Kutz 2020-02-16 23:22:14 +02:00
parent 880b229d89
commit 3649c2da49

View file

@ -28,6 +28,7 @@ import android.view.inputmethod.EditorInfo;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import net.osmand.AndroidUtils;
import net.osmand.PlatformUtil;
@ -151,6 +152,17 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment {
isNewProfile = ApplicationMode.valueOfStringKey(changedProfile.stringKey, null) == null;
}
@Override
protected void createToolbar(LayoutInflater inflater, View view) {
super.createToolbar(inflater, view);
if (isNewProfile) {
TextView toolbarSubtitle = (TextView) view.findViewById(R.id.toolbar_subtitle);
if (toolbarSubtitle != null) {
toolbarSubtitle.setText(getString(R.string.new_profile));
}
}
}
private String createNonDuplicateName(String oldName) {
int suffix = 0;
int i = oldName.length() - 1;
@ -343,7 +355,7 @@ public class ProfileAppearanceFragment extends BaseSettingsFragment {
? changedProfile.parent.toHumanString()
: getSelectedAppMode().toHumanString());
OsmandTextFieldBoxes baseProfileNameHint = (OsmandTextFieldBoxes) holder.findViewById(R.id.master_profile_otfb);
baseProfileNameHint.setLabelText(getString(R.string.master_profile));
baseProfileNameHint.setLabelText(getString(R.string.profile_type_base_string));
FrameLayout selectNavTypeBtn = (FrameLayout) holder.findViewById(R.id.select_nav_type_btn);
selectNavTypeBtn.setOnClickListener(new View.OnClickListener() {
@Override