Colapsable dropdowns

Hello people. I have been trying to add some collapsible dropdowns in my app and can’t seem to get it right. I checked other posts for the same and followed the instructions it but no luck. Would really appreciate any help / suggestions. I’m includig the details

Here i’m trying to collapse “Text 1” which is inside “GroupM”, when i click on B1. Settings are as shown

So when I click on B1, “GroupM” should collapse and B2 should climb up. But i’m not able to get it to do that.

image image

I’m sure I’m doing something stupid but can’t seem to figure out. Would really appreciate if someone could point out what’s wrong.

As collapsible group, like a title(Button) and a body(Group)

As one way i would do it. Supposing your useing a RG.

I will create a RG item Group, containing a list of item Suppose each item as, title buttons with a body.

Now give repeating group a custom state as, current body.

Now on body make a condition corrent cell index is RG custom state make it visible els by default make it not visible.

Now when the bottom click set the RG group custom state to the current cell index.

I hope this work, if you still get stuk. Tag me, i will love to assist you on call.

Thanks for the reply @Baloshi69 but I’m not sure if I follow. I’m not using any repeting group. Its just a bunch of text that i want to collapse. So I put text inside the a group (Group M in my example) and what you see are the “Layout Settings” of that Group.
I have set it to collapse when not visible but i wouldn’t when when i toggle it using B1 button (in the screenshot)

Then it’s even esier , to make a custom state on the parent group.

and on each button set a workflow to set the state of that parent group to a specific name, and then on each text element put a condition if the parent group custom state is “this specific text” make it visible.

If you can dm me you editor link i will emplement it.

I’m doing the exact same thing. Instead of custom states, i’m using “toggle feature”. So when i click on B1, Group M, is toggled to “not visible”

I have created a dummp app with the same settings. Would be a great help if you could edit this to make Group M collapse

Bro never give your editor link in feed but message them directly to person you want.

Hi there, @sethilashkay… I took a quick look, and the reason it is not working the way you want is because you are using the wrong layout. You are using align to parent, and you are putting top margins on elements to space them out. Start by using a column layout and get rid of the top margins on your elements, and then you should be able to get down the path to making the group collapse the way you want.

Best…
Mike

1 Like

He created a test app, @Baloshi69… it’s fine.

Thanks @mikeloc. Its working now. Appreciate it.
Thanks @Baloshi69 for all the help. Yea. Its a test app. I’ll delete it anyway.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.