I am trying to change positiveButtonText of Dialog to `EditTextPreference. I tried the following without success:
prefWatcher :
private TextWatcher prefWatcher = new TextWatcher() { @Override public void onTextChanged(CharSequence s, int start, int before, int count) { } @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void afterTextChanged(Editable s) { Log.i(TAG_LOG, "Updating the positive button text"); mUrlPreference.setPositiveButtonText("Download"); } };
When I change the text in EditText, the log is printed, but the text of the Positive button does not change. Is something missing here? My initial thought was that I would need to update the hierarchy of the dialog box, but I did not see any methods in the API for this. Any ideas on what I'm missing here?
source share