if the action name is available for editing, we should not show the "Show/hide – "
This commit is contained in:
parent
67a2a447e7
commit
2c43cf8b93
1 changed files with 17 additions and 3 deletions
|
@ -220,9 +220,23 @@ public class CreateEditActionDialog extends DialogFragment
|
|||
nameEditText.setEnabled(action.isActionEditable());
|
||||
action.setAutoGeneratedTitle(nameEditText);
|
||||
|
||||
if (savedInstanceState == null) nameEditText.setText(action.getName(getContext()));
|
||||
else action.setName(nameEditText.getText().toString());
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
String name = action.getName(getContext());
|
||||
if (action.getActionNameRes() != 0 && !action.isActionEditable()) {
|
||||
String actionName;
|
||||
if (getString(action.getActionNameRes()).contains("Show/hide")) {
|
||||
actionName = getString(action.getActionNameRes());
|
||||
nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_dash, actionName, name));
|
||||
} else {
|
||||
actionName = "";
|
||||
nameEditText.setText(getString(R.string.ltr_or_rtl_combine_via_space, actionName, name));
|
||||
}
|
||||
} else {
|
||||
nameEditText.setText(name);
|
||||
}
|
||||
} else {
|
||||
action.setName(nameEditText.getText().toString());
|
||||
}
|
||||
image.setImageResource(action.getIconRes(getApplication()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue