diff --git a/README.md b/README.md index e768e8a..7198254 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ A new approach of result handling ensures data integrity over rotation changes, In your ``build.gradle`` file[\*](https://github.com/eltos/SimpleDialogFragments/wiki/Repository-Info): ```groovy dependencies { - compile 'com.github.eltos:simpledialogfragment:2.1' + compile 'com.github.eltos:simpledialogfragment:2.2' } ``` diff --git a/docs/README.md b/docs/README.md index b5f2e10..11bbd63 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,3 +6,4 @@ | **1.1** | 13.02.2017 | [API 1.1](v1.1/javadoc) | | **2.0** | 24.02.2017 | [API 2.0](v2.0/javadoc) | | **2.1** | 25.05.2017 | [API 2.1](v2.1/javadoc) | +| **2.2** | 30.07.2017 | [API 2.2](v2.2/javadoc) | diff --git a/docs/latest_javadoc.html b/docs/latest_javadoc.html index a37d6b7..ba6d701 100644 --- a/docs/latest_javadoc.html +++ b/docs/latest_javadoc.html @@ -1,13 +1,13 @@
- + - + diff --git a/docs/v2.2/javadoc/allclasses-frame.html b/docs/v2.2/javadoc/allclasses-frame.html new file mode 100644 index 0000000..db7d11a --- /dev/null +++ b/docs/v2.2/javadoc/allclasses-frame.html @@ -0,0 +1,52 @@ + + + + + +Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+protected static final java.lang.String |
+CHECKBOX_LABEL |
+"simpleCheckDialog.check_label" |
+
+
+protected static final java.lang.String |
+CHECKBOX_REQUIRED |
+"simpleCheckDialog.check_required" |
+
+
+public static final java.lang.String |
+CHECKED |
+"simpleCheckDialog.checked" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+DATE |
+"simpleDateDialogdate" |
+
+
+public static final java.lang.String |
+FIRST_DAY_OF_WEEK |
+"simpleDateDialogfirstDayOfWeek" |
+
+
+public static final java.lang.String |
+MAX_DATE |
+"simpleDateDialogmaxDate" |
+
+
+public static final java.lang.String |
+MIN_DATE |
+"simpleDateDialogminDate" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+protected static final java.lang.String |
+BUNDLE |
+"simpleDialog.bundle" |
+
+
+protected static final java.lang.String |
+CANCELABLE |
+"simpleDialog.cancelable" |
+
+
+protected static final java.lang.String |
+HTML |
+"simpleDialog.html" |
+
+
+protected static final java.lang.String |
+ICON_RESOURCE |
+"simpleDialog.iconResource" |
+
+
+protected static final java.lang.String |
+MESSAGE |
+"simpleDialog.message" |
+
+
+protected static final java.lang.String |
+NEGATIVE_BUTTON_TEXT |
+"simpleDialog.negativeButtonText" |
+
+
+protected static final java.lang.String |
+NEUTRAL_BUTTON_TEXT |
+"simpleDialog.neutralButtonText" |
+
+
+protected static final java.lang.String |
+POSITIVE_BUTTON_TEXT |
+"simpleDialog.positiveButtonText" |
+
+
+protected static final java.lang.String |
+THEME |
+"simpleDialog.theme" |
+
+
+protected static final java.lang.String |
+TITLE |
+"simpleDialog.title" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final int |
+BUTTON_NEGATIVE |
+-2 |
+
+
+public static final int |
+BUTTON_NEUTRAL |
+-3 |
+
+
+public static final int |
+BUTTON_POSITIVE |
+-1 |
+
+
+public static final int |
+CANCELED |
+0 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+HOUR |
+"simpleDateDialoghour" |
+
+
+public static final java.lang.String |
+MINUTE |
+"simpleDateDialogminute" |
+
+
+public static final java.lang.String |
+VIEW_24_HOUR |
+"simpleDateDialog24HourView" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+COLOR |
+"SimpleColorDialogcolor" |
+
+
+public static final java.lang.String |
+COLORS |
+"SimpleColorDialogcolors" |
+
+
+protected static final java.lang.String |
+CUSTOM |
+"SimpleColorDialogcustom" |
+
+
+public static final int |
+NONE |
+0 |
+
+
+protected static final int |
+PICKER |
+-2 |
+
+
+protected static final java.lang.String |
+PICKER_DIALOG_TAG |
+"SimpleColorDialogpicker" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+protected static final java.lang.String |
+ALPHA |
+"SimpleColorWheelDialog.alpha" |
+
+
+public static final java.lang.String |
+COLOR |
+"SimpleColorWheelDialog.color" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+protected static final java.lang.String |
+INPUT_FIELDS |
+"SimpleFormDialoginputFields" |
+
+
+protected static final java.lang.String |
+SAVE_TAG |
+"form." |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final java.lang.String |
+EMAIL |
+"simpleInputDialogtext" |
+
+
+protected static final java.lang.String |
+EMAIL_PATTERN |
+"^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+protected static final java.lang.String |
+ALLOW_EMPTY |
+"simpleInputDialogallow_empty" |
+
+
+protected static final java.lang.String |
+HINT |
+"simpleInputDialoghint" |
+
+
+protected static final java.lang.String |
+INPUT_TYPE |
+"simpleInputDialoginput_type" |
+
+
+protected static final java.lang.String |
+MAX_LENGTH |
+"simpleInputDialogmax_length" |
+
+
+protected static final java.lang.String |
+SUGGESTIONS |
+"simpleInputDialogsuggestions" |
+
+
+public static final java.lang.String |
+TEXT |
+"simpleInputDialogtext" |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+public static final int |
+CHOICE_MODE_MULTIPLE |
+2 |
+
+
+public static final int |
+CHOICE_MODE_NONE |
+0 |
+
+
+public static final int |
+CHOICE_MODE_SINGLE |
+1 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+protected static final java.lang.String |
+CHOICE_MAX_COUNT |
+"CustomListDialogchoiceMax" |
+
+
+protected static final java.lang.String |
+CHOICE_MIN_COUNT |
+"CustomListDialogchoiceMin" |
+
+
+protected static final java.lang.String |
+CHOICE_MODE |
+"CustomListDialogchoiceMode" |
+
+
+protected static final java.lang.String |
+INITIALLY_CHECKED_IDS |
+"CustomListDialoginitCheckId" |
+
+
+protected static final java.lang.String |
+INITIALLY_CHECKED_POSITIONS |
+"CustomListDialoginitCheckPos" |
+
+
+public static final int |
+MULTI_CHOICE |
+2 |
+
+
+public static final int |
+NO_CHOICE |
+0 |
+
+
+public static final java.lang.String |
+SELECTED_IDS |
+"CustomListDialogselectedIds" |
+
+
+public static final java.lang.String |
+SELECTED_POSITIONS |
+"CustomListDialogselectedPos" |
+
+
+public static final java.lang.String |
+SELECTED_SINGLE_ID |
+"CustomListDialogselectedSingleId" |
+
+
+public static final java.lang.String |
+SELECTED_SINGLE_POSITION |
+"CustomListDialogselectedSinglePos" |
+
+
+public static final int |
+SINGLE_CHOICE |
+1 |
+
+
+public static final int |
+SINGLE_CHOICE_DIRECT |
+11 |
+
Modifier and Type | +Constant Field | +Value | +
---|---|---|
+
+protected static final java.lang.String |
+DATA_SET |
+"simpleListDialogdata_set" |
+
+
+public static final java.lang.String |
+HIGHLIGHT |
+"simpleListDialoghighlight" |
+
+
+public static final java.lang.String |
+SELECTED_LABELS |
+"simpleListDialogselectedLabels" |
+
+
+public static final java.lang.String |
+SELECTED_SINGLE_LABEL |
+"simpleListDialogselectedSingleLabel" |
+
Method and Description | +
---|
eltos.simpledialogfragment.SimpleImageDialog.image(Bitmap) | +
eltos.simpledialogfragment.list.AdvancedAdapter.AdvancedFilter.matchesWord(String, CharSequence) | +
eltos.simpledialogfragment.SimpleDialog.show(FragmentManager, String) | +
eltos.simpledialogfragment.SimpleDialog.show(FragmentTransaction, String) | +
public abstract class CustomViewDialog<This extends CustomViewDialog<This>> +extends SimpleDialog<This>+
SimpleCheckDialog
as an example.
+
+ Created by eltos on 11.10.2015.SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
CustomViewDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
protected boolean |
+acceptsPositiveButtonPress()
+Overwrite this method to catch positive button presses,
+ e.g. if you need to verify input by the user
+
+ Note: do not call
+pressPositiveButton() here! |
+
protected boolean |
+callResultListener(int which,
+ android.os.Bundle extras) |
+
android.view.View |
+extractContentView(android.os.Bundle savedInstanceState)
+Method to extract the underlying content view.
+ |
+
protected android.view.View |
+inflate(int resource)
+Method to inflate your custom View from
+onCreateContentView(android.os.Bundle) |
+
protected android.view.View |
+inflate(int resource,
+ android.view.ViewGroup root,
+ boolean attachToRoot)
+Method to inflate your custom View from
+onCreateContentView(android.os.Bundle) . |
+
void |
+onCreate(android.os.Bundle savedInstanceState) |
+
protected abstract android.view.View |
+onCreateContentView(android.os.Bundle savedInstanceState)
+Inflate your custom view here.
+ |
+
android.app.Dialog |
+onCreateDialog(android.os.Bundle savedInstanceState) |
+
protected void |
+onDialogShown()
+Overwrite this method to take action once the dialog is shown
+ such as settings an input focus, showing the keyboard or
+ setting the initial positiveButtonState
+ |
+
protected android.os.Bundle |
+onResult(int which)
+Overwrite this method to provide additional results from your custom view
+ to be passed to the
+SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle) |
+
protected void |
+pressPositiveButton()
+Simulates a positive button press.
+ |
+
protected void |
+setPositiveButtonEnabled(boolean enabled)
+Call this method to enable or disable the positive button,
+ e.g. if you want to consider for preconditions to be fulfilled
+
+ Note: call this in
+onDialogShown() rather than onCreateContentView(android.os.Bundle) |
+
build, cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, pos, pos, setArg, setArg, setArg, setArg, show, show, show, show, show, show, theme, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onSaveInstanceState, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
protected abstract android.view.View onCreateContentView(android.os.Bundle savedInstanceState)+
savedInstanceState
- The last saved instance state of the Fragment,
+ or null if this fragment is created for the first time.protected android.os.Bundle onResult(int which)+
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
which
- see SimpleDialog.OnDialogResultListener
protected final void setPositiveButtonEnabled(boolean enabled)+
onDialogShown()
rather than onCreateContentView(android.os.Bundle)
protected boolean acceptsPositiveButtonPress()+
pressPositiveButton()
here!protected void onDialogShown()+
protected final void pressPositiveButton()+
EditorInfo.IME_ACTION_DONE
+
+ Note: do not call this method from acceptsPositiveButtonPress()
!!!protected final android.view.View inflate(@LayoutRes + int resource)+
onCreateContentView(android.os.Bundle)
resource
- The resource to be inflatedprotected final android.view.View inflate(@LayoutRes + int resource, + android.view.ViewGroup root, + boolean attachToRoot)+
onCreateContentView(android.os.Bundle)
. Throws
+ InflateException
if there is an error.resource
- ID for an XML layout resource to loadroot
- Optional view to be the parent of the generated hierarchy (if
+ attachToRoot is true), or else simply an object that
+ provides a set of LayoutParams values for root of the returned
+ hierarchy (if attachToRoot is false.)attachToRoot
- Whether the inflated hierarchy should be attached to
+ the root parameter? If false, root is only used to create the
+ correct subclass of LayoutParams for the root view in the XML.public final android.view.View extractContentView(android.os.Bundle savedInstanceState)+
savedInstanceState
- The saved instance state@CallSuper +public void onCreate(android.os.Bundle savedInstanceState)+
onCreate
in class SimpleDialog<This extends CustomViewDialog<This>>
@NonNull +public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState)+
onCreateDialog
in class SimpleDialog<This extends CustomViewDialog<This>>
@CallSuper +protected boolean callResultListener(int which, + android.os.Bundle extras)+
callResultListener
in class SimpleDialog<This extends CustomViewDialog<This>>
public class SimpleCheckDialog +extends CustomViewDialog<SimpleCheckDialog>+
SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
protected static java.lang.String |
+CHECKBOX_LABEL |
+
protected static java.lang.String |
+CHECKBOX_REQUIRED |
+
static java.lang.String |
+CHECKED |
+
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
SimpleCheckDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
static SimpleCheckDialog |
+build() |
+
SimpleCheckDialog |
+check(boolean preset)
+Sets the initial check state
+ |
+
SimpleCheckDialog |
+checkRequired(boolean required)
+Weather the check is required.
+ |
+
SimpleCheckDialog |
+label(int checkBoxLabelResourceId)
+Sets the checkbox's label
+ |
+
SimpleCheckDialog |
+label(java.lang.String checkBoxLabel)
+Sets the checkbox's label
+ |
+
android.view.View |
+onCreateContentView(android.os.Bundle savedInstanceState)
+Inflate your custom view here.
+ |
+
protected void |
+onDialogShown()
+Overwrite this method to take action once the dialog is shown
+ such as settings an input focus, showing the keyboard or
+ setting the initial positiveButtonState
+ |
+
android.os.Bundle |
+onResult(int which)
+Overwrite this method to provide additional results from your custom view
+ to be passed to the
+SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle) |
+
void |
+onSaveInstanceState(android.os.Bundle outState) |
+
acceptsPositiveButtonPress, callResultListener, extractContentView, inflate, inflate, onCreate, onCreateDialog, pressPositiveButton, setPositiveButtonEnabled
cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, pos, pos, setArg, setArg, setArg, setArg, show, show, show, show, show, show, theme, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final java.lang.String CHECKED+
protected static final java.lang.String CHECKBOX_LABEL+
protected static final java.lang.String CHECKBOX_REQUIRED+
public static SimpleCheckDialog build()+
public SimpleCheckDialog check(boolean preset)+
preset
- checkbox initial statepublic SimpleCheckDialog label(java.lang.String checkBoxLabel)+
checkBoxLabel
- the label as stringpublic SimpleCheckDialog label(@StringRes + int checkBoxLabelResourceId)+
checkBoxLabelResourceId
- the label as android string resourcepublic SimpleCheckDialog checkRequired(boolean required)+
required
- weather checking the checkbox is requiredpublic android.view.View onCreateContentView(android.os.Bundle savedInstanceState)+
CustomViewDialog
onCreateContentView
in class CustomViewDialog<SimpleCheckDialog>
savedInstanceState
- The last saved instance state of the Fragment,
+ or null if this fragment is created for the first time.protected void onDialogShown()+
CustomViewDialog
onDialogShown
in class CustomViewDialog<SimpleCheckDialog>
public android.os.Bundle onResult(int which)+
CustomViewDialog
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
onResult
in class CustomViewDialog<SimpleCheckDialog>
which
- see SimpleDialog.OnDialogResultListener
public void onSaveInstanceState(android.os.Bundle outState)+
onSaveInstanceState
in class android.support.v4.app.DialogFragment
public class SimpleDateDialog +extends CustomViewDialog<SimpleDateDialog> +implements android.widget.DatePicker.OnDateChangedListener+
SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+DATE |
+
static java.lang.String |
+FIRST_DAY_OF_WEEK |
+
static java.lang.String |
+MAX_DATE |
+
static java.lang.String |
+MIN_DATE |
+
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
SimpleDateDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
static SimpleDateDialog |
+build() |
+
SimpleDateDialog |
+date(java.util.Date date)
+Specify the initially set date
+ |
+
SimpleDateDialog |
+date(long millis)
+Specify the initially set date as milliseconds
+ |
+
SimpleDateDialog |
+firstDayOfWeek(int day)
+Set the first day of the week to display
+ |
+
SimpleDateDialog |
+maxDate(java.util.Date date)
+Sets the last date selectable
+ |
+
SimpleDateDialog |
+maxDate(long millis)
+Sets the last date selectable as milliseconds
+ |
+
SimpleDateDialog |
+minDate(java.util.Date date)
+Sets the first date selectable
+ |
+
SimpleDateDialog |
+minDate(long millis)
+Sets the first date selectable as milliseconds
+ |
+
protected android.view.View |
+onCreateContentView(android.os.Bundle savedInstanceState)
+Inflate your custom view here.
+ |
+
void |
+onDateChanged(android.widget.DatePicker view,
+ int year,
+ int monthOfYear,
+ int dayOfMonth) |
+
protected android.os.Bundle |
+onResult(int which)
+Overwrite this method to provide additional results from your custom view
+ to be passed to the
+SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle) |
+
void |
+onSaveInstanceState(android.os.Bundle outState) |
+
acceptsPositiveButtonPress, callResultListener, extractContentView, inflate, inflate, onCreate, onCreateDialog, onDialogShown, pressPositiveButton, setPositiveButtonEnabled
cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, pos, pos, setArg, setArg, setArg, setArg, show, show, show, show, show, show, theme, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final java.lang.String DATE+
public static final java.lang.String MIN_DATE+
public static final java.lang.String MAX_DATE+
public static final java.lang.String FIRST_DAY_OF_WEEK+
public static SimpleDateDialog build()+
public SimpleDateDialog date(java.util.Date date)+
date
- initial datepublic SimpleDateDialog date(long millis)+
millis
- milliseconds since Jan. 1, 1970, midnight GMT.public SimpleDateDialog minDate(java.util.Date date)+
date
- minimal datepublic SimpleDateDialog minDate(long millis)+
millis
- milliseconds since Jan. 1, 1970, midnight GMT.public SimpleDateDialog maxDate(java.util.Date date)+
date
- maximal datepublic SimpleDateDialog maxDate(long millis)+
millis
- milliseconds since Jan. 1, 1970, midnight GMT.public SimpleDateDialog firstDayOfWeek(int day)+
day
- one of Calendar.MONDAY
, Calendar.TUESDAY
,
+ Calendar.WEDNESDAY
, Calendar.THURSDAY
, Calendar.FRIDAY
,
+ Calendar.SATURDAY
, Calendar.SUNDAY
,protected android.view.View onCreateContentView(android.os.Bundle savedInstanceState)+
CustomViewDialog
onCreateContentView
in class CustomViewDialog<SimpleDateDialog>
savedInstanceState
- The last saved instance state of the Fragment,
+ or null if this fragment is created for the first time.public void onDateChanged(android.widget.DatePicker view, + int year, + int monthOfYear, + int dayOfMonth)+
onDateChanged
in interface android.widget.DatePicker.OnDateChangedListener
public void onSaveInstanceState(android.os.Bundle outState)+
onSaveInstanceState
in class android.support.v4.app.DialogFragment
protected android.os.Bundle onResult(int which)+
CustomViewDialog
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
onResult
in class CustomViewDialog<SimpleDateDialog>
which
- see SimpleDialog.OnDialogResultListener
public static interface SimpleDialog.OnDialogResultListener
+Modifier and Type | +Field and Description | +
---|---|
static int |
+BUTTON_NEGATIVE |
+
static int |
+BUTTON_NEUTRAL |
+
static int |
+BUTTON_POSITIVE |
+
static int |
+CANCELED |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+onResult(java.lang.String dialogTag,
+ int which,
+ android.os.Bundle extras)
+Let the hosting fragment or activity implement this interface
+ to receive results from the dialog
+ |
+
static final int CANCELED+
static final int BUTTON_POSITIVE+
static final int BUTTON_NEGATIVE+
static final int BUTTON_NEUTRAL+
boolean onResult(@NonNull + java.lang.String dialogTag, + int which, + @NonNull + android.os.Bundle extras)+
dialogTag
- the tag passed to SimpleDialog.show(android.support.v4.app.Fragment)
which
- result type, one of BUTTON_POSITIVE
, BUTTON_NEGATIVE
,
+ BUTTON_NEUTRAL
or CANCELED
extras
- the extras passed to SimpleDialog.extra(Bundle)
public class SimpleDialog<This extends SimpleDialog<This>>
+extends android.support.v4.app.DialogFragment
+Modifier and Type | +Class and Description | +
---|---|
static interface |
+SimpleDialog.OnDialogResultListener |
+
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
protected static java.lang.String |
+BUNDLE |
+
protected static java.lang.String |
+CANCELABLE |
+
protected static java.lang.String |
+HTML |
+
protected static java.lang.String |
+ICON_RESOURCE |
+
protected static java.lang.String |
+MESSAGE |
+
protected static java.lang.String |
+NEGATIVE_BUTTON_TEXT |
+
protected static java.lang.String |
+NEUTRAL_BUTTON_TEXT |
+
protected static java.lang.String |
+POSITIVE_BUTTON_TEXT |
+
protected static java.lang.String |
+THEME |
+
protected static java.lang.String |
+TITLE |
+
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
SimpleDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
static SimpleDialog |
+build() |
+
protected boolean |
+callResultListener(int which,
+ android.os.Bundle extras) |
+
This |
+cancelable(boolean cancelable)
+Specifies weather this dialog may be canceled by pressing the back button or
+ touching outside of the dialog.
+ |
+
This |
+extra(android.os.Bundle extras)
+Pass extras to the dialog to retain specific information across configuration changes.
+ |
+
protected java.lang.String |
+getArgString(java.lang.String key) |
+
android.content.Context |
+getContext() |
+
This |
+icon(int iconResourceId)
+Sets this dialogs icon
+ |
+
This |
+msg(int messageResourceId)
+Sets this dialogs message
+ |
+
This |
+msg(java.lang.String message)
+Sets this dialogs message
+ |
+
This |
+msgHtml(int messageResourceId)
+Sets this dialogs message as html styled string
+ |
+
This |
+msgHtml(java.lang.String message)
+Sets this dialogs message as html styled string
+ |
+
This |
+neg()
+Sets this dialogs negative button text to
+R.string.no |
+
This |
+neg(int negativeButtonResourceId)
+Sets this dialogs negative button text
+ |
+
This |
+neg(java.lang.String negativeButton)
+Sets this dialogs negative button text
+ |
+
This |
+neut()
+Sets this dialogs neutral button text to
+R.string.cancel |
+
This |
+neut(int neutralButtonResourceId)
+Sets this dialogs neutral button text
+ |
+
This |
+neut(java.lang.String neutralButton)
+Sets this dialogs neutral button text
+ |
+
void |
+onCancel(android.content.DialogInterface dialog) |
+
void |
+onCreate(android.os.Bundle savedInstanceState) |
+
android.app.Dialog |
+onCreateDialog(android.os.Bundle savedInstanceState) |
+
void |
+onDestroyView() |
+
This |
+pos(int positiveButtonResourceId)
+Sets this dialogs positive button text
+ |
+
This |
+pos(java.lang.String positiveButton)
+Sets this dialogs positive button text
+ |
+
protected This |
+setArg(java.lang.String key,
+ boolean value) |
+
protected This |
+setArg(java.lang.String key,
+ int value) |
+
protected This |
+setArg(java.lang.String key,
+ long value) |
+
protected This |
+setArg(java.lang.String key,
+ java.lang.String value) |
+
void |
+show(android.support.v4.app.Fragment fragment)
+Shows the dialog.
+ |
+
void |
+show(android.support.v4.app.FragmentActivity activity)
+Shows the dialog.
+ |
+
void |
+show(android.support.v4.app.FragmentActivity activity,
+ java.lang.String tag)
+Shows the dialog.
+ |
+
void |
+show(android.support.v4.app.FragmentManager manager,
+ java.lang.String tag)
+Deprecated.
+ |
+
void |
+show(android.support.v4.app.Fragment fragment,
+ java.lang.String tag)
+Shows the dialog.
+ |
+
int |
+show(android.support.v4.app.FragmentTransaction transaction,
+ java.lang.String tag)
+Deprecated.
+ |
+
This |
+theme(int theme)
+Set a custom theme.
+ |
+
This |
+title(int titleResourceId)
+Sets this dialogs title
+ |
+
This |
+title(java.lang.String title)
+Sets this dialogs title
+ |
+
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onSaveInstanceState, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
protected static final java.lang.String TITLE+
protected static final java.lang.String MESSAGE+
protected static final java.lang.String POSITIVE_BUTTON_TEXT+
protected static final java.lang.String NEGATIVE_BUTTON_TEXT+
protected static final java.lang.String NEUTRAL_BUTTON_TEXT+
protected static final java.lang.String ICON_RESOURCE+
protected static final java.lang.String CANCELABLE+
protected static final java.lang.String THEME+
protected static final java.lang.String HTML+
protected static final java.lang.String BUNDLE+
@CallSuper +protected boolean callResultListener(int which, + android.os.Bundle extras)+
public static SimpleDialog build()+
protected final This setArg(java.lang.String key, + boolean value)+
protected final This setArg(java.lang.String key, + java.lang.String value)+
protected final This setArg(java.lang.String key, + int value)+
protected final This setArg(java.lang.String key, + long value)+
@Nullable +protected final java.lang.String getArgString(java.lang.String key)+
public This title(java.lang.String title)+
title
- the title as stringpublic This title(@StringRes + int titleResourceId)+
titleResourceId
- the title as android string resourcepublic This msg(java.lang.String message)+
message
- title as stringpublic This msg(@StringRes + int messageResourceId)+
messageResourceId
- the message as android string resourcepublic This msgHtml(java.lang.String message)+
message
- title as html-stringpublic This msgHtml(@StringRes + int messageResourceId)+
messageResourceId
- the message as html-styled android string resourcepublic This pos(java.lang.String positiveButton)+
positiveButton
- the text as stringpublic This pos(@StringRes + int positiveButtonResourceId)+
positiveButtonResourceId
- the text as android string resourcepublic This neg(java.lang.String negativeButton)+
negativeButton
- the text as stringpublic This neg(@StringRes + int negativeButtonResourceId)+
negativeButtonResourceId
- the text as android string resourcepublic This neg()+
R.string.no
public This neut(java.lang.String neutralButton)+
neutralButton
- the text as stringpublic This neut(@StringRes + int neutralButtonResourceId)+
neutralButtonResourceId
- the text as android string resourcepublic This neut()+
R.string.cancel
public This icon(@DrawableRes + int iconResourceId)+
iconResourceId
- the icon as android drawable resourcepublic This cancelable(boolean cancelable)+
cancelable
- weather this dialog may be canceledpublic This extra(android.os.Bundle extras)+
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
extras
- a bundle of extras to storepublic This theme(@StyleRes + int theme)+
theme
- the android style resource id of the custom themepublic void show(android.support.v4.app.Fragment fragment)+
SimpleDialog.OnDialogResultListener
won't be called.fragment
- the hosting fragmentpublic void show(android.support.v4.app.Fragment fragment, + java.lang.String tag)+
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
fragment
- the hosting fragmenttag
- the dialogs tagpublic void show(android.support.v4.app.FragmentActivity activity)+
SimpleDialog.OnDialogResultListener
won't be called.activity
- the hosting activitypublic void show(android.support.v4.app.FragmentActivity activity, + java.lang.String tag)+
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
activity
- the hosting activitytag
- the dialogs tag@CallSuper +public void onCreate(android.os.Bundle savedInstanceState)+
onCreate
in class android.support.v4.app.DialogFragment
public android.content.Context getContext()+
getContext
in class android.support.v4.app.Fragment
@NonNull +public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState)+
onCreateDialog
in class android.support.v4.app.DialogFragment
@Deprecated +public void show(android.support.v4.app.FragmentManager manager, + java.lang.String tag)+
show(FragmentActivity)
or
+ show(Fragment)
insteadshow
in class android.support.v4.app.DialogFragment
@Deprecated +public int show(android.support.v4.app.FragmentTransaction transaction, + java.lang.String tag)+
show(FragmentActivity, String)
or
+ show(Fragment, String)
insteadshow
in class android.support.v4.app.DialogFragment
@CallSuper +public void onCancel(android.content.DialogInterface dialog)+
onCancel
in interface android.content.DialogInterface.OnCancelListener
onCancel
in class android.support.v4.app.DialogFragment
@CallSuper +public void onDestroyView()+
onDestroyView
in class android.support.v4.app.DialogFragment
public static interface SimpleImageDialog.BitmapCreator
+public static interface SimpleImageDialog.DrawableCreator
+public static interface SimpleImageDialog.IconCreator
+public static enum SimpleImageDialog.Scale +extends java.lang.Enum<SimpleImageDialog.Scale>+
Enum Constant and Description | +
---|
FIT
+scales the image down ensuring the image is fully visible
+ |
+
SCROLL_HORIZONTAL
+scales the image up, allowing horizontal scrolling ("panorama")
+ |
+
SCROLL_VERTICAL
+scales the image up, allowing vertical scrolling
+ |
+
Modifier and Type | +Method and Description | +
---|---|
static SimpleImageDialog.Scale |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static SimpleImageDialog.Scale[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final SimpleImageDialog.Scale FIT+
public static final SimpleImageDialog.Scale SCROLL_HORIZONTAL+
public static final SimpleImageDialog.Scale SCROLL_VERTICAL+
public static SimpleImageDialog.Scale[] values()+
+for (SimpleImageDialog.Scale c : SimpleImageDialog.Scale.values()) + System.out.println(c); +
public static SimpleImageDialog.Scale valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class SimpleImageDialog +extends CustomViewDialog<SimpleImageDialog>+
Modifier and Type | +Class and Description | +
---|---|
static interface |
+SimpleImageDialog.BitmapCreator |
+
static interface |
+SimpleImageDialog.DrawableCreator |
+
static interface |
+SimpleImageDialog.IconCreator |
+
static class |
+SimpleImageDialog.Scale |
+
SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
protected static java.lang.String |
+BITMAP |
+
protected static java.lang.String |
+DRAWABLE_RESOURCE |
+
protected static java.lang.String |
+IMAGE_URI |
+
protected static java.lang.String |
+SCALE_TYPE |
+
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
SimpleImageDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
static SimpleImageDialog |
+build() |
+
SimpleImageDialog |
+image(android.graphics.Bitmap image)
+Deprecated.
+ |
+
SimpleImageDialog |
+image(java.lang.Class<? extends eltos.simpledialogfragment.SimpleImageDialog.Creator> builderClass)
+Sets a Creator that can be used to create the image.
+ |
+
SimpleImageDialog |
+image(int resourceId)
+Sets the image drawable to be displayed
+ |
+
SimpleImageDialog |
+image(android.net.Uri imageUri)
+Sets the image uri to be displayed
+ |
+
protected android.view.View |
+onCreateContentView(android.os.Bundle savedInstanceState)
+Inflate your custom view here.
+ |
+
android.app.Dialog |
+onCreateDialog(android.os.Bundle savedInstanceState) |
+
SimpleImageDialog |
+scaleType(SimpleImageDialog.Scale scale)
+Sets the images scale and scroll type to one of
+SimpleImageDialog.Scale |
+
SimpleImageDialog |
+theme(int theme)
+Set a custom theme.
+ |
+
acceptsPositiveButtonPress, callResultListener, extractContentView, inflate, inflate, onCreate, onDialogShown, onResult, pressPositiveButton, setPositiveButtonEnabled
cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, pos, pos, setArg, setArg, setArg, setArg, show, show, show, show, show, show, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onSaveInstanceState, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
protected static final java.lang.String DRAWABLE_RESOURCE+
protected static final java.lang.String BITMAP+
protected static final java.lang.String IMAGE_URI+
protected static final java.lang.String SCALE_TYPE+
public static SimpleImageDialog build()+
public SimpleImageDialog image(@DrawableRes + int resourceId)+
resourceId
- the android resource id of the drawable@Deprecated +public SimpleImageDialog image(android.graphics.Bitmap image)+
TransactionTooLargeException
, use any of the
+ following (save the bitmap to the app's private storage if needed)
+ – image(int)
+ – image(Uri)
+ – image(Class)
image
- the bitmap to displaypublic SimpleImageDialog image(java.lang.Class<? extends eltos.simpledialogfragment.SimpleImageDialog.Creator> builderClass)+
builderClass
- A class implementing one of SimpleImageDialog.BitmapCreator
,
+ SimpleImageDialog.DrawableCreator
or
+ SimpleImageDialog.IconCreator
public SimpleImageDialog image(android.net.Uri imageUri)+
imageUri
- Uri of the imagepublic SimpleImageDialog scaleType(SimpleImageDialog.Scale scale)+
SimpleImageDialog.Scale
scale
- the scale type used for scalingpublic SimpleImageDialog theme(@StyleRes + int theme)+
SimpleDialog
theme
in class SimpleDialog<SimpleImageDialog>
theme
- the android style resource id of the custom theme@NonNull +public android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState)+
onCreateDialog
in class CustomViewDialog<SimpleImageDialog>
protected android.view.View onCreateContentView(android.os.Bundle savedInstanceState)+
CustomViewDialog
onCreateContentView
in class CustomViewDialog<SimpleImageDialog>
savedInstanceState
- The last saved instance state of the Fragment,
+ or null if this fragment is created for the first time.public class SimpleTimeDialog +extends CustomViewDialog<SimpleTimeDialog> +implements android.widget.TimePicker.OnTimeChangedListener+
SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+HOUR |
+
static java.lang.String |
+MINUTE |
+
static java.lang.String |
+VIEW_24_HOUR |
+
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
SimpleTimeDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
static SimpleTimeDialog |
+build() |
+
SimpleTimeDialog |
+hour(int hour)
+Specify the initially set hour
+ |
+
SimpleTimeDialog |
+minute(int minute)
+Specify the initially set minute
+ |
+
protected android.view.View |
+onCreateContentView(android.os.Bundle savedInstanceState)
+Inflate your custom view here.
+ |
+
protected android.os.Bundle |
+onResult(int which)
+Overwrite this method to provide additional results from your custom view
+ to be passed to the
+SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle) |
+
void |
+onSaveInstanceState(android.os.Bundle outState) |
+
void |
+onTimeChanged(android.widget.TimePicker view,
+ int hourOfDay,
+ int minute) |
+
SimpleTimeDialog |
+set24HourView(boolean view24Hour)
+Changes the hour display mode between 24 and AM/PM
+ |
+
acceptsPositiveButtonPress, callResultListener, extractContentView, inflate, inflate, onCreate, onCreateDialog, onDialogShown, pressPositiveButton, setPositiveButtonEnabled
cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, pos, pos, setArg, setArg, setArg, setArg, show, show, show, show, show, show, theme, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final java.lang.String HOUR+
public static final java.lang.String MINUTE+
public static final java.lang.String VIEW_24_HOUR+
public static SimpleTimeDialog build()+
public SimpleTimeDialog hour(int hour)+
hour
- initial hour (0-23)public SimpleTimeDialog minute(int minute)+
minute
- initial minute (0-59)public SimpleTimeDialog set24HourView(boolean view24Hour)+
view24Hour
- true to use 24 hour mode, false to use AM/PMprotected android.view.View onCreateContentView(android.os.Bundle savedInstanceState)+
CustomViewDialog
onCreateContentView
in class CustomViewDialog<SimpleTimeDialog>
savedInstanceState
- The last saved instance state of the Fragment,
+ or null if this fragment is created for the first time.public void onTimeChanged(android.widget.TimePicker view, + int hourOfDay, + int minute)+
onTimeChanged
in interface android.widget.TimePicker.OnTimeChangedListener
public void onSaveInstanceState(android.os.Bundle outState)+
onSaveInstanceState
in class android.support.v4.app.DialogFragment
protected android.os.Bundle onResult(int which)+
CustomViewDialog
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
onResult
in class CustomViewDialog<SimpleTimeDialog>
which
- see SimpleDialog.OnDialogResultListener
public class ColorWheelView
+extends android.view.View
+android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
Modifier and Type | +Field and Description | +
---|---|
static int |
+DEFAULT_COLOR |
+
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
Constructor and Description | +
---|
ColorWheelView(android.content.Context context) |
+
ColorWheelView(android.content.Context context,
+ android.util.AttributeSet attrs) |
+
ColorWheelView(android.content.Context context,
+ android.util.AttributeSet attrs,
+ int defStyleAttr) |
+
Modifier and Type | +Method and Description | +
---|---|
boolean |
+dispatchTouchEvent(android.view.MotionEvent event) |
+
int |
+getColor() |
+
protected void |
+onDraw(android.graphics.Canvas canvas) |
+
protected void |
+onMeasure(int widthMeasureSpec,
+ int heightMeasureSpec) |
+
void |
+onRestoreInstanceState(android.os.Parcelable state) |
+
android.os.Parcelable |
+onSaveInstanceState() |
+
protected void |
+onSizeChanged(int w,
+ int h,
+ int oldw,
+ int oldh) |
+
void |
+setColor(int color) |
+
void |
+setColor(int color,
+ boolean callListener) |
+
void |
+setOnColorChangeListener(eltos.simpledialogfragment.color.ColorWheelView.OnColorChangeListener listener) |
+
void |
+updateAlpha(int alpha) |
+
void |
+updateAlpha(int alpha,
+ boolean callListener) |
+
addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeScroll, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, drawableHotspotChanged, drawableStateChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityClassName, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, jumpDrawablesToCurrentState, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onAttachedToWindow, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onDetachedFromWindow, onDisplayHint, onDragEvent, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, onOverScrolled, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onResolvePointerIcon, onRtlPropertiesChanged, onScreenStateChanged, onScrollChanged, onSetAlpha, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onVisibilityAggregated, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, updateDragShadow, verifyDrawable, willNotCacheDrawing, willNotDraw
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ColorWheelView(android.content.Context context)+
public ColorWheelView(android.content.Context context, + android.util.AttributeSet attrs)+
public ColorWheelView(android.content.Context context, + android.util.AttributeSet attrs, + int defStyleAttr)+
public void setColor(int color)+
public void setColor(int color, + boolean callListener)+
public void updateAlpha(int alpha)+
public void updateAlpha(int alpha, + boolean callListener)+
public int getColor()+
public void setOnColorChangeListener(eltos.simpledialogfragment.color.ColorWheelView.OnColorChangeListener listener)+
protected void onMeasure(int widthMeasureSpec, + int heightMeasureSpec)+
onMeasure
in class android.view.View
protected void onSizeChanged(int w, + int h, + int oldw, + int oldh)+
onSizeChanged
in class android.view.View
public boolean dispatchTouchEvent(android.view.MotionEvent event)+
dispatchTouchEvent
in class android.view.View
public android.os.Parcelable onSaveInstanceState()+
onSaveInstanceState
in class android.view.View
public void onRestoreInstanceState(android.os.Parcelable state)+
onRestoreInstanceState
in class android.view.View
protected void onDraw(android.graphics.Canvas canvas)+
onDraw
in class android.view.View
protected class SimpleColorDialog.ColorAdapter +extends AdvancedAdapter<java.lang.Integer>+
AdvancedAdapter.AdvancedFilter, AdvancedAdapter.ItemIdentifier<Item>
CHOICE_MODE_MULTIPLE, CHOICE_MODE_NONE, CHOICE_MODE_SINGLE
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
Constructor and Description | +
---|
ColorAdapter(int[] colors,
+ boolean addCustomField) |
+
Modifier and Type | +Method and Description | +
---|---|
android.view.View |
+getView(int position,
+ android.view.View convertView,
+ android.view.ViewGroup parent) |
+
filterItems, getCheckedItemCount, getCheckedItemIds, getCheckedItemOriginalPositions, getCheckedItems, getCount, getData, getFilter, getItem, getItemId, highlight, highlight, isItemChecked, notifyDataSetChanged, setAllItemsChecked, setChoiceMode, setData, setData, setData, setData, setDataAndIds, setDataAndIds, setItemChecked, setItemChecked, setItemsCheckedFromIds, setItemsCheckedFromIds, toggleChecked
areAllItemsEnabled, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public ColorAdapter(int[] colors, + boolean addCustomField)+
public android.view.View getView(int position, + android.view.View convertView, + android.view.ViewGroup parent)+
getView
in interface android.widget.Adapter
getView
in class AdvancedAdapter<java.lang.Integer>
public class SimpleColorDialog +extends CustomListDialog<SimpleColorDialog> +implements SimpleDialog.OnDialogResultListener+
Modifier and Type | +Class and Description | +
---|---|
protected class |
+SimpleColorDialog.ColorAdapter |
+
SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
static int |
+BEIGE_COLOR_PALLET |
+
static java.lang.String |
+COLOR |
+
static int |
+COLORFUL_COLOR_PALLET |
+
static java.lang.String |
+COLORS |
+
protected static java.lang.String |
+CUSTOM |
+
protected static int[] |
+DEFAULT_COLORS |
+
static int |
+MATERIAL_COLOR_PALLET |
+
static int |
+MATERIAL_COLOR_PALLET_DARK |
+
static int |
+MATERIAL_COLOR_PALLET_LIGHT |
+
static int |
+NONE |
+
protected static int |
+PICKER |
+
protected static java.lang.String |
+PICKER_DIALOG_TAG |
+
CHOICE_MAX_COUNT, CHOICE_MIN_COUNT, CHOICE_MODE, INITIALLY_CHECKED_IDS, INITIALLY_CHECKED_POSITIONS, MULTI_CHOICE, NO_CHOICE, SELECTED_IDS, SELECTED_POSITIONS, SELECTED_SINGLE_ID, SELECTED_SINGLE_POSITION, SINGLE_CHOICE, SINGLE_CHOICE_DIRECT
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
BUTTON_NEGATIVE, BUTTON_NEUTRAL, BUTTON_POSITIVE, CANCELED
Constructor and Description | +
---|
SimpleColorDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
protected boolean |
+acceptsPositiveButtonPress()
+Overwrite this method to catch positive button presses,
+ e.g. if you need to verify input by the user
+
+ Note: do not call
+CustomViewDialog.pressPositiveButton() here! |
+
SimpleColorDialog |
+allowCustom(boolean allow)
+Set this to true to show a field with a color picker option
+ |
+
static SimpleColorDialog |
+build() |
+
SimpleColorDialog |
+colorPreset(int color)
+Sets the initially selected color
+ |
+
SimpleColorDialog |
+colors(android.content.Context context,
+ int colorArrayRes)
+Sets the color pallet to choose from
+ May be one of
+MATERIAL_COLOR_PALLET ,
+ MATERIAL_COLOR_PALLET_DARK ,
+ MATERIAL_COLOR_PALLET_LIGHT ,
+ BEIGE_COLOR_PALLET or a custom pallet |
+
SimpleColorDialog |
+colors(int[] colors)
+Sets the colors to choose from
+ Default is the
+DEFAULT_COLORS set |
+
void |
+onCreate(android.os.Bundle savedInstanceState) |
+
protected AdvancedAdapter |
+onCreateAdapter()
+Overwrite this method to provide a custom adapter
+ |
+
void |
+onItemClick(android.widget.AdapterView<?> parent,
+ android.view.View view,
+ int position,
+ long id)
+Callback method to be invoked when an item in this AdapterView has
+ been clicked.
+ |
+
protected android.os.Bundle |
+onResult(int which)
+Overwrite this method to provide additional results from your custom view
+ to be passed to the
+SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle) |
+
boolean |
+onResult(java.lang.String dialogTag,
+ int which,
+ android.os.Bundle extras)
+Let the hosting fragment or activity implement this interface
+ to receive results from the dialog
+ |
+
void |
+onSaveInstanceState(android.os.Bundle outState) |
+
choiceIdPreset, choiceIdPreset, choiceIdPreset, choiceMax, choiceMin, choiceMode, choicePreset, choicePreset, choicePreset, divider, emptyText, emptyText, filterable, getListView, grid, gridColumnWidth, gridNumColumn, notifyDataSetChanged, onCreateContentView, onDialogShown, onItemLongClick, pos, pos
callResultListener, extractContentView, inflate, inflate, onCreateDialog, pressPositiveButton, setPositiveButtonEnabled
cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, setArg, setArg, setArg, setArg, show, show, show, show, show, show, theme, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final java.lang.String COLOR+
public static final java.lang.String COLORS+
public static final int NONE+
protected static final int PICKER+
protected static final int[] DEFAULT_COLORS+
@ArrayRes +public static final int MATERIAL_COLOR_PALLET+
@ArrayRes +public static final int MATERIAL_COLOR_PALLET_LIGHT+
@ArrayRes +public static final int MATERIAL_COLOR_PALLET_DARK+
@ArrayRes +public static final int BEIGE_COLOR_PALLET+
@ArrayRes +public static final int COLORFUL_COLOR_PALLET+
protected static final java.lang.String CUSTOM+
protected static final java.lang.String PICKER_DIALOG_TAG+
public static SimpleColorDialog build()+
public SimpleColorDialog colors(int[] colors)+
DEFAULT_COLORS
setcolors
- array of rgb-colorspublic SimpleColorDialog colors(android.content.Context context, + @ArrayRes + int colorArrayRes)+
MATERIAL_COLOR_PALLET
,
+ MATERIAL_COLOR_PALLET_DARK
,
+ MATERIAL_COLOR_PALLET_LIGHT
,
+ BEIGE_COLOR_PALLET
or a custom palletcontext
- a context to resolve the resourcecolorArrayRes
- color array resource idpublic SimpleColorDialog colorPreset(int color)+
color
- the selected colorpublic SimpleColorDialog allowCustom(boolean allow)+
allow
- allow custom picked color if truepublic void onCreate(android.os.Bundle savedInstanceState)+
onCreate
in class CustomViewDialog<SimpleColorDialog>
protected AdvancedAdapter onCreateAdapter()+
CustomListDialog
onCreateAdapter
in class CustomListDialog<SimpleColorDialog>
public void onSaveInstanceState(android.os.Bundle outState)+
onSaveInstanceState
in class CustomListDialog<SimpleColorDialog>
protected boolean acceptsPositiveButtonPress()+
CustomViewDialog
CustomViewDialog.pressPositiveButton()
here!acceptsPositiveButtonPress
in class CustomViewDialog<SimpleColorDialog>
public void onItemClick(android.widget.AdapterView<?> parent, + android.view.View view, + int position, + long id)+
CustomListDialog
onItemClick
in interface android.widget.AdapterView.OnItemClickListener
onItemClick
in class CustomListDialog<SimpleColorDialog>
parent
- The AdapterView where the click happened.view
- The view within the AdapterView that was clicked (this
+ will be a view provided by the adapter)position
- The position of the view in the adapter.id
- The row id of the item that was clicked.public boolean onResult(@NonNull + java.lang.String dialogTag, + int which, + @NonNull + android.os.Bundle extras)+
SimpleDialog.OnDialogResultListener
onResult
in interface SimpleDialog.OnDialogResultListener
dialogTag
- the tag passed to SimpleDialog.show(android.support.v4.app.Fragment)
which
- result type, one of SimpleDialog.OnDialogResultListener.BUTTON_POSITIVE
, SimpleDialog.OnDialogResultListener.BUTTON_NEGATIVE
,
+ SimpleDialog.OnDialogResultListener.BUTTON_NEUTRAL
or SimpleDialog.OnDialogResultListener.CANCELED
extras
- the extras passed to SimpleDialog.extra(Bundle)
protected android.os.Bundle onResult(int which)+
CustomViewDialog
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
onResult
in class CustomListDialog<SimpleColorDialog>
which
- see SimpleDialog.OnDialogResultListener
public class SimpleColorWheelDialog +extends CustomViewDialog<SimpleColorWheelDialog>+
SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
protected static java.lang.String |
+ALPHA |
+
static java.lang.String |
+COLOR |
+
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
SimpleColorWheelDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
SimpleColorWheelDialog |
+alpha(boolean enabled)
+Specifies weather a seek bar for transparency control is displayed
+ |
+
static SimpleColorWheelDialog |
+build() |
+
SimpleColorWheelDialog |
+color(int color)
+Specifies the initial color of the color wheel
+ |
+
protected android.view.View |
+onCreateContentView(android.os.Bundle savedInstanceState)
+Inflate your custom view here.
+ |
+
protected android.os.Bundle |
+onResult(int which)
+Overwrite this method to provide additional results from your custom view
+ to be passed to the
+SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle) |
+
acceptsPositiveButtonPress, callResultListener, extractContentView, inflate, inflate, onCreate, onCreateDialog, onDialogShown, pressPositiveButton, setPositiveButtonEnabled
cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, pos, pos, setArg, setArg, setArg, setArg, show, show, show, show, show, show, theme, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onSaveInstanceState, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final java.lang.String COLOR+
protected static final java.lang.String ALPHA+
public SimpleColorWheelDialog()+
public static SimpleColorWheelDialog build()+
public SimpleColorWheelDialog color(int color)+
color
- the initial color (argb)public SimpleColorWheelDialog alpha(boolean enabled)+
enabled
- weather or not to allow transparency (alpha) adjustmentprotected android.view.View onCreateContentView(android.os.Bundle savedInstanceState)+
CustomViewDialog
onCreateContentView
in class CustomViewDialog<SimpleColorWheelDialog>
savedInstanceState
- The last saved instance state of the Fragment,
+ or null if this fragment is created for the first time.protected android.os.Bundle onResult(int which)+
CustomViewDialog
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
onResult
in class CustomViewDialog<SimpleColorWheelDialog>
which
- see SimpleDialog.OnDialogResultListener
Class | +Description | +
---|---|
ColorWheelView | +
+ A widget to pick a hsv based color
+
+ Created by eltos on 03.02.2017.
+ |
+
SimpleColorDialog | +
+ A dialog that let's the user select a color
+
+ Result:
+ COLOR int Selected color (rgb)
+
+ Created by eltos on 17.04.2016.
+ |
+
SimpleColorWheelDialog | +
+ A dialog with a color wheel to pick a custom color.
+ |
+
public class Check +extends FormElement<Check,eltos.simpledialogfragment.form.CheckViewHolder>+
SimpleFormDialog
+
+ This is a CheckBox - what else?
+
+ This will add a Boolean to resource bundle containing the checked state.
+
+ Created by eltos on 21.02.17.android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<Check> |
+CREATOR |
+
required, resultKey
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | +Method and Description | +
---|---|
static Check |
+box(java.lang.String key)
+Factory method for a check field.
+ |
+
Check |
+check(boolean preset)
+Sets the initial state of the checkbox
+ |
+
Check |
+check(int preset)
+Sets the initial state of the checkbox
+ |
+
int |
+describeContents() |
+
protected boolean |
+getInitialState(android.content.Context context) |
+
protected java.lang.String |
+getText(android.content.Context context) |
+
eltos.simpledialogfragment.form.CheckViewHolder |
+getViewHolder()
+Return your custom implementation of
+FormElementViewHolder here |
+
Check |
+label(int textResourceId)
+Sets the label
+ |
+
Check |
+label(java.lang.String text)
+Sets the label
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
required, required
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<Check> CREATOR+
public static Check box(java.lang.String key)+
key
- the key that can be used to receive the final state from the bundle in
+ SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public Check check(boolean preset)+
preset
- initial statepublic Check check(@BoolRes + int preset)+
preset
- initial state as boolean resourcepublic Check label(java.lang.String text)+
text
- label text as stringpublic Check label(@StringRes + int textResourceId)+
textResourceId
- label text as android string resourcepublic eltos.simpledialogfragment.form.CheckViewHolder getViewHolder()+
FormElement
FormElementViewHolder
heregetViewHolder
in class FormElement<Check,eltos.simpledialogfragment.form.CheckViewHolder>
@Nullable +protected java.lang.String getText(android.content.Context context)+
protected boolean getInitialState(android.content.Context context)+
public int describeContents()+
describeContents
in interface android.os.Parcelable
describeContents
in class FormElement<Check,eltos.simpledialogfragment.form.CheckViewHolder>
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class FormElement<Check,eltos.simpledialogfragment.form.CheckViewHolder>
public abstract class FormElement<T extends FormElement,V extends FormElementViewHolder>
+extends java.lang.Object
+implements android.os.Parcelable
+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.android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
boolean |
+required |
+
protected java.lang.String |
+resultKey |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
protected |
+FormElement(android.os.Parcel in) |
+
protected |
+FormElement(java.lang.String resultKey) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
abstract V |
+getViewHolder()
+Return your custom implementation of
+FormElementViewHolder here |
+
T |
+required()
+Mark this Field as required.
+ |
+
T |
+required(boolean required)
+Set the required flag for this field.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected java.lang.String resultKey+
public boolean required+
protected FormElement(java.lang.String resultKey)+
protected FormElement(android.os.Parcel in)+
public abstract V getViewHolder()+
FormElementViewHolder
herepublic T required()+
required(boolean)
public T required(boolean required)+
required
- weather this field is requiredpublic int describeContents()+
describeContents
in interface android.os.Parcelable
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public abstract class FormElementViewHolder<E extends FormElement>
+extends java.lang.Object
+FormElement
+ and to maintain it's functionality
+
+ Created by eltos on 23.02.17.Modifier and Type | +Field and Description | +
---|---|
protected E |
+field
+The FormElement that this ViewHolder represents.
+ |
+
Modifier | +Constructor and Description | +
---|---|
protected |
+FormElementViewHolder(E field) |
+
Modifier and Type | +Method and Description | +
---|---|
protected abstract boolean |
+focus(SimpleFormDialog.FocusActions actions)
+Method to focus this element
+ |
+
protected abstract int |
+getContentViewLayout()
+Implement this method to return a custom layout resource id for this view
+ |
+
protected abstract boolean |
+posButtonEnabled(android.content.Context context)
+Method to check for empty input, (un-)checked state etc.
+ |
+
protected abstract void |
+putResults(android.os.Bundle results,
+ java.lang.String key)
+Method to publish results from this view in
+
+SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle) |
+
protected abstract void |
+saveState(android.os.Bundle outState)
+Method to save this elements state
+ Bundles are maintained on a per-view basis, so that keys can be arbitrary
+ |
+
protected abstract void |
+setUpView(android.view.View view,
+ android.content.Context context,
+ android.os.Bundle savedInstanceState,
+ SimpleFormDialog.DialogActions actions,
+ boolean isLastElement,
+ boolean isOnlyElement)
+Implement this method to setup your view for the first time or after a
+
+saveState(android.os.Bundle) |
+
protected abstract boolean |
+validate(android.content.Context context)
+Method to validate input, state etc. and display an error message or indicator
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
protected E extends FormElement field+
protected FormElementViewHolder(E field)+
@LayoutRes +protected abstract int getContentViewLayout()+
protected abstract void setUpView(android.view.View view, + android.content.Context context, + android.os.Bundle savedInstanceState, + SimpleFormDialog.DialogActions actions, + boolean isLastElement, + boolean isOnlyElement)+
saveState(android.os.Bundle)
view
- The view that was inflated using the layout from
+ getContentViewLayout()
context
- The context of this viewsavedInstanceState
- A bundle containing everything that was saved in
+ saveState(Bundle)
actions
- A callback for convenient methods. See SimpleFormDialog.DialogActions
isLastElement
- Weather this is the last form elementisOnlyElement
- Weather this is the only form elementprotected abstract void saveState(android.os.Bundle outState)+
outState
- The bundle to save the state toprotected abstract void putResults(android.os.Bundle results, + java.lang.String key)+
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
results
- The bundle to save the results tokey
- The key that has to be used when storing results in the bundleprotected abstract boolean focus(SimpleFormDialog.FocusActions actions)+
actions
- An object providing useful callbacks, see SimpleFormDialog.FocusActions
protected abstract boolean posButtonEnabled(android.content.Context context)+
context
- A contextprotected abstract boolean validate(android.content.Context context)+
context
- A contextpublic class Input +extends FormElement<Input,eltos.simpledialogfragment.form.InputViewHolder>+
SimpleFormDialog
+
+ This is an EditText that can be used to enter text, email-addresses, numbers, passwords etc.
+ Optionally supports auto-complete behaviour using suggestions.
+
+ This will add a String to resource bundle containing the entered text.
+
+ Created by eltos on 20.02.17.android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<Input> |
+CREATOR |
+
required, resultKey
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
static Input |
+email(java.lang.String key)
+Factory method for an email input field.
+ |
+
Input |
+forceSuggestion()
+Shortcut for
+forceSuggestion(boolean) |
+
Input |
+forceSuggestion(boolean force)
+Specify weather this input may contain only one of the suggestions provided.
+ |
+
protected java.lang.String |
+getHint(android.content.Context context) |
+
protected java.lang.String |
+getPatternError(android.content.Context context) |
+
protected java.lang.String[] |
+getSuggestions(android.content.Context context) |
+
protected java.lang.String |
+getText(android.content.Context context) |
+
eltos.simpledialogfragment.form.InputViewHolder |
+getViewHolder()
+Return your custom implementation of
+FormElementViewHolder here |
+
Input |
+hint(int hintResourceId)
+Sets a hint
+ |
+
Input |
+hint(java.lang.String hint)
+Sets a hint
+ |
+
Input |
+inputType(int inputType)
+Sets the input type
+ The default is
+InputType.TYPE_CLASS_TEXT . |
+
Input |
+max(int maxLength)
+Sets an upper limit to the input's text length.
+ |
+
Input |
+min(int minLength)
+Sets a lower limit to the input's text length.
+ |
+
static Input |
+name(java.lang.String key)
+Factory method for a name input field.
+ |
+
static Input |
+password(java.lang.String key)
+Factory method for a password input field.
+ |
+
static Input |
+phone(java.lang.String key)
+Factory method for a phone input field.
+ |
+
static Input |
+plain(java.lang.String key)
+Factory method for a plain input field.
+ |
+
Input |
+showPasswordToggle()
+Displays a button to toggle the password visibility.
+ |
+
Input |
+showPasswordToggle(boolean show)
+Hide or show a button to toggle the password visibility.
+ |
+
Input |
+suggest(java.util.ArrayList<java.lang.String> strings)
+Provide an array of suggestions to be shown while the user is typing
+ This enables the auto-complete behaviour.
+ |
+
Input |
+suggest(int... suggestionStringResArray)
+Provide an array of suggestions to be shown while the user is typing
+ This enables the auto-complete behaviour.
+ |
+
Input |
+suggest(int suggestionArrayRes)
+Provide an array resource with suggestions to be shown while the user is typing.
+ |
+
Input |
+suggest(java.lang.String... strings)
+Provide an array of suggestions to be shown while the user is typing
+ This enables the auto-complete behaviour.
+ |
+
Input |
+text(int textResourceId)
+Sets the initial text
+ |
+
Input |
+text(java.lang.String text)
+Sets the initial text
+ |
+
protected java.lang.String |
+validatePattern(android.content.Context context,
+ java.lang.String input) |
+
Input |
+validatePattern(java.lang.String pattern,
+ int errorMsgId)
+Validate input using the supplied regular expression pattern and display an error
+ message if the pattern does not match.
+ |
+
Input |
+validatePattern(java.lang.String pattern,
+ java.lang.String errorMsg)
+Validate input using the supplied regular expression pattern and display an error
+ message if the pattern does not match.
+ |
+
Input |
+validatePatternAlphanumeric()
+Validate input to consist of alpha-numeric characters only.
+ |
+
Input |
+validatePatternEmail()
+Validate input as email address.
+ |
+
Input |
+validatePatternLetters()
+Validate input so that only upper- and lowercase letters are contained.
+ |
+
Input |
+validatePatternStrongPassword()
+Validate input as password.
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
required, required
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<Input> CREATOR+
public static Input plain(java.lang.String key)+
key
- the key that can be used to receive the entered text from the bundle in
+ SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public static Input name(java.lang.String key)+
key
- the key that can be used to receive the entered text from the bundle in
+ SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public static Input password(java.lang.String key)+
key
- the key that can be used to receive the entered text from the bundle in
+ SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public static Input email(java.lang.String key)+
key
- the key that can be used to receive the entered text from the bundle in
+ SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public static Input phone(java.lang.String key)+
key
- the key that can be used to receive the entered text from the bundle in
+ SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public Input hint(java.lang.String hint)+
hint
- the hint as stringpublic Input hint(@StringRes + int hintResourceId)+
hintResourceId
- the hint as android string resourcepublic Input text(java.lang.String text)+
text
- initial text as stringpublic Input text(@StringRes + int textResourceId)+
textResourceId
- initial text as android string resourcepublic Input inputType(int inputType)+
InputType.TYPE_CLASS_TEXT
.inputType
- the input type. See InputType
public Input showPasswordToggle()+
showPasswordToggle(boolean)
public Input showPasswordToggle(boolean show)+
public Input max(int maxLength)+
maxLength
- the maximum text lengthpublic Input min(int minLength)+
minLength
- the minimum text lengthpublic Input suggest(@ArrayRes + int suggestionArrayRes)+
suggestionArrayRes
- the string array resource to suggestpublic Input suggest(@StringRes + int... suggestionStringResArray)+
suggestionStringResArray
- array of string resources to suggestpublic Input suggest(java.lang.String... strings)+
strings
- array of strings to suggestpublic Input suggest(java.util.ArrayList<java.lang.String> strings)+
strings
- An ArrayList of strings to suggestpublic Input forceSuggestion()+
forceSuggestion(boolean)
public Input forceSuggestion(boolean force)+
suggest(int)
methods
+
+ If the suggestion array is small, consider using a spinner instead.force
- weather to force the input to be one of the suggestions or notpublic Input validatePattern(java.lang.String pattern, + @Nullable + java.lang.String errorMsg)+
pattern
- a regular expression used to validate inputerrorMsg
- the error message to display, if the pattern does not match the inputpublic Input validatePattern(java.lang.String pattern, + @StringRes + int errorMsgId)+
validatePattern(String, String)
pattern
- a regular expression used to validate inputerrorMsgId
- the error message to display as string resourcepublic Input validatePatternEmail()+
validatePattern(String, int)
.public Input validatePatternStrongPassword()+
validatePattern(String, int)
.public Input validatePatternLetters()+
validatePattern(String, int)
.public Input validatePatternAlphanumeric()+
validatePattern(String, int)
.public eltos.simpledialogfragment.form.InputViewHolder getViewHolder()+
FormElement
FormElementViewHolder
heregetViewHolder
in class FormElement<Input,eltos.simpledialogfragment.form.InputViewHolder>
protected java.lang.String validatePattern(android.content.Context context, + @Nullable + java.lang.String input)+
@Nullable +protected java.lang.String getPatternError(android.content.Context context)+
@Nullable +protected java.lang.String getHint(android.content.Context context)+
@Nullable +protected java.lang.String getText(android.content.Context context)+
@Nullable +protected java.lang.String[] getSuggestions(android.content.Context context)+
public int describeContents()+
describeContents
in interface android.os.Parcelable
describeContents
in class FormElement<Input,eltos.simpledialogfragment.form.InputViewHolder>
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class FormElement<Input,eltos.simpledialogfragment.form.InputViewHolder>
public class SimpleFormDialog.DialogActions
+extends java.lang.Object
+FormElementViewHolder.setUpView(android.view.View, android.content.Context, android.os.Bundle, eltos.simpledialogfragment.form.SimpleFormDialog.DialogActions, boolean, boolean)
Modifier and Type | +Method and Description | +
---|---|
void |
+continueWithNextElement()
+Helper to move the focus to the next element or to simulate a positive button
+ press if this is the last element
+ |
+
void |
+updatePosButtonState()
+Helper to request an update of the positive button state
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void updatePosButtonState()+
public void continueWithNextElement()+
public class SimpleFormDialog.FocusActions
+extends java.lang.Object
+FormElementViewHolder.focus(eltos.simpledialogfragment.form.SimpleFormDialog.FocusActions)
Constructor and Description | +
---|
FocusActions() |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+clearCurrentFocus()
+Helper to clear the current focus
+ |
+
void |
+hideKeyboard()
+Helper to hide the soft keyboard
+ |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static interface SimpleFormDialog.InputValidator
+Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+validate(java.lang.String dialogTag,
+ java.lang.String fieldKey,
+ java.lang.String input,
+ android.os.Bundle extras)
+Let the hosting fragment or activity implement this interface to make
+ custom validations for
+Input fields. |
+
java.lang.String validate(java.lang.String dialogTag, + java.lang.String fieldKey, + @Nullable + java.lang.String input, + @NonNull + android.os.Bundle extras)+
Input
fields.
+ You may also use Input.validatePattern(java.lang.String, java.lang.String)
with a custom or predefined
+ pattern.
+ The method is called every time the user hits the positive button or next key.dialogTag
- the tag of this fragmentfieldKey
- the key of the field as supplied when the corresponding
+ Input
was created (see Input.plain(String)
etc)input
- the text entered by the userextras
- the extras passed with SimpleDialog.extra(Bundle)
public class SimpleFormDialog +extends CustomViewDialog<SimpleFormDialog>+ +
Modifier and Type | +Class and Description | +
---|---|
class |
+SimpleFormDialog.DialogActions
+A Callback Class with useful methods used by
+FormElementViewHolder.setUpView(android.view.View, android.content.Context, android.os.Bundle, eltos.simpledialogfragment.form.SimpleFormDialog.DialogActions, boolean, boolean) |
+
class |
+SimpleFormDialog.FocusActions
+A Callback Class with useful methods used by
+FormElementViewHolder.focus(eltos.simpledialogfragment.form.SimpleFormDialog.FocusActions) |
+
static interface |
+SimpleFormDialog.InputValidator |
+
SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
protected static java.lang.String |
+INPUT_FIELDS |
+
protected static java.lang.String |
+SAVE_TAG |
+
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
SimpleFormDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
protected boolean |
+acceptsPositiveButtonPress()
+Overwrite this method to catch positive button presses,
+ e.g. if you need to verify input by the user
+
+ Note: do not call
+CustomViewDialog.pressPositiveButton() here! |
+
static SimpleFormDialog |
+build() |
+
static SimpleFormDialog |
+buildEmailInput(java.lang.String emailFieldKey)
+Convenient method to build a form dialog with a single email input
+ |
+
static SimpleFormDialog |
+buildLogin(java.lang.String userFieldKey,
+ java.lang.String passwordFieldKey)
+Convenient method to build a form dialog with a plain input alongside
+ a password input for login with username and password
+ |
+
static SimpleFormDialog |
+buildLoginEmail(java.lang.String emailFieldKey,
+ java.lang.String passwordFieldKey)
+Convenient method to build a form dialog with an email input alongside
+ a password input for login with email address and password
+ |
+
static SimpleFormDialog |
+buildNumberInput(java.lang.String numberFieldKey)
+Convenient method to build a form dialog with a single number input
+ |
+
static SimpleFormDialog |
+buildPasswordInput(java.lang.String passwordFieldKey)
+Convenient method to build a form dialog with a single password input
+ |
+
SimpleFormDialog |
+fields(FormElement... elements)
+Convenient method to populate the form with form elements
+ |
+
android.view.View |
+onCreateContentView(android.os.Bundle savedInstanceState)
+Inflate your custom view here.
+ |
+
protected void |
+onDialogShown()
+Overwrite this method to take action once the dialog is shown
+ such as settings an input focus, showing the keyboard or
+ setting the initial positiveButtonState
+ |
+
android.os.Bundle |
+onResult(int which)
+Overwrite this method to provide additional results from your custom view
+ to be passed to the
+SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle) |
+
void |
+onSaveInstanceState(android.os.Bundle outState) |
+
protected java.lang.String |
+onValidateInput(java.lang.String fieldKey,
+ java.lang.String input) |
+
protected boolean |
+posButtonEnabled() |
+
protected void |
+requestFocus(int viewIndex) |
+
callResultListener, extractContentView, inflate, inflate, onCreate, onCreateDialog, pressPositiveButton, setPositiveButtonEnabled
cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, pos, pos, setArg, setArg, setArg, setArg, show, show, show, show, show, show, theme, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
protected static final java.lang.String INPUT_FIELDS+
protected static final java.lang.String SAVE_TAG+
public static SimpleFormDialog build()+
public static SimpleFormDialog buildEmailInput(java.lang.String emailFieldKey)+
emailFieldKey
- the key that can be used to receive the entered text from the bundle in
+ SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public static SimpleFormDialog buildPasswordInput(java.lang.String passwordFieldKey)+
passwordFieldKey
- the key that can be used to receive the entered text from the bundle
+ in SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public static SimpleFormDialog buildNumberInput(java.lang.String numberFieldKey)+
numberFieldKey
- the key that can be used to receive the entered text from the bundle
+ in SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public static SimpleFormDialog buildLoginEmail(java.lang.String emailFieldKey, + java.lang.String passwordFieldKey)+
emailFieldKey
- the key that can be used to receive the entered email from the bundle
+ in SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
passwordFieldKey
- the key that can be used to receive the entered password from the
+ bundle in SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public static SimpleFormDialog buildLogin(java.lang.String userFieldKey, + java.lang.String passwordFieldKey)+
userFieldKey
- the key that can be used to receive the entered username from the bundle
+ in SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
passwordFieldKey
- the key that can be used to receive the entered password from the
+ bundle in SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public SimpleFormDialog fields(FormElement... elements)+
elements
- the FormElement
s that form should containprotected java.lang.String onValidateInput(java.lang.String fieldKey, + @Nullable + java.lang.String input)+
protected void onDialogShown()+
CustomViewDialog
onDialogShown
in class CustomViewDialog<SimpleFormDialog>
protected boolean acceptsPositiveButtonPress()+
CustomViewDialog
CustomViewDialog.pressPositiveButton()
here!acceptsPositiveButtonPress
in class CustomViewDialog<SimpleFormDialog>
protected boolean posButtonEnabled()+
protected void requestFocus(int viewIndex)+
public android.view.View onCreateContentView(android.os.Bundle savedInstanceState)+
CustomViewDialog
onCreateContentView
in class CustomViewDialog<SimpleFormDialog>
savedInstanceState
- The last saved instance state of the Fragment,
+ or null if this fragment is created for the first time.public android.os.Bundle onResult(int which)+
CustomViewDialog
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
onResult
in class CustomViewDialog<SimpleFormDialog>
which
- see SimpleDialog.OnDialogResultListener
public void onSaveInstanceState(android.os.Bundle outState)+
onSaveInstanceState
in class android.support.v4.app.DialogFragment
public class Spinner +extends FormElement<Spinner,eltos.simpledialogfragment.form.SpinnerViewHolder>+
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.android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<Spinner> |
+CREATOR |
+
required, resultKey
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
protected |
+Spinner(android.os.Parcel in) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
protected java.lang.String[] |
+getItems(android.content.Context context) |
+
protected java.lang.String |
+getPlaceholderText(android.content.Context context) |
+
protected java.lang.String |
+getText(android.content.Context context) |
+
eltos.simpledialogfragment.form.SpinnerViewHolder |
+getViewHolder()
+Return your custom implementation of
+FormElementViewHolder here |
+
Spinner |
+items(int... itemsStringResArray)
+Provide an array of items to be shown by this spinner.
+ |
+
Spinner |
+items(int itemArrayRes)
+Provide an array resource with items to be shown by this spinner.
+ |
+
Spinner |
+items(java.lang.String... items)
+Provide an array of items to be shown by this spinner.
+ |
+
Spinner |
+label(int textResourceId)
+Sets the label
+ |
+
Spinner |
+label(java.lang.String text)
+Sets the label
+ |
+
Spinner |
+placeholder(int textResourceId)
+Sets the placeholder text displayed if nothing is selected
+ |
+
Spinner |
+placeholder(java.lang.String text)
+Sets the placeholder text displayed if nothing is selected
+ |
+
static Spinner |
+plain(java.lang.String key)
+Factory method for a plain spinner.
+ |
+
Spinner |
+preset(int itemIndex)
+Set the initially selected item
+ |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
required, required
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final android.os.Parcelable.Creator<Spinner> CREATOR+
public static Spinner plain(java.lang.String key)+
key
- the key that can be used to receive the chosen item index from the bundle in
+ SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
public Spinner label(java.lang.String text)+
text
- label text as stringpublic Spinner label(@StringRes + int textResourceId)+
textResourceId
- label text as android string resourcepublic Spinner placeholder(java.lang.String text)+
text
- placeholder text as stringpublic Spinner placeholder(@StringRes + int textResourceId)+
textResourceId
- placeholder text as android string resourcepublic Spinner items(@ArrayRes + int itemArrayRes)+
itemArrayRes
- the string array resource to suggestpublic Spinner items(@StringRes + int... itemsStringResArray)+
itemsStringResArray
- array of string resources to suggestpublic Spinner items(java.lang.String... items)+
items
- array of strings to suggestpublic Spinner preset(int itemIndex)+
itemIndex
- The index of the initially selected itempublic eltos.simpledialogfragment.form.SpinnerViewHolder getViewHolder()+
FormElement
FormElementViewHolder
heregetViewHolder
in class FormElement<Spinner,eltos.simpledialogfragment.form.SpinnerViewHolder>
@Nullable +protected java.lang.String getText(android.content.Context context)+
@Nullable +protected java.lang.String getPlaceholderText(android.content.Context context)+
@Nullable +protected java.lang.String[] getItems(android.content.Context context)+
public int describeContents()+
describeContents
in interface android.os.Parcelable
describeContents
in class FormElement<Spinner,eltos.simpledialogfragment.form.SpinnerViewHolder>
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class FormElement<Spinner,eltos.simpledialogfragment.form.SpinnerViewHolder>
Interface | +Description | +
---|---|
SimpleFormDialog.InputValidator | ++ |
Class | +Description | +
---|---|
Check | +
+ An checkbox form element to be used with
+SimpleFormDialog
+
+ This is a CheckBox - what else? |
+
FormElement<T extends FormElement,V extends FormElementViewHolder> | +
+ Base-class for form elements to be used with
+SimpleFormDialog
+
+ Each form element holds a FormElement.resultKey that is used to receive element
+ specific results in SimpleFormDialog.onResult(int)
+
+ Created by eltos on 20.02.17. |
+
FormElementViewHolder<E extends FormElement> | +
+ The Base class for all ViewHolders
+
+ This class is used to create the View that represents the corresponding
+FormElement
+ and to maintain it's functionality
+
+ Created by eltos on 23.02.17. |
+
Input | +
+ An input form element to be used with
+SimpleFormDialog
+
+ This is an EditText that can be used to enter text, email-addresses, numbers, passwords etc. |
+
SimpleFormDialog | ++ + | +
Spinner | +
+ A spinner form element to be used with
+SimpleFormDialog
+
+ This is an Spinner that can be used to give a choice between different values. |
+
public class SimpleEMailDialog +extends SimpleInputDialog+
SimpleInputDialog.InputValidator
SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
static java.lang.String |
+EMAIL |
+
protected static java.lang.String |
+EMAIL_PATTERN |
+
ALLOW_EMPTY, HINT, INPUT_TYPE, MAX_LENGTH, SUGGESTIONS, TEXT
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
SimpleEMailDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
static SimpleEMailDialog |
+build() |
+
protected java.lang.String |
+onValidateInput(java.lang.String input) |
+
acceptsPositiveButtonPress, allowEmpty, getText, hint, hint, inputType, isInputEmpty, max, onCreateContentView, onDialogShown, onResult, onSaveInstanceState, openKeyboard, posEnabled, suggest, suggest, text, text
callResultListener, extractContentView, inflate, inflate, onCreate, onCreateDialog, pressPositiveButton, setPositiveButtonEnabled
cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, pos, pos, setArg, setArg, setArg, setArg, show, show, show, show, show, show, theme, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final java.lang.String EMAIL+
protected static final java.lang.String EMAIL_PATTERN+
public static SimpleEMailDialog build()+
protected java.lang.String onValidateInput(@Nullable + java.lang.String input)+
onValidateInput
in class SimpleInputDialog
public static interface SimpleInputDialog.InputValidator
+Modifier and Type | +Method and Description | +
---|---|
java.lang.String |
+validate(java.lang.String dialogTag,
+ java.lang.String input,
+ android.os.Bundle extras)
+Let the hosting fragment or activity implement this interface to control
+ when a user can proceed or to display an error message on an invalid input.
+ |
+
java.lang.String validate(java.lang.String dialogTag, + @Nullable + java.lang.String input, + @NonNull + android.os.Bundle extras)+
dialogTag
- the tag of this fragmentinput
- the text entered by the userextras
- the extras passed with SimpleDialog.extra(Bundle)
public class SimpleInputDialog +extends CustomViewDialog<SimpleInputDialog>+
Modifier and Type | +Class and Description | +
---|---|
static interface |
+SimpleInputDialog.InputValidator |
+
SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
protected static java.lang.String |
+ALLOW_EMPTY |
+
protected static java.lang.String |
+HINT |
+
protected static java.lang.String |
+INPUT_TYPE |
+
protected static java.lang.String |
+MAX_LENGTH |
+
protected static java.lang.String |
+SUGGESTIONS |
+
static java.lang.String |
+TEXT |
+
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
SimpleInputDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
protected boolean |
+acceptsPositiveButtonPress()
+Overwrite this method to catch positive button presses,
+ e.g. if you need to verify input by the user
+
+ Note: do not call
+CustomViewDialog.pressPositiveButton() here! |
+
SimpleInputDialog |
+allowEmpty(boolean allow)
+Allow empty input.
+ |
+
static SimpleInputDialog |
+build() |
+
java.lang.String |
+getText() |
+
SimpleInputDialog |
+hint(int hintResourceId)
+Sets the EditText's hint
+ |
+
SimpleInputDialog |
+hint(java.lang.String hint)
+Sets the EditText's hint
+ |
+
SimpleInputDialog |
+inputType(int inputType)
+Sets the input type
+ The default is
+InputType.TYPE_CLASS_TEXT . |
+
boolean |
+isInputEmpty() |
+
SimpleInputDialog |
+max(int maxLength)
+Sets a max limit to the EditText.
+ |
+
android.view.View |
+onCreateContentView(android.os.Bundle savedInstanceState)
+Inflate your custom view here.
+ |
+
protected void |
+onDialogShown()
+Overwrite this method to take action once the dialog is shown
+ such as settings an input focus, showing the keyboard or
+ setting the initial positiveButtonState
+ |
+
android.os.Bundle |
+onResult(int which)
+Overwrite this method to provide additional results from your custom view
+ to be passed to the
+SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle) |
+
void |
+onSaveInstanceState(android.os.Bundle outState) |
+
protected java.lang.String |
+onValidateInput(java.lang.String input) |
+
void |
+openKeyboard()
+Helper for opening the soft keyboard
+ |
+
protected boolean |
+posEnabled() |
+
SimpleInputDialog |
+suggest(android.content.Context context,
+ int[] stringResourceIds)
+Provide an array of suggestions to be shown while the user is typing
+ |
+
SimpleInputDialog |
+suggest(java.lang.String[] strings)
+Provide an array of suggestions to be shown while the user is typing
+ |
+
SimpleInputDialog |
+text(int textResourceId)
+Sets the EditText's initial text
+ |
+
SimpleInputDialog |
+text(java.lang.String text)
+Sets the EditText's initial text
+ |
+
callResultListener, extractContentView, inflate, inflate, onCreate, onCreateDialog, pressPositiveButton, setPositiveButtonEnabled
cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, pos, pos, setArg, setArg, setArg, setArg, show, show, show, show, show, show, theme, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final java.lang.String TEXT+
protected static final java.lang.String HINT+
protected static final java.lang.String INPUT_TYPE+
protected static final java.lang.String ALLOW_EMPTY+
protected static final java.lang.String MAX_LENGTH+
protected static final java.lang.String SUGGESTIONS+
public static SimpleInputDialog build()+
public SimpleInputDialog hint(java.lang.String hint)+
hint
- the hint as stringpublic SimpleInputDialog hint(@StringRes + int hintResourceId)+
hintResourceId
- the hint as android string resourcepublic SimpleInputDialog text(java.lang.String text)+
text
- initial text as stringpublic SimpleInputDialog text(@StringRes + int textResourceId)+
textResourceId
- initial text as android string resourcepublic SimpleInputDialog inputType(int inputType)+
InputType.TYPE_CLASS_TEXT
.inputType
- the InputTypepublic SimpleInputDialog allowEmpty(boolean allow)+
allow
- weather to allow empty inputpublic SimpleInputDialog max(int maxLength)+
maxLength
- the maximum text lengthpublic SimpleInputDialog suggest(android.content.Context context, + int[] stringResourceIds)+
context
- a context to resolve the resource idsstringResourceIds
- suggestion array as android string resourcespublic SimpleInputDialog suggest(java.lang.String[] strings)+
strings
- suggestion string arrayprotected java.lang.String onValidateInput(@Nullable + java.lang.String input)+
@Nullable +public java.lang.String getText()+
public boolean isInputEmpty()+
public void openKeyboard()+
public android.view.View onCreateContentView(android.os.Bundle savedInstanceState)+
CustomViewDialog
onCreateContentView
in class CustomViewDialog<SimpleInputDialog>
savedInstanceState
- The last saved instance state of the Fragment,
+ or null if this fragment is created for the first time.protected boolean posEnabled()+
protected void onDialogShown()+
CustomViewDialog
onDialogShown
in class CustomViewDialog<SimpleInputDialog>
protected boolean acceptsPositiveButtonPress()+
CustomViewDialog
CustomViewDialog.pressPositiveButton()
here!acceptsPositiveButtonPress
in class CustomViewDialog<SimpleInputDialog>
public android.os.Bundle onResult(int which)+
CustomViewDialog
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
onResult
in class CustomViewDialog<SimpleInputDialog>
which
- see SimpleDialog.OnDialogResultListener
public void onSaveInstanceState(android.os.Bundle outState)+
onSaveInstanceState
in class android.support.v4.app.DialogFragment
public class TextInputAutoCompleteTextView
+extends android.support.v7.widget.AppCompatAutoCompleteTextView
+AppCompatAutoCompleteTextView
designed for use
+ as a child of TextInputLayout
.
+
+ Using this class allows us to display a hint in the IME when in 'extract' mode.
+
+ Created by eltos on 16.02.17 as suggested here: http://stackoverflow.com/a/41864063android.widget.AutoCompleteTextView.OnDismissListener, android.widget.AutoCompleteTextView.Validator
android.widget.TextView.BufferType, android.widget.TextView.OnEditorActionListener, android.widget.TextView.SavedState
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
Constructor and Description | +
---|
TextInputAutoCompleteTextView(android.content.Context context) |
+
TextInputAutoCompleteTextView(android.content.Context context,
+ android.util.AttributeSet attrs) |
+
TextInputAutoCompleteTextView(android.content.Context context,
+ android.util.AttributeSet attrs,
+ int defStyleAttr) |
+
Modifier and Type | +Method and Description | +
---|---|
android.view.inputmethod.InputConnection |
+onCreateInputConnection(android.view.inputmethod.EditorInfo outAttrs) |
+
drawableStateChanged, getSupportBackgroundTintList, getSupportBackgroundTintMode, setBackgroundDrawable, setBackgroundResource, setDropDownBackgroundResource, setSupportBackgroundTintList, setSupportBackgroundTintMode, setTextAppearance
clearListSelection, convertSelectionToString, dismissDropDown, enoughToFilter, getAdapter, getCompletionHint, getDropDownAnchor, getDropDownBackground, getDropDownHeight, getDropDownHorizontalOffset, getDropDownVerticalOffset, getDropDownWidth, getFilter, getItemClickListener, getItemSelectedListener, getListSelection, getOnItemClickListener, getOnItemSelectedListener, getThreshold, getValidator, isPerformingCompletion, isPopupShowing, onAttachedToWindow, onCommitCompletion, onDetachedFromWindow, onDisplayHint, onFilterComplete, onFocusChanged, onKeyDown, onKeyPreIme, onKeyUp, onWindowFocusChanged, performCompletion, performFiltering, performValidation, replaceText, setAdapter, setCompletionHint, setDropDownAnchor, setDropDownBackgroundDrawable, setDropDownHeight, setDropDownHorizontalOffset, setDropDownVerticalOffset, setDropDownWidth, setFrame, setListSelection, setOnClickListener, setOnDismissListener, setOnItemClickListener, setOnItemSelectedListener, setText, setThreshold, setValidator, showDropDown
extendSelection, getAccessibilityClassName, getDefaultEditable, getDefaultMovementMethod, getFreezesText, getText, selectAll, setEllipsize, setSelection, setSelection, setText
addTextChangedListener, append, append, beginBatchEdit, bringPointIntoView, cancelLongPress, clearComposingText, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollRange, debug, didTouchFocusSelect, drawableHotspotChanged, endBatchEdit, extractText, findViewsWithText, getAutoLinkMask, getBaseline, getBottomPaddingOffset, getBreakStrategy, getCompoundDrawablePadding, getCompoundDrawables, getCompoundDrawablesRelative, getCompoundDrawableTintList, getCompoundDrawableTintMode, getCompoundPaddingBottom, getCompoundPaddingEnd, getCompoundPaddingLeft, getCompoundPaddingRight, getCompoundPaddingStart, getCompoundPaddingTop, getCurrentHintTextColor, getCurrentTextColor, getCustomInsertionActionModeCallback, getCustomSelectionActionModeCallback, getEditableText, getEllipsize, getError, getExtendedPaddingBottom, getExtendedPaddingTop, getFilters, getFocusedRect, getFontFeatureSettings, getGravity, getHighlightColor, getHint, getHintTextColors, getHyphenationFrequency, getImeActionId, getImeActionLabel, getImeHintLocales, getImeOptions, getIncludeFontPadding, getInputExtras, getInputType, getKeyListener, getLayout, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLetterSpacing, getLineBounds, getLineCount, getLineHeight, getLineSpacingExtra, getLineSpacingMultiplier, getLinksClickable, getLinkTextColors, getMarqueeRepeatLimit, getMaxEms, getMaxHeight, getMaxLines, getMaxWidth, getMinEms, getMinHeight, getMinLines, getMinWidth, getMovementMethod, getOffsetForPosition, getPaint, getPaintFlags, getPrivateImeOptions, getRightFadingEdgeStrength, getRightPaddingOffset, getSelectionEnd, getSelectionStart, getShadowColor, getShadowDx, getShadowDy, getShadowRadius, getShowSoftInputOnFocus, getTextColors, getTextLocale, getTextLocales, getTextScaleX, getTextSize, getTopPaddingOffset, getTotalPaddingBottom, getTotalPaddingEnd, getTotalPaddingLeft, getTotalPaddingRight, getTotalPaddingStart, getTotalPaddingTop, getTransformationMethod, getTypeface, getUrls, hasOverlappingRendering, hasSelection, invalidateDrawable, isCursorVisible, isInputMethodTarget, isPaddingOffsetRequired, isSuggestionsEnabled, isTextSelectable, jumpDrawablesToCurrentState, length, moveCursorToVisibleOffset, onBeginBatchEdit, onCheckIsTextEditor, onCommitCorrection, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onDragEvent, onDraw, onEditorAction, onEndBatchEdit, onGenericMotionEvent, onKeyMultiple, onKeyShortcut, onLayout, onMeasure, onPreDraw, onPrivateIMECommand, onProvideStructure, onResolvePointerIcon, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSelectionChanged, onTextChanged, onTextContextMenuItem, onTouchEvent, onTrackballEvent, onVisibilityChanged, performLongClick, removeTextChangedListener, setAllCaps, setAutoLinkMask, setBreakStrategy, setCompoundDrawablePadding, setCompoundDrawables, setCompoundDrawablesRelative, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawableTintList, setCompoundDrawableTintMode, setCursorVisible, setCustomInsertionActionModeCallback, setCustomSelectionActionModeCallback, setEditableFactory, setElegantTextHeight, setEms, setEnabled, setError, setError, setExtractedText, setFilters, setFontFeatureSettings, setFreezesText, setGravity, setHeight, setHighlightColor, setHint, setHint, setHintTextColor, setHintTextColor, setHorizontallyScrolling, setHyphenationFrequency, setImeActionLabel, setImeHintLocales, setImeOptions, setIncludeFontPadding, setInputExtras, setInputType, setKeyListener, setLetterSpacing, setLines, setLineSpacing, setLinksClickable, setLinkTextColor, setLinkTextColor, setMarqueeRepeatLimit, setMaxEms, setMaxHeight, setMaxLines, setMaxWidth, setMinEms, setMinHeight, setMinLines, setMinWidth, setMovementMethod, setOnEditorActionListener, setPadding, setPaddingRelative, setPaintFlags, setPrivateImeOptions, setRawInputType, setScroller, setSelectAllOnFocus, setSelected, setShadowLayer, setShowSoftInputOnFocus, setSingleLine, setSingleLine, setSpannableFactory, setText, setText, setText, setText, setTextAppearance, setTextColor, setTextColor, setTextIsSelectable, setTextKeepState, setTextKeepState, setTextLocale, setTextLocales, setTextScaleX, setTextSize, setTextSize, setTransformationMethod, setTypeface, setTypeface, setWidth, showContextMenu, showContextMenu, verifyDrawable
addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeSystemWindowInsets, computeVerticalScrollOffset, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBottom, getBottomFadingEdgeStrength, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, getRight, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyLongPress, onOverScrolled, onPopulateAccessibilityEvent, onProvideVirtualStructure, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onVisibilityAggregated, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDraw
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public TextInputAutoCompleteTextView(android.content.Context context)+
public TextInputAutoCompleteTextView(android.content.Context context, + android.util.AttributeSet attrs)+
public TextInputAutoCompleteTextView(android.content.Context context, + android.util.AttributeSet attrs, + int defStyleAttr)+
Interface | +Description | +
---|---|
SimpleInputDialog.InputValidator | ++ |
Class | +Description | +
---|---|
SimpleEMailDialog | +
+ An extension for the input dialog that will ensure the input is a valid email address
+
+ Results:
+ EMAIL String The entered email-address
+
+ Created by expos on 02.01.2017.
+ |
+
SimpleInputDialog | +
+ An simple dialog with an input field.
+ |
+
TextInputAutoCompleteTextView | +
+ A special sub-class of
+AppCompatAutoCompleteTextView designed for use
+ as a child of TextInputLayout . |
+
public abstract class AdvancedAdapter.AdvancedFilter
+extends android.widget.Filter
+matches(T, java.lang.CharSequence)
method needs
+ to be overwrittenandroid.widget.Filter.FilterListener, android.widget.Filter.FilterResults
Constructor and Description | +
---|
AdvancedFilter() |
+
AdvancedFilter(boolean ignoreCase,
+ boolean matchWordBeginning)
+The flags specified here are used in the default
+matches(T, java.lang.CharSequence) and
+ AdvancedAdapter.highlight(java.lang.String, android.content.Context) methods. |
+
Modifier and Type | +Method and Description | +
---|---|
protected boolean |
+isIgnoreCase() |
+
protected boolean |
+isMatchWordBeginning() |
+
protected boolean |
+matches(java.lang.String string)
+Simple string matcher that uses the current constraint and flags as specified
+ upon creation.
+ |
+
protected abstract boolean |
+matches(T object,
+ java.lang.CharSequence constraint) |
+
protected boolean |
+matchesWord(java.lang.String string,
+ java.lang.CharSequence constraint)
+Deprecated.
+ |
+
protected android.widget.Filter.FilterResults |
+performFiltering(java.lang.CharSequence constraint) |
+
protected void |
+publishResults(java.lang.CharSequence constraint,
+ android.widget.Filter.FilterResults results) |
+
convertResultToString, filter, filter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AdvancedFilter()+
public AdvancedFilter(boolean ignoreCase, + boolean matchWordBeginning)+
matches(T, java.lang.CharSequence)
and
+ AdvancedAdapter.highlight(java.lang.String, android.content.Context)
methods.ignoreCase
- weather default matching is not case-sensitivematchWordBeginning
- weather default matching is performed only at the beginning of wordsprotected boolean isIgnoreCase()+
protected boolean isMatchWordBeginning()+
protected abstract boolean matches(T object, + @NonNull + java.lang.CharSequence constraint)+
@Deprecated +protected boolean matchesWord(java.lang.String string, + @NonNull + java.lang.CharSequence constraint)+
protected boolean matches(java.lang.String string)+
string
- the string to search in@Nullable +protected android.widget.Filter.FilterResults performFiltering(@Nullable + java.lang.CharSequence constraint)+
performFiltering
in class android.widget.Filter
protected void publishResults(java.lang.CharSequence constraint, + @Nullable + android.widget.Filter.FilterResults results)+
publishResults
in class android.widget.Filter
public static interface AdvancedAdapter.ItemIdentifier<Item>
+Modifier and Type | +Method and Description | +
---|---|
java.lang.Long |
+getIdForItem(Item item) |
+
public abstract class AdvancedAdapter<T>
+extends android.widget.BaseAdapter
+implements android.widget.Filterable
+setData(T[])
or setDataAndIds(T[], long[])
+ - Overwrite getView(int, android.view.View, android.view.ViewGroup)
. You can either return with the super-call, that will
+ automatically care for the checked state if the View is an instance of Checkable
+ or set checked state yourself by using isItemChecked(int)
+
+ In your activity refer to the isItemChecked(int)
and other functions to get
+ checked items rather than using the functions of the ListView!Modifier and Type | +Class and Description | +
---|---|
class |
+AdvancedAdapter.AdvancedFilter
+An advanced filter where only the
+AdvancedAdapter.AdvancedFilter.matches(T, java.lang.CharSequence) method needs
+ to be overwritten |
+
static interface |
+AdvancedAdapter.ItemIdentifier<Item> |
+
Modifier and Type | +Field and Description | +
---|---|
static int |
+CHOICE_MODE_MULTIPLE |
+
static int |
+CHOICE_MODE_NONE |
+
static int |
+CHOICE_MODE_SINGLE |
+
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
Constructor and Description | +
---|
AdvancedAdapter() |
+
Modifier and Type | +Method and Description | +
---|---|
protected void |
+filterItems() |
+
int |
+getCheckedItemCount() |
+
java.util.ArrayList<java.lang.Long> |
+getCheckedItemIds() |
+
java.util.ArrayList<java.lang.Integer> |
+getCheckedItemOriginalPositions() |
+
java.util.ArrayList<T> |
+getCheckedItems() |
+
int |
+getCount() |
+
java.util.ArrayList<T> |
+getData()
+Get the data maintained by this adapter
+ |
+
AdvancedAdapter.AdvancedFilter |
+getFilter()
+Overwrite this method to return your AdvancedFilter here
+ |
+
T |
+getItem(int filteredPosition) |
+
long |
+getItemId(int filteredPosition) |
+
android.view.View |
+getView(int position,
+ android.view.View convertView,
+ android.view.ViewGroup parent) |
+
protected android.text.Spannable |
+highlight(java.lang.String text,
+ android.content.Context context)
+Highlights everything that matched the current filter (if any) in text
+ |
+
protected android.text.Spannable |
+highlight(java.lang.String text,
+ int color)
+Highlights everything that matched the current filter (if any) in text
+ |
+
boolean |
+isItemChecked(int filteredPosition) |
+
void |
+notifyDataSetChanged() |
+
void |
+setAllItemsChecked(boolean checked) |
+
void |
+setChoiceMode(int choiceMode)
+Defines the choice behavior for the list.
+ |
+
void |
+setData(java.util.ArrayList<? extends T> list)
+Set this adapters data
+ |
+
void |
+setData(java.util.ArrayList<? extends T> list,
+ AdvancedAdapter.ItemIdentifier<T> identifier)
+Set this adapters data and ids
+ |
+
void |
+setData(T[] list)
+Set this adapters data
+ |
+
void |
+setData(T[] list,
+ AdvancedAdapter.ItemIdentifier<T> identifier)
+Set this adapters data and ids
+ |
+
void |
+setDataAndIds(java.util.ArrayList<android.support.v4.util.Pair<T,java.lang.Long>> list) |
+
void |
+setDataAndIds(T[] list,
+ long[] ids) |
+
void |
+setItemChecked(int filteredPosition,
+ boolean checked) |
+
void |
+setItemChecked(long id,
+ boolean checked) |
+
void |
+setItemsCheckedFromIds(java.util.ArrayList<java.lang.Long> checkedItemIds) |
+
void |
+setItemsCheckedFromIds(long[] checkedItemIds) |
+
void |
+toggleChecked(int filteredPosition) |
+
areAllItemsEnabled, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final int CHOICE_MODE_NONE+
public static final int CHOICE_MODE_SINGLE+
public static final int CHOICE_MODE_MULTIPLE+
public void setData(T[] list)+
list
- a list of objects to be maintained by this adapterpublic void setData(java.util.ArrayList<? extends T> list)+
list
- an array-list of objects to be maintained by this adapterpublic void setData(T[] list, + AdvancedAdapter.ItemIdentifier<T> identifier)+
list
- a list of objects to be maintained by this adapteridentifier
- an Identifier returning a unique id for every itempublic void setData(java.util.ArrayList<? extends T> list, + AdvancedAdapter.ItemIdentifier<T> identifier)+
list
- an array-list of objects to be maintained by this adapteridentifier
- an Identifier returning a unique id for every itempublic void setDataAndIds(T[] list, + long[] ids)+
public void setDataAndIds(java.util.ArrayList<android.support.v4.util.Pair<T,java.lang.Long>> list)+
public java.util.ArrayList<T> getData()+
@Nullable +public AdvancedAdapter.AdvancedFilter getFilter()+
getFilter
in interface android.widget.Filterable
public void setChoiceMode(int choiceMode)+
CHOICE_MODE_NONE
). By setting the choiceMode to
+ CHOICE_MODE_SINGLE
, the list allows up to one item to be checked
+ Using CHOICE_MODE_MULTIPLE
, any number of items may be checked.choiceMode
- One of CHOICE_MODE_NONE
,
+ CHOICE_MODE_SINGLE
or CHOICE_MODE_MULTIPLE
public int getCount()+
getCount
in interface android.widget.Adapter
public T getItem(int filteredPosition)+
getItem
in interface android.widget.Adapter
public long getItemId(int filteredPosition)+
getItemId
in interface android.widget.Adapter
public void setItemChecked(int filteredPosition, + boolean checked)+
public void toggleChecked(int filteredPosition)+
public void setAllItemsChecked(boolean checked)+
public void setItemChecked(long id, + boolean checked)+
public void setItemsCheckedFromIds(java.util.ArrayList<java.lang.Long> checkedItemIds)+
public void setItemsCheckedFromIds(long[] checkedItemIds)+
public boolean isItemChecked(int filteredPosition)+
public int getCheckedItemCount()+
public java.util.ArrayList<T> getCheckedItems()+
public java.util.ArrayList<java.lang.Integer> getCheckedItemOriginalPositions()+
public java.util.ArrayList<java.lang.Long> getCheckedItemIds()+
protected void filterItems()+
protected android.text.Spannable highlight(java.lang.String text, + android.content.Context context)+
text
- the text to highlightcontext
- a context to get the default highlight color fromprotected android.text.Spannable highlight(java.lang.String text, + int color)+
text
- the text to highlightcolor
- the highlight colorpublic void notifyDataSetChanged()+
notifyDataSetChanged
in class android.widget.BaseAdapter
public android.view.View getView(int position, + android.view.View convertView, + android.view.ViewGroup parent)+
getView
in interface android.widget.Adapter
public abstract class AdvancedSectionAdapter<T> +extends AdvancedAdapter<T> +implements android.widget.SectionIndexer+
AdvancedAdapter.AdvancedFilter, AdvancedAdapter.ItemIdentifier<Item>
CHOICE_MODE_MULTIPLE, CHOICE_MODE_NONE, CHOICE_MODE_SINGLE
IGNORE_ITEM_VIEW_TYPE, NO_SELECTION
Constructor and Description | +
---|
AdvancedSectionAdapter() |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+getPositionForSection(int section) |
+
int |
+getSectionForPosition(int position) |
+
java.lang.Object[] |
+getSections() |
+
abstract java.lang.String |
+getSectionTitle(T object)
+Overwrite this method to return the section title corresponding with the given object.
+ |
+
void |
+notifyDataSetChanged() |
+
filterItems, getCheckedItemCount, getCheckedItemIds, getCheckedItemOriginalPositions, getCheckedItems, getCount, getData, getFilter, getItem, getItemId, getView, highlight, highlight, isItemChecked, setAllItemsChecked, setChoiceMode, setData, setData, setData, setData, setDataAndIds, setDataAndIds, setItemChecked, setItemChecked, setItemsCheckedFromIds, setItemsCheckedFromIds, toggleChecked
areAllItemsEnabled, getDropDownView, getItemViewType, getViewTypeCount, hasStableIds, isEmpty, isEnabled, notifyDataSetInvalidated, registerDataSetObserver, unregisterDataSetObserver
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public AdvancedSectionAdapter()+
public void notifyDataSetChanged()+
notifyDataSetChanged
in class AdvancedAdapter<T>
public int getPositionForSection(int section)+
getPositionForSection
in interface android.widget.SectionIndexer
public int getSectionForPosition(int position)+
getSectionForPosition
in interface android.widget.SectionIndexer
public java.lang.Object[] getSections()+
getSections
in interface android.widget.SectionIndexer
@Nullable +public abstract java.lang.String getSectionTitle(T object)+
object
- an object from the underlying data setpublic static interface ClearableEditText.Listener
+Modifier and Type | +Method and Description | +
---|---|
void |
+didClearText() |
+
public static enum ClearableEditText.Location +extends java.lang.Enum<ClearableEditText.Location>+
Enum Constant and Description | +
---|
LEFT |
+
RIGHT |
+
Modifier and Type | +Method and Description | +
---|---|
static ClearableEditText.Location |
+valueOf(java.lang.String name)
+Returns the enum constant of this type with the specified name.
+ |
+
static ClearableEditText.Location[] |
+values()
+Returns an array containing the constants of this enum type, in
+the order they are declared.
+ |
+
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
getClass, notify, notifyAll, wait, wait, wait
public static final ClearableEditText.Location LEFT+
public static final ClearableEditText.Location RIGHT+
public static ClearableEditText.Location[] values()+
+for (ClearableEditText.Location c : ClearableEditText.Location.values()) + System.out.println(c); +
public static ClearableEditText.Location valueOf(java.lang.String name)+
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic class ClearableEditText
+extends android.widget.EditText
+implements android.view.View.OnTouchListener, android.view.View.OnFocusChangeListener
+Modifier and Type | +Class and Description | +
---|---|
static interface |
+ClearableEditText.Listener |
+
static class |
+ClearableEditText.Location |
+
android.widget.TextView.BufferType, android.widget.TextView.OnEditorActionListener, android.widget.TextView.SavedState
android.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener
ACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAG_FLAG_GLOBAL, DRAG_FLAG_GLOBAL_PERSISTABLE_URI_PERMISSION, DRAG_FLAG_GLOBAL_PREFIX_URI_PERMISSION, DRAG_FLAG_GLOBAL_URI_READ, DRAG_FLAG_GLOBAL_URI_WRITE, DRAG_FLAG_OPAQUE, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z
Constructor and Description | +
---|
ClearableEditText(android.content.Context context) |
+
ClearableEditText(android.content.Context context,
+ android.util.AttributeSet attrs) |
+
ClearableEditText(android.content.Context context,
+ android.util.AttributeSet attrs,
+ int defStyle) |
+
Modifier and Type | +Method and Description | +
---|---|
protected boolean |
+isClearIconVisible() |
+
void |
+onFocusChange(android.view.View v,
+ boolean hasFocus) |
+
boolean |
+onTouch(android.view.View v,
+ android.view.MotionEvent event) |
+
void |
+setClearDrawable(int resId) |
+
protected void |
+setClearIconVisible(boolean visible) |
+
void |
+setClearPosition(ClearableEditText.Location loc) |
+
void |
+setListener(ClearableEditText.Listener listener) |
+
void |
+setOnFocusChangeListener(android.view.View.OnFocusChangeListener f) |
+
void |
+setOnTouchListener(android.view.View.OnTouchListener l) |
+
extendSelection, getAccessibilityClassName, getDefaultEditable, getDefaultMovementMethod, getFreezesText, getText, selectAll, setEllipsize, setSelection, setSelection, setText
addTextChangedListener, append, append, beginBatchEdit, bringPointIntoView, cancelLongPress, clearComposingText, computeHorizontalScrollRange, computeScroll, computeVerticalScrollExtent, computeVerticalScrollRange, debug, didTouchFocusSelect, drawableHotspotChanged, drawableStateChanged, endBatchEdit, extractText, findViewsWithText, getAutoLinkMask, getBaseline, getBottomPaddingOffset, getBreakStrategy, getCompoundDrawablePadding, getCompoundDrawables, getCompoundDrawablesRelative, getCompoundDrawableTintList, getCompoundDrawableTintMode, getCompoundPaddingBottom, getCompoundPaddingEnd, getCompoundPaddingLeft, getCompoundPaddingRight, getCompoundPaddingStart, getCompoundPaddingTop, getCurrentHintTextColor, getCurrentTextColor, getCustomInsertionActionModeCallback, getCustomSelectionActionModeCallback, getEditableText, getEllipsize, getError, getExtendedPaddingBottom, getExtendedPaddingTop, getFilters, getFocusedRect, getFontFeatureSettings, getGravity, getHighlightColor, getHint, getHintTextColors, getHyphenationFrequency, getImeActionId, getImeActionLabel, getImeHintLocales, getImeOptions, getIncludeFontPadding, getInputExtras, getInputType, getKeyListener, getLayout, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLetterSpacing, getLineBounds, getLineCount, getLineHeight, getLineSpacingExtra, getLineSpacingMultiplier, getLinksClickable, getLinkTextColors, getMarqueeRepeatLimit, getMaxEms, getMaxHeight, getMaxLines, getMaxWidth, getMinEms, getMinHeight, getMinLines, getMinWidth, getMovementMethod, getOffsetForPosition, getPaint, getPaintFlags, getPrivateImeOptions, getRightFadingEdgeStrength, getRightPaddingOffset, getSelectionEnd, getSelectionStart, getShadowColor, getShadowDx, getShadowDy, getShadowRadius, getShowSoftInputOnFocus, getTextColors, getTextLocale, getTextLocales, getTextScaleX, getTextSize, getTopPaddingOffset, getTotalPaddingBottom, getTotalPaddingEnd, getTotalPaddingLeft, getTotalPaddingRight, getTotalPaddingStart, getTotalPaddingTop, getTransformationMethod, getTypeface, getUrls, hasOverlappingRendering, hasSelection, invalidateDrawable, isCursorVisible, isInputMethodTarget, isPaddingOffsetRequired, isSuggestionsEnabled, isTextSelectable, jumpDrawablesToCurrentState, length, moveCursorToVisibleOffset, onAttachedToWindow, onBeginBatchEdit, onCheckIsTextEditor, onCommitCompletion, onCommitCorrection, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onDragEvent, onDraw, onEditorAction, onEndBatchEdit, onFocusChanged, onGenericMotionEvent, onKeyDown, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, onMeasure, onPreDraw, onPrivateIMECommand, onProvideStructure, onResolvePointerIcon, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSelectionChanged, onTextChanged, onTextContextMenuItem, onTouchEvent, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, performLongClick, removeTextChangedListener, setAllCaps, setAutoLinkMask, setBreakStrategy, setCompoundDrawablePadding, setCompoundDrawables, setCompoundDrawablesRelative, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesRelativeWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawablesWithIntrinsicBounds, setCompoundDrawableTintList, setCompoundDrawableTintMode, setCursorVisible, setCustomInsertionActionModeCallback, setCustomSelectionActionModeCallback, setEditableFactory, setElegantTextHeight, setEms, setEnabled, setError, setError, setExtractedText, setFilters, setFontFeatureSettings, setFrame, setFreezesText, setGravity, setHeight, setHighlightColor, setHint, setHint, setHintTextColor, setHintTextColor, setHorizontallyScrolling, setHyphenationFrequency, setImeActionLabel, setImeHintLocales, setImeOptions, setIncludeFontPadding, setInputExtras, setInputType, setKeyListener, setLetterSpacing, setLines, setLineSpacing, setLinksClickable, setLinkTextColor, setLinkTextColor, setMarqueeRepeatLimit, setMaxEms, setMaxHeight, setMaxLines, setMaxWidth, setMinEms, setMinHeight, setMinLines, setMinWidth, setMovementMethod, setOnEditorActionListener, setPadding, setPaddingRelative, setPaintFlags, setPrivateImeOptions, setRawInputType, setScroller, setSelectAllOnFocus, setSelected, setShadowLayer, setShowSoftInputOnFocus, setSingleLine, setSingleLine, setSpannableFactory, setText, setText, setText, setText, setTextAppearance, setTextAppearance, setTextColor, setTextColor, setTextIsSelectable, setTextKeepState, setTextKeepState, setTextLocale, setTextLocales, setTextScaleX, setTextSize, setTextSize, setTransformationMethod, setTypeface, setTypeface, setWidth, showContextMenu, showContextMenu, verifyDrawable
addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelDragAndDrop, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeSystemWindowInsets, computeVerticalScrollOffset, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, findFocus, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceHasOverlappingRendering, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBottom, getBottomFadingEdgeStrength, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getPointerIcon, getResources, getRevealOnFocusHint, getRight, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasTransientState, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onDetachedFromWindow, onDisplayHint, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyLongPress, onOverScrolled, onPopulateAccessibilityEvent, onProvideVirtualStructure, onSetAlpha, onSizeChanged, onStartTemporaryDetach, onVisibilityAggregated, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOutlineProvider, setOverScrollMode, setPivotX, setPivotY, setPointerIcon, setPressed, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, startActionMode, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDraw
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ClearableEditText(android.content.Context context)+
public ClearableEditText(android.content.Context context, + android.util.AttributeSet attrs)+
public ClearableEditText(android.content.Context context, + android.util.AttributeSet attrs, + int defStyle)+
public void setListener(ClearableEditText.Listener listener)+
public void setClearPosition(ClearableEditText.Location loc)+
public void setClearDrawable(@DrawableRes + int resId)+
public void setOnTouchListener(android.view.View.OnTouchListener l)+
setOnTouchListener
in class android.view.View
public void setOnFocusChangeListener(android.view.View.OnFocusChangeListener f)+
setOnFocusChangeListener
in class android.view.View
public boolean onTouch(android.view.View v, + android.view.MotionEvent event)+
onTouch
in interface android.view.View.OnTouchListener
public void onFocusChange(android.view.View v, + boolean hasFocus)+
onFocusChange
in interface android.view.View.OnFocusChangeListener
protected boolean isClearIconVisible()+
protected void setClearIconVisible(boolean visible)+
public abstract class CustomListDialog<This extends CustomListDialog<This>> +extends CustomViewDialog<This> +implements android.widget.AdapterView.OnItemClickListener, android.widget.AdapterView.OnItemLongClickListener+
SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
protected static java.lang.String |
+CHOICE_MAX_COUNT |
+
protected static java.lang.String |
+CHOICE_MIN_COUNT |
+
protected static java.lang.String |
+CHOICE_MODE |
+
protected static java.lang.String |
+INITIALLY_CHECKED_IDS |
+
protected static java.lang.String |
+INITIALLY_CHECKED_POSITIONS |
+
static int |
+MULTI_CHOICE |
+
static int |
+NO_CHOICE |
+
static java.lang.String |
+SELECTED_IDS
+Key for a long[] returned by
+onResult(int) |
+
static java.lang.String |
+SELECTED_POSITIONS
+Key for an ArrayList<Integer> returned by
+onResult(int) |
+
static java.lang.String |
+SELECTED_SINGLE_ID
+Key for a long returned by
+onResult(int) in single choice mode |
+
static java.lang.String |
+SELECTED_SINGLE_POSITION
+Key for an int returned by
+onResult(int) in single choice mode |
+
static int |
+SINGLE_CHOICE |
+
static int |
+SINGLE_CHOICE_DIRECT |
+
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
CustomListDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
This |
+choiceIdPreset(java.util.List<java.lang.Long> ids)
+Sets the initially checked items by their ids
+ |
+
This |
+choiceIdPreset(long id)
+Sets the initially checked item by its id
+ |
+
This |
+choiceIdPreset(long[] ids)
+Sets the initially checked items by their ids
+ |
+
This |
+choiceMax(int count)
+Sets the maximum allowed choices for the positive button to become enabled
+ |
+
This |
+choiceMin(int count)
+Sets the minimum required choices for the positive button to become enabled
+ |
+
This |
+choiceMode(int mode)
+Sets the list choice mode
+ |
+
This |
+choicePreset(int position)
+Sets the initially checked item position
+ |
+
This |
+choicePreset(int[] positions)
+Sets the initially checked item positions
+ |
+
This |
+choicePreset(java.util.List<java.lang.Integer> positions)
+Sets the initially checked item positions
+ |
+
This |
+divider(boolean show)
+Sets the visibility of the divider
+ |
+
This |
+emptyText(int titleResourceId)
+Sets a string to be displayed if no items are currently visible
+ |
+
This |
+emptyText(java.lang.String title)
+Sets a string to be displayed if no items are currently visible
+ |
+
This |
+filterable(boolean enabled)
+If set to true, show an input field at the to of the list and allow the user
+ to filter the list
+ |
+
protected android.widget.AbsListView |
+getListView() |
+
This |
+grid()
+Change the list into a grid list view (grid mode)
+ |
+
This |
+gridColumnWidth(int columnWidthDimenResId)
+Specifies the column with of this grid view (only if in grid mode)
+ |
+
This |
+gridNumColumn(int numColumns)
+Specifies the number of columns of this grid view (only if in grid mode)
+ |
+
protected void |
+notifyDataSetChanged() |
+
protected abstract AdvancedAdapter |
+onCreateAdapter()
+Overwrite this method to provide a custom adapter
+ |
+
protected android.view.View |
+onCreateContentView(android.os.Bundle savedInstanceState)
+Inflate your custom view here.
+ |
+
protected void |
+onDialogShown()
+Overwrite this method to take action once the dialog is shown
+ such as settings an input focus, showing the keyboard or
+ setting the initial positiveButtonState
+ |
+
void |
+onItemClick(android.widget.AdapterView<?> parent,
+ android.view.View view,
+ int position,
+ long id)
+Callback method to be invoked when an item in this AdapterView has
+ been clicked.
+ |
+
boolean |
+onItemLongClick(android.widget.AdapterView<?> parent,
+ android.view.View view,
+ int position,
+ long id)
+Callback method to be invoked when an item in this view has been
+ clicked and held.
+ |
+
protected android.os.Bundle |
+onResult(int which)
+Overwrite this method to provide additional results from your custom view
+ to be passed to the
+SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle) |
+
void |
+onSaveInstanceState(android.os.Bundle outState) |
+
This |
+pos(int positiveButtonResourceId)
+Sets this dialogs positive button text
+ |
+
This |
+pos(java.lang.String positiveButton)
+Sets this dialogs positive button text
+ |
+
acceptsPositiveButtonPress, callResultListener, extractContentView, inflate, inflate, onCreate, onCreateDialog, pressPositiveButton, setPositiveButtonEnabled
build, cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, setArg, setArg, setArg, setArg, show, show, show, show, show, show, theme, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
public static final int NO_CHOICE+
public static final int SINGLE_CHOICE+
public static final int SINGLE_CHOICE_DIRECT+
public static final int MULTI_CHOICE+
public static final java.lang.String SELECTED_IDS+
onResult(int)
public static final java.lang.String SELECTED_POSITIONS+
onResult(int)
public static final java.lang.String SELECTED_SINGLE_ID+
onResult(int)
in single choice modepublic static final java.lang.String SELECTED_SINGLE_POSITION+
onResult(int)
in single choice modeprotected static final java.lang.String CHOICE_MODE+
protected static final java.lang.String CHOICE_MIN_COUNT+
protected static final java.lang.String CHOICE_MAX_COUNT+
protected static final java.lang.String INITIALLY_CHECKED_POSITIONS+
protected static final java.lang.String INITIALLY_CHECKED_IDS+
protected abstract AdvancedAdapter onCreateAdapter()+
public This choiceMode(int mode)+
mode
- one of NO_CHOICE
, SINGLE_CHOICE
,
+ SINGLE_CHOICE_DIRECT
or MULTI_CHOICE
public This choiceMin(int count)+
count
- the minimum required choicespublic This choiceMax(int count)+
count
- the maximum allowed choicespublic This choicePreset(java.util.List<java.lang.Integer> positions)+
positions
- the initially checked positionspublic This choicePreset(int[] positions)+
positions
- the initially checked positionspublic This choicePreset(int position)+
position
- the initially checked positionpublic This choiceIdPreset(java.util.List<java.lang.Long> ids)+
ids
- the initially checked item idspublic This choiceIdPreset(long[] ids)+
ids
- the initially checked item idspublic This choiceIdPreset(long id)+
id
- the initially checked item idpublic This grid()+
public This gridNumColumn(int numColumns)+
numColumns
- the number of columnspublic This gridColumnWidth(@DimenRes + int columnWidthDimenResId)+
columnWidthDimenResId
- the with as an android dimension resource identifierpublic This divider(boolean show)+
show
- weather to display a divider or notpublic This filterable(boolean enabled)+
enabled
- weather to allow filtering or notpublic This emptyText(java.lang.String title)+
title
- the string to be displayedpublic This emptyText(@StringRes + int titleResourceId)+
titleResourceId
- the android string resource to be displayedpublic This pos(java.lang.String positiveButton)+
SimpleDialog
pos
in class SimpleDialog<This extends CustomListDialog<This>>
positiveButton
- the text as stringpublic This pos(int positiveButtonResourceId)+
SimpleDialog
pos
in class SimpleDialog<This extends CustomListDialog<This>>
positiveButtonResourceId
- the text as android string resourcepublic void onItemClick(android.widget.AdapterView<?> parent, + android.view.View view, + int position, + long id)+
onItemClick
in interface android.widget.AdapterView.OnItemClickListener
parent
- The AdapterView where the click happened.view
- The view within the AdapterView that was clicked (this
+ will be a view provided by the adapter)position
- The position of the view in the adapter.id
- The row id of the item that was clicked.public boolean onItemLongClick(android.widget.AdapterView<?> parent, + android.view.View view, + int position, + long id)+
onItemLongClick
in interface android.widget.AdapterView.OnItemLongClickListener
parent
- The AbsListView where the click happenedview
- The view within the AbsListView that was clickedposition
- The position of the view in the listid
- The row id of the item that was clickedprotected android.view.View onCreateContentView(android.os.Bundle savedInstanceState)+
CustomViewDialog
onCreateContentView
in class CustomViewDialog<This extends CustomListDialog<This>>
savedInstanceState
- The last saved instance state of the Fragment,
+ or null if this fragment is created for the first time.protected android.widget.AbsListView getListView()+
protected void notifyDataSetChanged()+
protected void onDialogShown()+
CustomViewDialog
onDialogShown
in class CustomViewDialog<This extends CustomListDialog<This>>
protected android.os.Bundle onResult(int which)+
CustomViewDialog
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
onResult
in class CustomViewDialog<This extends CustomListDialog<This>>
which
- see SimpleDialog.OnDialogResultListener
public void onSaveInstanceState(android.os.Bundle outState)+
onSaveInstanceState
in class android.support.v4.app.DialogFragment
public class SimpleListDialog +extends CustomListDialog<SimpleListDialog>+
SimpleDialog.OnDialogResultListener
android.support.v4.app.Fragment.InstantiationException, android.support.v4.app.Fragment.SavedState
Modifier and Type | +Field and Description | +
---|---|
protected static java.lang.String |
+DATA_SET |
+
static java.lang.String |
+HIGHLIGHT |
+
static java.lang.String |
+SELECTED_LABELS
+Key for an ArrayList<String> returned by
+onResult(int) |
+
static java.lang.String |
+SELECTED_SINGLE_LABEL
+Key for a String returned by
+onResult(int) in single choice mode |
+
CHOICE_MAX_COUNT, CHOICE_MIN_COUNT, CHOICE_MODE, INITIALLY_CHECKED_IDS, INITIALLY_CHECKED_POSITIONS, MULTI_CHOICE, NO_CHOICE, SELECTED_IDS, SELECTED_POSITIONS, SELECTED_SINGLE_ID, SELECTED_SINGLE_POSITION, SINGLE_CHOICE, SINGLE_CHOICE_DIRECT
BUNDLE, CANCELABLE, HTML, ICON_RESOURCE, MESSAGE, NEGATIVE_BUTTON_TEXT, NEUTRAL_BUTTON_TEXT, POSITIVE_BUTTON_TEXT, THEME, TITLE
STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
Constructor and Description | +
---|
SimpleListDialog() |
+
Modifier and Type | +Method and Description | +
---|---|
static SimpleListDialog |
+build() |
+
SimpleListDialog |
+filterable(boolean enabled,
+ boolean highlight)
+If set to true, show an input field at the to of the list and allow the user
+ to filter the list
+ |
+
SimpleListDialog |
+items(java.util.ArrayList<SimpleListItem> items)
+Populate the list with the Items provided.
+ |
+
SimpleListDialog |
+items(android.content.Context context,
+ int labelArrayResourceIds)
+Populate the list using a string array resource id
+ |
+
SimpleListDialog |
+items(android.content.Context context,
+ int[] labelsResourceIds)
+Populate the list with the labels provided
+ |
+
SimpleListDialog |
+items(java.lang.String[] labels)
+Populate the list with the labels provided
+ |
+
SimpleListDialog |
+items(java.lang.String[] labels,
+ long[] ids)
+Populate the list with the labels provided
+ The corresponding ids can be used to identify which labels were selected
+ |
+
protected eltos.simpledialogfragment.list.SimpleListDialog.SimpleListAdapter |
+onCreateAdapter()
+Overwrite this method to provide a custom adapter
+ |
+
protected android.os.Bundle |
+onResult(int which)
+Overwrite this method to provide additional results from your custom view
+ to be passed to the
+SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle) |
+
choiceIdPreset, choiceIdPreset, choiceIdPreset, choiceMax, choiceMin, choiceMode, choicePreset, choicePreset, choicePreset, divider, emptyText, emptyText, filterable, getListView, grid, gridColumnWidth, gridNumColumn, notifyDataSetChanged, onCreateContentView, onDialogShown, onItemClick, onItemLongClick, onSaveInstanceState, pos, pos
acceptsPositiveButtonPress, callResultListener, extractContentView, inflate, inflate, onCreate, onCreateDialog, pressPositiveButton, setPositiveButtonEnabled
cancelable, extra, getArgString, getContext, icon, msg, msg, msgHtml, msgHtml, neg, neg, neg, neut, neut, neut, onCancel, onDestroyView, setArg, setArg, setArg, setArg, show, show, show, show, show, show, theme, title, title
dismiss, dismissAllowingStateLoss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onAttach, onDetach, onDismiss, onStart, onStop, setCancelable, setShowsDialog, setStyle, setupDialog
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onHiddenChanged, onInflate, onInflate, onLowMemory, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onResume, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
protected static final java.lang.String DATA_SET+
public static final java.lang.String SELECTED_LABELS+
onResult(int)
public static final java.lang.String SELECTED_SINGLE_LABEL+
onResult(int)
in single choice modepublic static final java.lang.String HIGHLIGHT+
public static SimpleListDialog build()+
public SimpleListDialog items(android.content.Context context, + @StringRes + int[] labelsResourceIds)+
context
- a context for resolving the string ids (cannot use getContext() here)labelsResourceIds
- a list of android string resource identifierspublic SimpleListDialog items(android.content.Context context, + @ArrayRes + int labelArrayResourceIds)+
context
- a context for resolving the resource id (cannot use getContext() here)labelArrayResourceIds
- an android string array resource identifierpublic SimpleListDialog items(java.lang.String[] labels)+
labels
- a list of string to be displayedpublic SimpleListDialog items(java.lang.String[] labels, + long[] ids)+
labels
- a list of string to be displayedids
- a list of ids corresponding to the stringsjava.lang.IllegalArgumentException
- if the arrays length don't matchpublic SimpleListDialog items(java.util.ArrayList<SimpleListItem> items)+
SimpleListItem
for further detailsitems
- a list of SimpleListItem
public SimpleListDialog filterable(boolean enabled, + boolean highlight)+
enabled
- weather to allow filtering or nothighlight
- weather to highlight the text filteredprotected eltos.simpledialogfragment.list.SimpleListDialog.SimpleListAdapter onCreateAdapter()+
CustomListDialog
onCreateAdapter
in class CustomListDialog<SimpleListDialog>
protected android.os.Bundle onResult(int which)+
CustomViewDialog
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
onResult
in class CustomListDialog<SimpleListDialog>
which
- see SimpleDialog.OnDialogResultListener
public class SimpleListItem
+extends java.lang.Object
+implements android.os.Parcelable
+android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
Modifier and Type | +Field and Description | +
---|---|
static android.os.Parcelable.Creator<SimpleListItem> |
+CREATOR |
+
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | +Constructor and Description | +
---|---|
protected |
+SimpleListItem(java.lang.String string) |
+
protected |
+SimpleListItem(java.lang.String string,
+ long id) |
+
Modifier and Type | +Method and Description | +
---|---|
int |
+describeContents() |
+
long |
+getId() |
+
java.lang.String |
+getString() |
+
void |
+setId(long id) |
+
void |
+setString(java.lang.String string) |
+
java.lang.String |
+toString() |
+
void |
+writeToParcel(android.os.Parcel dest,
+ int flags) |
+
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public static final android.os.Parcelable.Creator<SimpleListItem> CREATOR+
protected SimpleListItem(java.lang.String string)+
protected SimpleListItem(java.lang.String string, + long id)+
public java.lang.String toString()+
toString
in class java.lang.Object
public void writeToParcel(android.os.Parcel dest, + int flags)+
writeToParcel
in interface android.os.Parcelable
public int describeContents()+
describeContents
in interface android.os.Parcelable
public java.lang.String getString()+
public void setString(java.lang.String string)+
public void setId(long id)+
public long getId()+
Interface | +Description | +
---|---|
AdvancedAdapter.ItemIdentifier<Item> | ++ |
ClearableEditText.Listener | ++ |
Class | +Description | +
---|---|
AdvancedAdapter<T> | +
+ Created by eltos on 04.12.2016.
+ |
+
AdvancedSectionAdapter<T> | +
+ An extension of AdvancedAdapter that provides a section indexer
+
+ Created by eltos on 02.02.2017.
+ |
+
ClearableEditText | +
+ An edit text with a clear button
+ |
+
CustomListDialog<This extends CustomListDialog<This>> | +
+ A dialog that displays a list of items.
+ |
+
SimpleListDialog | +
+ A dialog that displays a list.
+ |
+
SimpleListItem | +
+ Created by eltos on 02.01.2017.
+ |
+
Enum | +Description | +
---|---|
ClearableEditText.Location | ++ |
Interface | +Description | +
---|---|
SimpleDialog.OnDialogResultListener | ++ |
SimpleImageDialog.BitmapCreator | ++ |
SimpleImageDialog.DrawableCreator | ++ |
SimpleImageDialog.IconCreator | ++ |
Class | +Description | +
---|---|
CustomViewDialog<This extends CustomViewDialog<This>> | +
+ The base class for all custom dialogs.
+ |
+
SimpleCheckDialog | +
+ An simple dialog with a checkbox that can be set as required before proceeding
+
+ Result:
+ CHECKED boolean Weather the checkbox was finally checked
+
+ Created by eltos on 14.10.2015.
+ |
+
SimpleDateDialog | +
+ A date-picker dialog.
+ |
+
SimpleDialog<This extends SimpleDialog<This>> | +
+ An easy to use and extendable dialog fragment that displays a text message.
+ |
+
SimpleImageDialog | +
+ A dialog that displays an image
+
+ Created by eltos on 13.02.17.
+ |
+
SimpleTimeDialog | +
+ A time-picker dialog
+
+ Created by eltos on 02.02.2017.
+ |
+
Enum | +Description | +
---|---|
SimpleImageDialog.Scale | ++ |
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
+Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+Each annotation type has its own separate page with the following sections:
+Each enum has its own separate page with the following sections:
+There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object
. The interfaces do not inherit from java.lang.Object
.
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+These links take you to the next or previous class, interface, package, or related page.
+These links show and hide the HTML frames. All pages are available with or without frames.
+The All Classes link shows all classes and interfaces except non-static nested types.
+Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+The Constant Field Values page lists the static final fields and their values.
+CustomViewDialog.pressPositiveButton()
here!AdvancedAdapter.AdvancedFilter.matches(T, java.lang.CharSequence)
method needs
+ to be overwrittenAdvancedAdapter.AdvancedFilter.matches(T, java.lang.CharSequence)
and
+ AdvancedAdapter.highlight(java.lang.String, android.content.Context)
methods.SimpleFormDialog
+
+ This is a CheckBox - what else?SimpleColorDialog.DEFAULT_COLORS
setSimpleColorDialog.MATERIAL_COLOR_PALLET
,
+ SimpleColorDialog.MATERIAL_COLOR_PALLET_DARK
,
+ SimpleColorDialog.MATERIAL_COLOR_PALLET_LIGHT
,
+ SimpleColorDialog.BEIGE_COLOR_PALLET
or a custom palletInput.forceSuggestion(boolean)
SimpleFormDialog
+
+ Each form element holds a FormElement.resultKey
that is used to receive element
+ specific results in SimpleFormDialog.onResult(int)
+
+ Created by eltos on 20.02.17.FormElement
+ and to maintain it's functionality
+
+ Created by eltos on 23.02.17.FormElementViewHolder
hereCustomViewDialog.onCreateContentView(android.os.Bundle)
CustomViewDialog.onCreateContentView(android.os.Bundle)
.SimpleFormDialog
+
+ This is an EditText that can be used to enter text, email-addresses, numbers, passwords etc.InputType.TYPE_CLASS_TEXT
.InputType.TYPE_CLASS_TEXT
.R.string.no
R.string.cancel
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
SimpleDialog.OnDialogResultListener.onResult(java.lang.String, int, android.os.Bundle)
SimpleImageDialog.Scale
CustomListDialog.onResult(int)
SimpleListDialog.onResult(int)
CustomListDialog.onResult(int)
CustomListDialog.onResult(int)
in single choice modeSimpleListDialog.onResult(int)
in single choice modeCustomListDialog.onResult(int)
in single choice modeCustomViewDialog.onDialogShown()
rather than CustomViewDialog.onCreateContentView(android.os.Bundle)
FormElementViewHolder.saveState(android.os.Bundle)
FormElementViewHolder.setUpView(android.view.View, android.content.Context, android.os.Bundle, eltos.simpledialogfragment.form.SimpleFormDialog.DialogActions, boolean, boolean)
FormElementViewHolder.focus(eltos.simpledialogfragment.form.SimpleFormDialog.FocusActions)
SimpleFormDialog
+
+ This is an Spinner that can be used to give a choice between different values.AppCompatAutoCompleteTextView
designed for use
+ as a child of TextInputLayout
.Input
fields.+ + diff --git a/docs/v2.2/javadoc/overview-summary.html b/docs/v2.2/javadoc/overview-summary.html new file mode 100644 index 0000000..8f422e2 --- /dev/null +++ b/docs/v2.2/javadoc/overview-summary.html @@ -0,0 +1,152 @@ + + + + + +
Package | +Description | +
---|---|
eltos.simpledialogfragment | ++ |
eltos.simpledialogfragment.color | ++ |
eltos.simpledialogfragment.form | ++ |
eltos.simpledialogfragment.input | ++ |
eltos.simpledialogfragment.list | ++ |