Klasse FormElement<T extends FormElement,V extends FormElementViewHolder>

java.lang.Object
eltos.simpledialogfragment.form.FormElement<T,V>
Alle implementierten Schnittstellen:
android.os.Parcelable
Bekannte direkte Unterklassen:
Check, ColorField, DateTime, Hint, Input, Spinner

public abstract class FormElement<T extends FormElement,V extends FormElementViewHolder> extends Object implements android.os.Parcelable
Base-class for form elements to be used with SimpleFormDialog Each form element holds a resultKey that is used to receive element specific results in SimpleFormDialog.onResult(int) Created by eltos on 20.02.17.
  • Verschachtelte Klassen - Übersicht

    Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen android.os.Parcelable

    android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    protected static final int
     
    protected boolean
     
    protected String
     

    Von Schnittstelle geerbte Felder android.os.Parcelable

    CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
  • Konstruktorübersicht

    Konstruktoren
    Modifizierer
    Konstruktor
    Beschreibung
    protected
    FormElement(android.os.Parcel in)
     
    protected
    FormElement(String resultKey)
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    abstract V
    Return your custom implementation of FormElementViewHolder here
    int
     
    protected String
    getText(android.content.Context context)
     
    label(int textResourceId)
    Sets the label
    label(String text)
    Sets the label
    Mark this Field as required.
    required(boolean required)
    Set the required flag for this field.
    void
    writeToParcel(android.os.Parcel dest, int flags)
     

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

    • NO_ID

      protected static final int NO_ID
      Siehe auch:
    • resultKey

      protected String resultKey
    • required

      protected boolean required
  • Konstruktordetails

    • FormElement

      protected FormElement(String resultKey)
    • FormElement

      protected FormElement(android.os.Parcel in)
  • Methodendetails

    • buildViewHolder

      public abstract V buildViewHolder()
      Return your custom implementation of FormElementViewHolder here
      Gibt zurück:
      The view holder that can represent this form element
    • required

      public T required()
      Mark this Field as required. See required(boolean)
      Gibt zurück:
      this instance
    • required

      public T required(boolean required)
      Set the required flag for this field. This has different meanings depending on the element type

      Input fields will display an error message if their input is empty. Check fields will be required to be checked

      Parameter:
      required - whether this field is required
      Gibt zurück:
      this instance
    • label

      public T label(String text)
      Sets the label
      Parameter:
      text - label text as string
      Gibt zurück:
      this instance
    • label

      public T label(@StringRes int textResourceId)
      Sets the label
      Parameter:
      textResourceId - label text as android string resource
      Gibt zurück:
      this instance
    • getText

      @Nullable protected String getText(android.content.Context context)
    • describeContents

      public int describeContents()
      Angegeben von:
      describeContents in Schnittstelle android.os.Parcelable
    • writeToParcel

      public void writeToParcel(android.os.Parcel dest, int flags)
      Angegeben von:
      writeToParcel in Schnittstelle android.os.Parcelable