SwipeSelector icon indicating copy to clipboard operation
SwipeSelector copied to clipboard

Dynamically add SwipeItems

Open justrelax19 opened this issue 8 years ago • 3 comments

Suppose we have 10 elements in the array. So is there any way to add 10 SwipeItems with the Java code i.e to dynamically add 10 swipeitems ??

justrelax19 avatar Jun 06 '17 11:06 justrelax19

You can achieve this with the following code. Note that lists wont work, only arrays:

SwipeItem[] swipeItems = new SwipeItem[10];
for (int i = 0; i < 10; i++) {
    SwipeItem item = new SwipeItem( object , title, desc);
    swipeItems[i] = item;
}
swipeSelector.setItems(swipeItems);

nickstamp93 avatar Apr 16 '18 21:04 nickstamp93

it doesn't update the View Title values when called for the 2nd time. Any help?

dpather avatar May 26 '18 13:05 dpather

no update from dpather Question? i have same issue as dpather, i hope there is an answer about this issue.

shohoku6 avatar Jun 11 '18 08:06 shohoku6