public abstract class

ListFormCellFilterActivity

extends AppCompatActivity
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.view.ContextThemeWrapper
         ↳ android.app.Activity
           ↳ androidx.core.app.ComponentActivity
             ↳ androidx.activity.ComponentActivity
               ↳ androidx.fragment.app.FragmentActivity
                 ↳ androidx.appcompat.app.AppCompatActivity
                   ↳ com.sap.cloud.mobile.fiori.formcell.ListFormCellFilterActivity<V extends android.view.View, T>
Known Direct Subclasses

Class Overview

Base class for the activity which will display the list of items in a Recycler View for ListPickerFormCell. The adapter for RecyclerView will of class ListFormCellFilterActivity. On pressing the navigate up button on the toolbar it goes back to the activity from which it was called. It gets the list of index of currently selected items through getSelectedIndices() method and passes this list to the parent activity.It passes the following parameters with the intent:

  • Intent Source with key "Intent Source" and value "List Picker Activity"
  • List List of index of selected items with key "SelectedIndex"
  • The parent activity needs to receive this intent and update the data source with the new selected values.

    Summary

    Constants
    String ACTION_ITEMS_SELECTED
    [Expand]
    Inherited Constants
    From class android.app.Activity
    From class android.content.Context
    From interface android.content.ComponentCallbacks2
    [Expand]
    Inherited Fields
    From class android.app.Activity
    Public Constructors
    ListFormCellFilterActivity()
    Public Methods
    List<Integer> getSelectedIds()
    Returns the list of index of selected items
    List<Integer> getSelectedIndices()
    Returns the list of index of selected items
    boolean isSingleSelectOn()
    Is the single selection feature on on this activity?
    boolean onOptionsItemSelected(MenuItem item)
    Toolbar of this activity contains navigate up arrow clicking which will navigate back to the parent activity.Parent activity will be called with an intent.
    void setBindByViewIdBinder(ListPickerBindByViewIdBinder<V> bindByViewIdBinder)
    void setTitle(String title)
    Set the title of the Activity
    Protected Methods
    abstract int getItemCount()
    How many types of View to be inflated in the list filter
    final int getItemIdFromPos(int pos)
    Given the position get the Id of the element.
    abstract int getItemViewType(int position)
    Type of View to be inflated in the list filter at index represented by position
    void getItems(Bundle bundle)
    ListFormCellFilterActivity needs to restore the user defined data received through the intent.
    List<Integer> getSelections()
    Internal api to return indices/ids.
    void notifyDataSetChanged()
    void onBindView(int pos)
    A callback mechanism to notify the user that view at given position was just loaded.
    abstract void onBindView(V view, int position)
    Bind the view for the data at position represented by position
    final void onBindViewWithId(V view, int id)
    BindView by id.
    void onCreate(Bundle savedInstanceState)
    abstract V onCreateView(int viewType, Context context)
    Create the view of type represented by viewType and context
    void onSaveInstanceState(Bundle outState)
    void saveItems(Intent intent)
    ListForm cell has two properties:
    • Utilizes ListFormCellFilterActivity to present list of items to choose from
    • Allows user to perform data binding and XMl binding by providing data into the declaring XML file.
    void setListFormCellItemProvider(Adapter adapter)
    Sets the adapter for the RecyclerView
    [Expand]
    Inherited Methods
    From class androidx.appcompat.app.AppCompatActivity
    From class androidx.fragment.app.FragmentActivity
    From class androidx.activity.ComponentActivity
    From class androidx.core.app.ComponentActivity
    From class android.app.Activity
    From class android.view.ContextThemeWrapper
    From class android.content.ContextWrapper
    From class android.content.Context
    From class java.lang.Object
    From interface android.content.ComponentCallbacks
    From interface android.content.ComponentCallbacks2
    From interface android.view.KeyEvent.Callback
    From interface android.view.LayoutInflater.Factory
    From interface android.view.LayoutInflater.Factory2
    From interface android.view.View.OnCreateContextMenuListener
    From interface android.view.Window.Callback
    From interface androidx.activity.OnBackPressedDispatcherOwner
    From interface androidx.activity.contextaware.ContextAware
    From interface androidx.activity.result.ActivityResultCaller
    From interface androidx.activity.result.ActivityResultRegistryOwner
    From interface androidx.appcompat.app.ActionBarDrawerToggle.DelegateProvider
    From interface androidx.appcompat.app.AppCompatCallback
    From interface androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallback
    From interface androidx.core.app.ActivityCompat.RequestPermissionsRequestCodeValidator
    From interface androidx.core.app.OnMultiWindowModeChangedProvider
    From interface androidx.core.app.OnNewIntentProvider
    From interface androidx.core.app.OnPictureInPictureModeChangedProvider
    From interface androidx.core.app.TaskStackBuilder.SupportParentable
    From interface androidx.core.content.OnConfigurationChangedProvider
    From interface androidx.core.content.OnTrimMemoryProvider
    From interface androidx.core.view.KeyEventDispatcher.Component
    From interface androidx.core.view.MenuHost
    From interface androidx.lifecycle.HasDefaultViewModelProviderFactory
    From interface androidx.lifecycle.LifecycleOwner
    From interface androidx.lifecycle.ViewModelStoreOwner
    From interface androidx.savedstate.SavedStateRegistryOwner

    Constants

    public static final String ACTION_ITEMS_SELECTED

    Constant Value: "fiori.list_picker_filter.items_selected"

    Public Constructors

    public ListFormCellFilterActivity ()

    Public Methods

    public List<Integer> getSelectedIds ()

    Returns the list of index of selected items

    Returns
    • List list of index of selected items

    public List<Integer> getSelectedIndices ()

    Returns the list of index of selected items

    Returns
    • List list of index of selected items

    public boolean isSingleSelectOn ()

    Is the single selection feature on on this activity?

    Returns
    • boolean

    public boolean onOptionsItemSelected (MenuItem item)

    Toolbar of this activity contains navigate up arrow clicking which will navigate back to the parent activity.Parent activity will be called with an intent.

    Returns
    • Boolean if navigation to the parent activity was successful

    public void setBindByViewIdBinder (ListPickerBindByViewIdBinder<V> bindByViewIdBinder)

    public void setTitle (String title)

    Set the title of the Activity

    Parameters
    title Title as String

    Protected Methods

    protected abstract int getItemCount ()

    How many types of View to be inflated in the list filter

    Returns
    • int

    protected final int getItemIdFromPos (int pos)

    Given the position get the Id of the element.

    Parameters
    pos position

    protected abstract int getItemViewType (int position)

    Type of View to be inflated in the list filter at index represented by position

    Parameters
    position int
    Returns
    • int

    protected void getItems (Bundle bundle)

    ListFormCellFilterActivity needs to restore the user defined data received through the intent. To deserialize or un-parcel the data, ListFormCellFilterActivity call getItems(Bundle) method.

    Parameters
    bundle Bundle

    protected List<Integer> getSelections ()

    Internal api to return indices/ids.

    Returns
    • list of integer

    protected void notifyDataSetChanged ()

    protected void onBindView (int pos)

    A callback mechanism to notify the user that view at given position was just loaded.

    Parameters
    pos int

    protected abstract void onBindView (V view, int position)

    Bind the view for the data at position represented by position

    Parameters
    view View
    position int

    protected final void onBindViewWithId (V view, int id)

    BindView by id.

    Parameters
    view View
    id id

    protected void onCreate (Bundle savedInstanceState)

    protected abstract V onCreateView (int viewType, Context context)

    Create the view of type represented by viewType and context

    Parameters
    viewType int
    context Context
    Returns
    • View

    protected void onSaveInstanceState (Bundle outState)

    protected void saveItems (Intent intent)

    ListForm cell has two properties:

    • Utilizes ListFormCellFilterActivity to present list of items to choose from
    • Allows user to perform data binding and XMl binding by providing data into the declaring XML file.
    In order to present the user defined data to the ListFormCellFilterActivity, ListPickerFormCell has to store the data into intent. In order to store the data, ListPickerFormCell calls this method.

    Parameters
    intent Intent
    See Also

    protected void setListFormCellItemProvider (Adapter adapter)

    Sets the adapter for the RecyclerView