Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically add SwipeItems #32

Open
justrelax19 opened this issue Jun 6, 2017 · 3 comments
Open

Dynamically add SwipeItems #32

justrelax19 opened this issue Jun 6, 2017 · 3 comments

Comments

@justrelax19
Copy link

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 ??

@nickstamp93
Copy link

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);

@dpather
Copy link

dpather commented May 26, 2018

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

@shohoku6
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants