Package eltos.simpledialogfragment.form
Class Spinner
java.lang.Object
eltos.simpledialogfragment.form.FormElement<Spinner,eltos.simpledialogfragment.form.SpinnerViewHolder>
eltos.simpledialogfragment.form.Spinner
- All Implemented Interfaces:
android.os.Parcelable
@Deprecated
public class Spinner
extends FormElement<Spinner,eltos.simpledialogfragment.form.SpinnerViewHolder>
Deprecated.
A spinner form element to be used with
SimpleFormDialog
This is an Spinner that can be used to give a choice between different values.
This will add an int to resource bundle containing the index of the chosen value
within the supplied item list or -1 if none was chosen.
Created by philipp on 23.02.17.-
Nested Class Summary
-
Field Summary
Fields inherited from class eltos.simpledialogfragment.form.FormElement
NO_ID, required, resultKey
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioneltos.simpledialogfragment.form.SpinnerViewHolder
Deprecated.Return your custom implementation ofFormElementViewHolder
hereint
Deprecated.protected String[]
getItems
(android.content.Context context) Deprecated.protected String
getPlaceholderText
(android.content.Context context) Deprecated.items
(int itemArrayRes) Deprecated.Provide an array resource with items to be shown by this spinner.items
(int... itemsStringResArray) Deprecated.Provide an array of items to be shown by this spinner.Deprecated.Provide an array of items to be shown by this spinner.placeholder
(int textResourceId) Deprecated.Sets the placeholder text displayed if nothing is selectedplaceholder
(String text) Deprecated.Sets the placeholder text displayed if nothing is selectedstatic Spinner
Deprecated.Factory method for a plain spinner.preset
(int itemIndex) Deprecated.Set the initially selected itemvoid
writeToParcel
(android.os.Parcel dest, int flags) Deprecated.
-
Field Details
-
CREATOR
Deprecated.
-
-
Constructor Details
-
Spinner
protected Spinner(android.os.Parcel in) Deprecated.
-
-
Method Details
-
plain
Deprecated.Factory method for a plain spinner.- Parameters:
key
- the key that can be used to receive the chosen item index from the bundle inSimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
- Returns:
- this instance
-
placeholder
Deprecated.Sets the placeholder text displayed if nothing is selected- Parameters:
text
- placeholder text as string- Returns:
- this instance
-
placeholder
Deprecated.Sets the placeholder text displayed if nothing is selected- Parameters:
textResourceId
- placeholder text as android string resource- Returns:
- this instance
-
items
Deprecated.Provide an array resource with items to be shown by this spinner.- Parameters:
itemArrayRes
- the string array resource to suggest- Returns:
- this instance
-
items
Deprecated.Provide an array of items to be shown by this spinner.- Parameters:
itemsStringResArray
- array of string resources to suggest- Returns:
- this instance
-
items
Deprecated.Provide an array of items to be shown by this spinner.- Parameters:
items
- array of strings to suggest- Returns:
- this instance
-
preset
Deprecated.Set the initially selected item- Parameters:
itemIndex
- The index of the initially selected item- Returns:
- this instance
-
buildViewHolder
public eltos.simpledialogfragment.form.SpinnerViewHolder buildViewHolder()Deprecated.Description copied from class:FormElement
Return your custom implementation ofFormElementViewHolder
here- Specified by:
buildViewHolder
in classFormElement<Spinner,
eltos.simpledialogfragment.form.SpinnerViewHolder> - Returns:
- The view holder that can represent this form element
-
getPlaceholderText
Deprecated. -
getItems
Deprecated. -
describeContents
public int describeContents()Deprecated.- Specified by:
describeContents
in interfaceandroid.os.Parcelable
- Overrides:
describeContents
in classFormElement<Spinner,
eltos.simpledialogfragment.form.SpinnerViewHolder>
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags) Deprecated.- Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
- Overrides:
writeToParcel
in classFormElement<Spinner,
eltos.simpledialogfragment.form.SpinnerViewHolder>
-