Bugfix for DropDownPreference

This commit is contained in:
Mygod
2016-07-11 20:43:53 +08:00
parent 159e1dff78
commit 44625ae5b0
@@ -120,7 +120,7 @@ final class DropDownPreference(private val mContext: Context, attrs: AttributeSe
*
* @return The value of the key.
*/
def getValue = if (mEntryValues == null) null else mEntryValues(mSelectedIndex).toString
def getValue = if (mEntryValues == null || mSelectedIndex < 0) null else mEntryValues(mSelectedIndex).toString
/**
* Returns the entry corresponding to the current value.