From: Andy Scherzinger Date: Sun, 27 Sep 2015 18:21:09 +0000 (+0200) Subject: custom list preference implementation for visual material consistency on pre-lollipop X-Git-Tag: beta-20151122~4^2~4 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/35a68aa33766f43f9b190a4b67be327051e04ca4?ds=inline;hp=--cc custom list preference implementation for visual material consistency on pre-lollipop --- 35a68aa33766f43f9b190a4b67be327051e04ca4 diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index 8b21a192..161bb666 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -26,7 +26,7 @@ - = 0 && getEntryValues() != null) { + String value = getEntryValues()[which].toString(); + if (callChangeListener(value)) { + setValue(value); + } + dialog.dismiss(); + } + } + + @Override + public AppCompatDialog getDialog() { + return mDialog; + } + + @Override + public void onActivityDestroy() { + super.onActivityDestroy(); + if (mDialog != null && mDialog.isShowing()) { + mDialog.dismiss(); + } + } +}