Hello everyone, I am here with my new extension that is Expandable View. This extension helps you to expand or collapse the view with some customisations. This is based on the Expandable Layout published in Github. This extension does not increase or decrease the height or width of the layout as my Expand Collapse View do. This extension expand or collapse the view with animations API that don’t modify height or width of the component. When we modify the height or width of the component that their child components are much effected. This extension don’t affect them and works like professional.
Launched On :- 2021-12-09T18:30:00Z Last Updated On :- 2021-12-09T18:30:00Z Latest Version :- 1
This event raises when the view fully expanded. Returns the id.
Expanding
This event raises when any view is being expanding. Return the id and expand fraction (0 - 1) as a float value.
Collapsed
This event raises when the view is fully collapsed. Returns the id.
Collapsing
This event raises when any view is being collapsing. Return the id and expand fraction (0 - 1) as a float value.
CreateLayout
This block create the expandable layout in given container with header and content view. Id must be unique and the orientation can be given with properties.
in requires an arrangement in which the expandable layout will be created.
header requires an arrangement which will be shown all time when the view will in its normal state
content requires an arrangement which will be shown when the view will be expanded and will be hidden when the view will be collapsed.
orientation defines the orientation of the expandation of view.
Expand
Expand the view with given id or duration. If animate is false then no animation or effect will occurred.
Collapse
Collapse the view with given id or duration. If animate is false then no animation or effect will occurred.
Is Expanded
Returns true if the view referenced to the given id is expanded.
Orientation
Properties for defining the orientation.
Usage
The extension is very simple to use as I said always to my all extensions.
You just need to create the expand layout in a container with header or content views and a unique id. And your layout is ready and now you can play with it.
Then just use Expand or Collapse block to toggle the expandable layout.
In the same way this can be used in dynamic components too. I posted a demo AIA on download section that contains some usage with dynamic components and simple layouts.
This is a very small update and brings only one thing. Now you can make the expand layout above of the header view with both orientations. It means, before this update you can make the expandable layout only below the header view and can only expanded at down direction. But now you can make the expandable layout above the header view that will be expanded at up direction (if there is space to expand).
Block Added
This block has same parameters and same work as CreateLayout block. It just create the expandable layout before the header view or above the header view. I could add a extra parameter to old CreateLayout block but it could break your whole block s(if you used this extension in your project) that’s why I have added a new block with almost same name and parameters. I think I could have give it a better name to this block but nothing comes in my mind so I just named it First as it create the expandable layout first than the header view . You can use it in same way as you used the CreateLayout block.
Preview
Updated Extension
You can download this version from the same download links that are posted above.
Kindly update the extension in order to get this features
Please elaborate your issue. I could not find the issue by reading only not working. Your blocks seems good to me. What output you are getting? And what’s not working?
What do you want to show us with this video? It has nothing to see related to your issue.
Getting an error.
Attempt to read from field ‘com.sumit1334.expandablelayout.repack.b com.summit1334.expandablelayout.repack.a.a’ on a null object reference
It appears to be related to the IsExpanded block. When I removed those the error went away.
I got two problem while using this
1 getting an error runtime
(Attempt to read from field ‘com.sumit1334.expandablelayout.repack.b
com.sumit1334.expandablelayout.repack.a.a’ on a null object reference)
this