Please create Your own EditTextPreference. To achieve Your result You need to override getSummary method.
public class EditTextPreference extends android.preference.EditTextPreference{
public EditTextPreference(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
public EditTextPreference(Context context, AttributeSet attrs) {
super(context, attrs);
}
public EditTextPreference(Context context) {
super(context);
}
@Override
public CharSequence getSummary() {
String summary = super.getSummary().toString();
return String.format(summary, getText());
}
}
Then I use in preferences.xml file, newly created EditTextPreference, and in summary I set value from strings.xml like this:
android:summary="@string/string_val"
And finally in strings.xml it looks like this:
Please select user. Currently set is: %s
Final summary is then: Please select user. Currently set is: selectedValue