Protected
_nativeStatic
ScrollGets/sets colon or row count depends on scrolling direction of layout. If vertical it represents colon, if horizontal it represent row count.
= 1]
3.0.2
Gets/sets colon or row count depends on scrolling direction of layout. If vertical it represents colon, if horizontal it represent row count.
= 1]
3.0.2
Gets/sets the custom distance that the content view is inset from the scroll view edges.
= {top:0, left:0, bottom:0, right:0}]
3.0.2
Gets/sets the custom distance that the content view is inset from the scroll view edges.
= {top:0, left:0, bottom:0, right:0}]
3.0.2
The scroll direction of GridView.
= 0]
3.0.2
The scroll direction of GridView.
= 0]
3.0.2
This event used to define specified gridview item to fully occupy width/height based on direction. According to direction return value must be either desired height or width of gridview item. If the direction is UI.LayoutManager.ScrollDirection#VERTICAL VERTICAL then return value must be height or vice versa. Returning undefined indicates that the gridview item will not modified.
onFullSpan
4.0.1
import LayoutManager from '@smartface/native/ui/layoutmanager';
const layoutManager = new LayoutManager();
layoutManager.on(LayoutManager.Events.FullSpan, (params) => {
console.info('onFullSpan', params);
});
This event used to define specified gridview item to fully occupy width/height based on direction. According to direction return value must be either desired height or width of gridview item. If the direction is UI.LayoutManager.ScrollDirection#VERTICAL VERTICAL then return value must be height or vice versa. Returning undefined indicates that the gridview item will not modified.
onFullSpan
4.0.1
import LayoutManager from '@smartface/native/ui/layoutmanager';
const layoutManager = new LayoutManager();
layoutManager.on(LayoutManager.Events.FullSpan, (params) => {
console.info('onFullSpan', params);
});
User must return a length value for scrollDirection that user lays out the objects. If vertical, length value will be height of item. If horizontal, length value will be width of item.
onItemLength
3.0.2
import LayoutManager from '@smartface/native/ui/layoutmanager';
const layoutManager = new LayoutManager();
layoutManager.on(LayoutManager.Events.ItemLength, (params) => {
console.info('onItemLength', params);
});
User must return a length value for scrollDirection that user lays out the objects. If vertical, length value will be height of item. If horizontal, length value will be width of item.
onItemLength
3.0.2
import LayoutManager from '@smartface/native/ui/layoutmanager';
const layoutManager = new LayoutManager();
layoutManager.on(LayoutManager.Events.ItemLength, (params) => {
console.info('onItemLength', params);
});
Protected
preProtected
addProtected
addIOSPropsProtected
createGenerated using TypeDoc
Since
3.0.2 Layout calculation class for GridView. It behaves iOS’s UICollectionViewFlowLayout and Android’s StaggeredGridLayout.
spanCount and scrollDirection are 2 important parameters of this class.
If user sets scrollDirection to “vertical”, spanCount represents count of colons. For example; scrollDirection: vertical, spanCount: 2 means user can scroll vertically, object has 2 colons and width property of items are fixed numbers depends on colon count. If user sets scrollDirection to “horizontal”, spanCount represents count of rows. For example; scrollDirection: horizontal, spanCount : 2 means user can scroll horizontally, object has 2 rows and height property of items are fixed numbers depends on row count
Example