(context,
+ android.R.layout.simple_spinner_item, authTypes);
+ authTypesAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
+ return authTypesAdapter;
+ }
+
+ int mResourceId;
private AuthType(int id) {
mResourceId = id;
}
+ /**
+ * Used to select an appropriate localized text label for the
+ * {@code AuthType.PLAIN} option presented to users.
+ *
+ * @param insecure
+ *
+ * A value of {@code true} will use "Normal password".
+ *
+ * A value of {@code false} will use
+ * "Password, transmitted insecurely"
+ */
+ public void useInsecureText(boolean insecure, ArrayAdapter authTypesAdapter) {
+ // Do nothing. Overridden in AuthType.PLAIN
+ }
+
@Override
public String toString() {
if (mResourceId == 0) {