java.lang.Object | ||||
↳ | android.view.View | |||
↳ | android.view.ViewGroup | |||
↳ | android.widget.LinearLayout | |||
↳ | com.sap.cloud.mobile.fiori.formcell.FilterFormCell |
A custom control using either chips or checkboxes for selecting multiple options.
A string array containing names of all items setValueOptions(String[])
in and a
List of indices of the pre-selected items setValue(List)
should be specified.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
protected CharSequence | mErrorMessage | ||||||||||
protected int | mErrorTextAppearance | ||||||||||
protected CharSequence | mHelperText | ||||||||||
protected int | mHelperTextAppearance | ||||||||||
protected int | mHorizontalMargin | ||||||||||
protected boolean | mIsInError | ||||||||||
protected boolean | mIsTablet | ||||||||||
protected int | mLabelTextAppearance | ||||||||||
protected int | mLabelTextAppearanceUnFocused | ||||||||||
protected TextView | mLabelTextView | ||||||||||
protected boolean | mShouldAttachOrientationListener | ||||||||||
protected TextView | mStatusView |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
FilterFormCell(Context context)
Construct a new FilterFormCell with default styling, sets the CellType to WidgetType.FILTER
| |||||||||||
FilterFormCell(Context context, AttributeSet attrs)
Construct a new FilterFormCell with default styling, overriding the attributes for the control
as requested, sets the CellType to WidgetType.FILTER
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addView(View child, int index, ViewGroup.LayoutParams params)
Add given view in the view
| ||||||||||
int |
getCellType()
Return the enum value for FilterFormCell
| ||||||||||
CellValueChangeListener<List<Integer>> |
getCellValueChangeListener()
Return the value change handler of the control
| ||||||||||
CharSequence |
getError()
Get the error
| ||||||||||
TextView | getErrorView() | ||||||||||
CharSequence |
getHelperText()
Get the helper text from the view
| ||||||||||
CharSequence |
getKey()
Return the label of the property of control
| ||||||||||
TextView |
getKeyLabel()
Return the view holding the key-name string
| ||||||||||
List<Integer> |
getValue()
Returns the index list of selected items in the FilterFormCell
| ||||||||||
String[] |
getValueOptions()
Returns an array of items in the Grid
| ||||||||||
boolean |
isEditable()
Returns if the control is enabled or not to modify values.
| ||||||||||
boolean |
isErrorEnabled()
Is error enabled on the view
| ||||||||||
boolean |
isHelperEnabled()
Set if the helper field is enabled on the view
| ||||||||||
boolean |
isLabelEnabled()
Is the label field on the view is enabled
| ||||||||||
boolean |
isOutlined()
True when outlined chips are outlined.
| ||||||||||
boolean |
isSingleLine()
True when chips are displayed on a single line, that scrolls horizontally.
| ||||||||||
boolean |
isUseChip()
True when the filter should display chips, false when it should display check boxes.
| ||||||||||
void | onCheckedChanged(CompoundButton compoundButton, boolean isChecked) | ||||||||||
void | onRestoreInstanceState(Parcelable state) | ||||||||||
Parcelable | onSaveInstanceState() | ||||||||||
void | setCellValueChangeListener(CellValueChangeListener<List<Integer>> listener) | ||||||||||
void |
setClickable(boolean clickable)
Enable or disable clickable property on the view and all its children
| ||||||||||
void |
setEditable(boolean isEditable)
Set if the control is enabled or not to modify value of the control.
| ||||||||||
void |
setEnabled(boolean enabled)
Enable or disable the view
| ||||||||||
void |
setError(CharSequence error)
Set the error on the view.
| ||||||||||
void |
setErrorEnabled(boolean errorEnabled)
Enable or disable the error field on the view
| ||||||||||
void |
setErrorTextAppearance(int resId)
Set the text appearance on the error
| ||||||||||
void |
setFocusable(boolean focusable)
Enable or disable focusable property on the view and all its children
| ||||||||||
void |
setHelperEnabled(boolean enabled)
Enable or disable the helper field on the view
| ||||||||||
void |
setHelperText(CharSequence helper)
Set the helper text on the view
| ||||||||||
void |
setHelperTextAppearance(int textAppearance)
Set the helper text appearance
| ||||||||||
void |
setKey(CharSequence keyName)
Set the label for property of the control
| ||||||||||
void | setKeyEnabled(boolean keyEnabled) | ||||||||||
void | setKeyTextAppearance(int resId) | ||||||||||
void |
setLabelTextAppearanceUnFocused(int labelTextAppearanceUnFocused)
Set the label text appearance when the view is not focused
| ||||||||||
void |
setOutlined(boolean outlined)
Indicate if chips should be outlined.
| ||||||||||
void |
setOverrideKeyStyle(boolean overrideKeyStyle)
Override the Key styling manually.
| ||||||||||
void |
setOverrideStatusStyle(boolean overrideStatusStyle)
Override the status i.e.
| ||||||||||
void |
setShouldAttachOrientationListener(boolean shouldAttach)
Determines if an OrientationEventListener should be attached.
| ||||||||||
void |
setSingleLine(boolean singleLine)
When set to true, chips will be displayed on a single line that can scroll horizontally when
the line is wider than the display.
| ||||||||||
void |
setUseChip(boolean useChip)
Set to true to display the filter using chips.
| ||||||||||
void |
setValue(List<Integer> value)
Sets the list of index of selected items
| ||||||||||
void |
setValueOptions(String[] valueOptions)
Sets the label of options available for the user to choose from
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
adjustMargins()
Calculate and set the margins for the cell's elements.
| ||||||||||
static boolean |
arrayContains(int[] array, int value)
Check if the array contains the given property
| ||||||||||
void |
drawableStateChanged()
Drawable state changed
| ||||||||||
TextView |
generateTextView()
Generate the text view
| ||||||||||
ViewGroup.LayoutParams | getDefaultLayoutParams() | ||||||||||
CharSequence |
getLabel()
Get the label on the view
| ||||||||||
void |
replaceStatusView()
Each time you add a new view, error/helper view has to be adjusted to be the last view in the layout
| ||||||||||
void |
setLabel(CharSequence key)
Set the label on the view
| ||||||||||
void |
setLabelEnabled(boolean keyEnabled)
Enable or disable the label field on the view
| ||||||||||
void |
setLabelTextAppearance(int textAppearance)
Set the text appearance on the label.
| ||||||||||
void |
setLabelTextAppearanceFocused(int textAppearance)
Set the text appearance on the label when the view is not focused
| ||||||||||
void |
setLabelTextColorError(ColorStateList color)
Set the text color of the label for error mode
| ||||||||||
void |
setLabelTextColorFocused(ColorStateList color)
Set the color of label when the view is focused
| ||||||||||
void |
setLabelTextColorUnFocused(ColorStateList color)
Set the color of label when the view is not focused
| ||||||||||
boolean |
setupErrorHelperView()
Setup the error/helper field on the view
| ||||||||||
boolean |
setupLabelView()
Setup the label view on the view
| ||||||||||
boolean |
shouldLayout(View v)
Should layout the given view
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Construct a new FilterFormCell with default styling, sets the CellType to WidgetType.FILTER
context | context |
---|
Construct a new FilterFormCell with default styling, overriding the attributes for the control as requested, sets the CellType to WidgetType.FILTER
context | context |
---|---|
attrs | attribute set |
Add given view in the view
child | View |
---|---|
index | position at which the view has to be added |
params | ViewGroup.LayoutParams |
Return the enum value for FilterFormCell
Return the value change handler of the control
Return the label of the property of control
Return the view holding the key-name string
Returns the index list of selected items in the FilterFormCell
Returns an array of items in the Grid
Returns if the control is enabled or not to modify values.
Is error enabled on the view
Set if the helper field is enabled on the view
Is the label field on the view is enabled
True when outlined chips are outlined.
True when chips are displayed on a single line, that scrolls horizontally. Otherwise, chips are displayed on multiple lines.
True when the filter should display chips, false when it should display check boxes.
Enable or disable clickable property on the view and all its children
clickable | boolean |
---|
Set if the control is enabled or not to modify value of the control. In readOnly mode, however, the text labels and text values will be selectable. By default, the control will be editable( user can modify value of the control)
isEditable | Boolean |
---|
Enable or disable the view
enabled | boolean |
---|
Set the error on the view. If the view is not error enabled then this API does not take any effect.
error | CharSequence |
---|
Enable or disable the error field on the view
errorEnabled | boolean |
---|
Set the text appearance on the error
resId | style resource |
---|
Enable or disable focusable property on the view and all its children
focusable | boolean |
---|
Enable or disable the helper field on the view
enabled | boolean |
---|
Set the helper text on the view
helper | CharSequence |
---|
Set the helper text appearance
textAppearance | style resource |
---|
Set the label for property of the control
keyName | label of the property |
---|
Set the label text appearance when the view is not focused
labelTextAppearanceUnFocused | Style resource |
---|
Indicate if chips should be outlined. This method only has an affect when useChip is true.
outlined | true to outline chips, otherwise chips are not outlined. |
---|
Override the Key styling manually.
overrideKeyStyle | boolean |
---|
Override the status i.e. error and helper styling manually
overrideStatusStyle | boolean |
---|
Determines if an OrientationEventListener should be attached.
shouldAttach | Whether the FormCell should consider attaching an OrientationEventListener or not |
---|
When set to true, chips will be displayed on a single line that can scroll horizontally when the line is wider than the display. When set to false, chips will be displayed on multiple lines. This method only has an affect when useChip is true.
singleLine | true to display chips on a single line, false to display chips
on multiple lines. |
---|
Set to true to display the filter using chips. False to display the filter using check boxes.
useChip | true to display the filter using chips. False to display the filter using check boxes. |
---|
Sets the list of index of selected items
value | value of the property |
---|
Sets the label of options available for the user to choose from
valueOptions | item list |
---|
Calculate and set the margins for the cell's elements. Subclasses should override this method to suit their own needs.
Check if the array contains the given property
array | array of integer |
---|---|
value | int |
Drawable state changed
Get the label on the view
Each time you add a new view, error/helper view has to be adjusted to be the last view in the layout
Set the label on the view
key | CharSequence |
---|
Enable or disable the label field on the view
keyEnabled | boolean |
---|
Set the text appearance on the label. This changes the appearance when the view is focused and unfocused
textAppearance | style resource |
---|
Set the text appearance on the label when the view is not focused
textAppearance | Style resource |
---|
Set the text color of the label for error mode
color | ColorStateList |
---|
Set the color of label when the view is focused
color | ColorStateList |
---|
Set the color of label when the view is not focused
color | ColorStateList |
---|
Setup the error/helper field on the view
Setup the label view on the view
Should layout the given view
v | View |
---|