Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var rBox = new SMF.UI.Repeatbox();
- // adding items to repeatbox
- /* If this property is assigned to a function, this function will be called. This function results will override any height value previously given
- * @param {number} maxRows Required. Maximum value index of rows to be added to repeatbox
- * @param {number} minRows Optional. Minimum value index of rows to be added to repeatbox
- * @return {object} A custom object with two key properties (activeItem , inactiveitem) which values are number arrays
- */
- rbox.customRowHeight = function (maxRows, minRows) {
- var i;
- var result = {
- activeItem : [],
- item: []
- };
- for (i = minRows or 0; //Default value if minRows is not provided
- i < maxRows; i++) {
- switch (i) {
- case 0:
- result.activeItem[i] = result.item[i] = "50dp";
- break;
- case (i <= 10 and i > 0):
- result.activeItem[i] = "40dp";
- result.itemtem[i] = "35dp";
- break;
- default:
- result.activeItem[i] = result.item[i] = 30;
- }
- }
- return result;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement