Hi everyone
!!!
Today, I want to share a method for creating custom dialogues without using any extensions.
Designer
First, you’ll need a full-screen Vertical Scroll Arrangement (VSA_Main).
Inside this, we’ll create two main vertical arrangements:
VA_Layout_Main: This will serve as the primary container for all your app’s layouts.VA_Dialog_Main: This will house all our custom dialogues.
Each layout dialogue will be placed within its own vertical arrangement.
Next, we’ll add the final components: Decoration, Clock, and Animation.
Blocks

During screen initialization, we’ll call the initializeLayout function.
This function performs the following steps in order:
- Set both main
layouts.Heightto match the screen height.
VA_Dialog_Main.Height = VSA_Main.Height+2because I noticed that on some devices,VA_Dialog_Mainwas one pixel shorter thanVSA_Main
.
(I hope someone with more experience can explain why this happens).
I think I’ve solved this problem, but it’s necessary to use an extension
Fix
The problem lies in the screen DP, in my case, a number with a decimal point that was rounded down, causing those missing pixels.
The legendarybodymindpower
created this very useful extension that allows you to get the real screen DP,
Get Device Metrics → DisplayMetrics │ Resolution - Density - Font scaling - Extensions - MIT App Inventor Communityhaving this data, we round it up and the problem seems to be solved.
-56 = TitleBar.Height
CustomDialogMetrics.aia (40.1 KB)
![]()
- Then, assign the value
"margin"to theclockFunctionvariable (we’ll explain the reason for this shortly) - And enable the clock.
As soon as the clock runs
- We stop it.
- If
clockFunctionis set to"margin", we set the top margin ofVA_Dialog_Mainto the negative height ofVSA_Main, causingVA_Dialog_Mainto slide over and coverVA_Layout_Main. - We then hide
VA_Dialog_Main.
The
screen.BackgroundColor = -1condition is a workaround i came up with to avoid creating a separate variable to track the first clock execution.
It’s admittedly a hack, but it shouldn’t cause issues, and if it does, we’ll address it later
- If
clockFunction = "orientationChanged"is used to handle device rotation,
when the phone is rotated the heights ofVA_Dialog_MainandVA_Layout_Dialogwouldn’t automatically update, this function ensures they do.
I’ve also added a small function to set up the layout for the various dialogues.
This function
- Hides all layouts and makes only the specified one visible.
- Changes the background of
VA_Dialog_Main.
For example, the alert dialog remains transparent, while the offline dialog uses a black background with high transparency. - An animation in then played to avoid making the transition feel too static.
The result

CustomDialogWE.aia (32.6 KB)
What if I wanted a blurred background?
I need to know! NOW!
Add this awesome extension from ![]()
@varsha ![]()
![]()
[Free] BlurBackground with image. My 11th extension
Simply add this block when switching between layouts,
and that’s it! ![]()
CustomDialogBlur.aia (40.4 KB)
I’ve tested the APK on Android 12, 13, and 14, and everything appears to be working correctly.
If anyone would like to try it on other devices, I’ll be very grateful.
Please report any issues you encounter, and we can work together to resolve them! 
IMPORTANT!!!
Many thanks to @iamwsumit, his guide:
Gave me the idea for this method ![]()
Happy
oding












