CustomSheet: Create custom sheets with ease

1.Introduction

Description: Using this extension you can create dialogs like bottom sheet and top sheet (with similar animation).Also you can specify animation style (left,right,bottom,top).
Latest Version: 1.1
Released: 2021-05-26T18:30:00Z
Last Updated: 2021-07-22T18:30:00Z

2.Blocks

image

image

3.Documentation

Register arrangement
image

id ~ int
component ~ AndroidViewComponent
gravity ~ int (48 for Top,80 for bottom and 17 for center; more values can be found here)
height ~int (-1 for fill parent and -2 for wrap content)
width ~ int (-1 for fill parent and -2 for wrap content)
dimAmount ~ float (between 0 and 1)
animationDuration ~ int (500 is suitable for all animations)
isCancelable ~ boolean (specifies whether back press can dismiss this sheet or not)
swipeEnabled ~ boolean (specifies whether user can dismiss this sheet by swiping in opposite direction of origin)

Show Sheet
image

Dismiss/Hide Sheet
It can be shown again
image

Remove Sheet
Needs to be registered again
image

IsShowing
Checks whether given sheet is showing or not
image

Get Ids
Returns a list of used IDs
image

4.Download

Aix: com.sunny.customsheet.aix (19.8 KB)
Aia: easy.aia (37.0 KB)

Meanwhile you can test this apk:

Kindly PM me if you want to donate. :heart:

ChangeLog Version 1.1

New Blocks

  • Added GetIds method

Hope it will be helpful! :slightly_smiling_face:

10 Likes

Some screenshots (or a video, to show animations) would be nice for those who do not know what a bottom or top sheet is :slight_smile:

2 Likes

Sure Sir.

3 Likes

MIT can redistribute this extension:

I, vknow360 aka Sunny Gupta, attest that I am the author of the CustomSheet extension , grant that the extension included in this project is free and that MIT has a non-exclusive irrevocable license to republish the extension as part of the project file for the purposes of the MIT App Inventor Appathon 2021.

Have a good Appathon! :+1:

3 Likes

Height and Width, when set to pixels (e.g. not -1 or -2) do not seem to relate to screen size?

1 Like

The extension uses dp values. :grin:

Ah, OK.... :wink:

Is it possible to provide the registered arrangement as a component (another method block with the id), so it would be possible, for example, to add rounded corners to the arrangement?

Sorry I forgot about this post.
Did you find the solution?

Not yet, do not see how to get the component with id to set with other extensions

or

Is it possible to use another extension, e.g. your cornerRadius, to modify the appearance of the customSheet ?

Not sure about that but it should work if you first round the corner and then register view as custom sheet.

1 Like

Will try that and report back :slight_smile:

Works as you suggested:

Many thanks :slight_smile:

2 Likes

Hi!! great extension...I managed to create my own side menu. I can use to decorate the shape the Decoration extension from @Omer_Gundogar (here). Just use the decoration block before the Register block from CustomSheet.

My block to adjust menu on top and left.

1 Like