https://github.com/netristv/ti.scrollableview
https://github.com/netristv/ti.scrollableview
axway scrollableview titanium
Last synced: 12 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/netristv/ti.scrollableview
- Owner: NetrisTV
- License: other
- Created: 2018-07-05T13:45:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-02T12:51:16.000Z (over 6 years ago)
- Last Synced: 2025-02-17T09:16:42.360Z (about 1 year ago)
- Topics: axway, scrollableview, titanium
- Language: Java
- Size: 341 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ti.scrollableview Module
## Description
ScrollableView is a view that encapsulates a horizontally-scrolling set of child views,
known as pages, navigable using its built-in horizontal swipe gestures.
This module implements this missing properies of Android version of
[Ti.UI.ScrollableView](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.ScrollableView):
* clipViews
* currentPageIndicatorColor
* pagingControlOnTop
* pageIndicatorColor
See [documentation](documentation/index.md) for more information.
Also it provides nice-looking `ink page indicator` aka paging control.

## Installation
* Grab the latest package from the releases page
* Install it following [this guide](https://docs.appcelerator.com/platform/latest/#!/guide/Using_Modules)
* with [gittio](http://gitt.io/): `$ gittio install ru.netris.mobile.scrollableview`
## Usage
```javascript
var win = Ti.UI.createWindow({
title: 'ScrollableView',
backgroundColor:'#eee'
});
var label = Ti.UI.createLabel();
win.add(label);
win.open();
// Common params
var params = {
clipViews: false,
currentPageIndicatorColor: '#000',
pageIndicatorColor: '#f00',
pagingControlOnTop: false,
showPagingControl: true,
top: 0
};
var scrollableView;
if (Ti.Platform.name === 'android') {
// Android specific params
params.padding = {
left: 40,
right: 40
};
var module = require('ru.netris.mobile.scrollableview');
scrollableView = module.createScrollableView(params);
} else {
// iOS specific params
params.overlayEnabled = true;
params.width = '90%';
scrollableView = Titanium.UI.createScrollableView(params);
}
var view1 = Ti.UI.createView({ id: 'view1', backgroundColor: '#836' });
var view2 = Ti.UI.createView({ id: 'view2', backgroundColor: '#246' });
var view3 = Ti.UI.createView({ id: 'view3', backgroundColor: '#48b' });
scrollableView.setViews([view1, view2, view3]);
win.add(scrollableView);
```