public class

CollectionView

extends ConstraintLayout
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ androidx.constraintlayout.widget.ConstraintLayout
         ↳ com.sap.cloud.mobile.fiori.object.CollectionView

Class Overview

The CollectionView Cell is an alternative for ObjectCells/Contact cells inside RecyclerView.

* Structure *

Summary

Nested Classes
class CollectionView.CollectionViewAdapter CollectionViewAdapter is subtype of SectionedRecyclerViewAdapter class written to create CollectionViewItem, allow users to bind the required CollectionView with correct data. 
enum CollectionView.LayoutType  
XML Attributes
Attribute Name Related Method Description
com.sap.cloud.mobile.fiori:collectionLayoutType  
com.sap.cloud.mobile.fiori:footer Footer of the Collection View

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name". 

com.sap.cloud.mobile.fiori:header Header of the Collection View

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name". 

[Expand]
Inherited Constants
From class androidx.constraintlayout.widget.ConstraintLayout
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
CollectionView(Context context, AttributeSet attrs, int defStyleAttr)
CollectionView(Context context)
CollectionView(Context context, AttributeSet attrs)
Public Methods
TextView getFooterView()
TextView getHeaderView()
void setCollectionLayoutType(CollectionView.LayoutType collectionLayoutType)
void setCollectionViewAdapter(CollectionView.CollectionViewAdapter collectionViewAdapter)
Set the adapter of the CollectionView
void setFooter(CharSequence footer)
Set the footer of the CollectionView
void setFooter(int res)
Set the footer of the CollectionView
void setFooterClickListener(View.OnClickListener listener)
void setHeader(CharSequence header)
Set the header of the CollectionView
void setHeader(int res)
Set the header of CollectionView from the resource
void setItemClickListener(FioriItemClickListener fioriItemClickListener)
Set the item touch listener for CollectionView
void setPartialChildGradient(int partialChildGradient)
Set the gradient to be applied on the partially visible.
[Expand]
Inherited Methods
From class androidx.constraintlayout.widget.ConstraintLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource

XML Attributes

com.sap.cloud.mobile.fiori:collectionLayoutType

Related Methods

com.sap.cloud.mobile.fiori:footer

Footer of the Collection View

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

Related Methods

com.sap.cloud.mobile.fiori:header

Header of the Collection View

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

Related Methods

Public Constructors

public CollectionView (Context context, AttributeSet attrs, int defStyleAttr)

public CollectionView (Context context)

public CollectionView (Context context, AttributeSet attrs)

Public Methods

public TextView getFooterView ()

public TextView getHeaderView ()

public void setCollectionLayoutType (CollectionView.LayoutType collectionLayoutType)

public void setCollectionViewAdapter (CollectionView.CollectionViewAdapter collectionViewAdapter)

Set the adapter of the CollectionView

Parameters
collectionViewAdapter CollectionViewAdapter

public void setFooter (CharSequence footer)

Set the footer of the CollectionView

Parameters
footer footer of the CollectionView

public void setFooter (int res)

Set the footer of the CollectionView

Parameters
res String resource representing the footer

public void setFooterClickListener (View.OnClickListener listener)

Set the View.OnClickListener on CollectionView Footer. This can be used to open different activity where the CollectionViewItem are presented as ObjectCell or ContactCell.

public void setHeader (CharSequence header)

Set the header of the CollectionView

Parameters
header header as CharaSequence

public void setHeader (int res)

Set the header of CollectionView from the resource

Parameters
res String resource representing the header

public void setItemClickListener (FioriItemClickListener fioriItemClickListener)

Set the item touch listener for CollectionView

Parameters
fioriItemClickListener FioriItemClickListener

public void setPartialChildGradient (int partialChildGradient)

Set the gradient to be applied on the partially visible.