i have a list view with swipeble container i want to know how to handle action if im swiping container then a button will appear and if im clicking a new form will be shown
ArrayList<Membre> am = gs.getAllm();
for (Membre i : am) {
Container ctn1 = new Container(new BoxLayout(BoxLayout.X_AXIS));
Container ctn2 = new Container(new BoxLayout(BoxLayout.Y_AXIS));
Label lblSurnom = new Label("Surnom : " + i.getNom());
ctn2.add(new Label("Nom : " + i.getUsername() + " " + i.getPrenom()));
ctn2.add(lblSurnom);
lblSurnom.addPointerReleasedListener(ev -> {
//display detail
new MembreForm().displayDetailMember(i, theme, member);
});
ctn1.setLeadComponent(lblSurnom);
Image imgServer = theme.getImage(i.getProfil_pic());
ImageViewer imgProfile = new ImageViewer(imgServer);
ctn1.add(imgProfile);
ctn1.add(ctn2);
Button btndelete = new Button();
btndelete.setIcon(theme.getImage("delete.png"));
btndelete.setUIID("container");
SwipeableContainer sp = new SwipeableContainer(btndelete, ctn1);
member.add(sp);
If you are experiencing an issue please mention the full platform your issue applies to: