This is a fully customizable popup dialog which supports Image, Video, Custom View, Simple text, Long Scrollable text and many more.
- Image Alert
- Video Alert (remote video) with video pause play functionality
- Simple text Alert (Supports very long text)
- Background Color
- Corner Radius
- Button Font
- Button Text Color
- Button Color
- Blurry Overlay Style
- Title Text Label
- Body Text Label
- Supports both orientations
- Copy xml file to library folder
- Copy .a and .h file to B4IBuilder Libs folder
- Copy the attached popupvideo.bil file to your project files folder (if you want to use video option)
- Initialize iPopupDialog with title, body, and button list
- Set all properties like image, video button color, back color etc
- Call Show function with Style Constant to show the dialog
- Wait for the Result event
- Result event will return the button text or CLOSE_WITHOUT_RESULT constant (See below documentation for details.
- Eventname_Result (button As String)
- BodyLabel As Label
- CLOSE_WITHOUT_RESULT As String
- STYLE_DARK As Int
- STYLE_EXTRALIGHT As Int
- STYLE_LIGHT As Int
- STYLE_REGULAR As Int
- TitleLabel As Label
- Class_Globals As String
- ClosePopup As String
Close the popup without result.
This will return CLOSE_WITHOUT_RESULT constant in popup result event
- Initialize (Eventname As String, Callback As Object, Title As String, Body As String, Buttons As List, Cancelable As Boolean) As iPopupDialog
Initialize the popup everytime you need a new one
Eventname: Sub name that will handle the popup result event [ Eventname_Result(button as string) ]
Callback: Set the module in which you want to catch the result event
Title: Title of the popup. Leave blank if you dont want.
Body: Body text of the popup. Leave blank if you dont want.
Buttons: List of button name. You will get this name in result sub
Cancelable: Set if it is cancelable by clicking outside of the popup
- IsInitialized As BOOL
Tests whether the object has been initialized.
- PopupWidth As Int
Get the popup width (useful for custom popup)
- Resize As String
Call it from Page_Resize event if your application support both orientation
- Show (style As Int) As String
Style must be any of the style constant
You should set all properties you need before calling this
- UpdatePostion (NewHeight As Float) As String
Update the popup position relative to keyboard (only requrired if popup contains input field).
Call it from Page_KeyboardStateChanged event
Set button color
Default: Transparent Black
Set button text font.
Default font size is 14
Set button text color
Set the custom view.
Setting custom view will hide Body text, Image and Video properties.
Set the popup background color. Default: white
Set the popup corner radius.
Set popup image.
If you set popup image then popup video will not work.
Set popup video url.
If you want to load video from non secure url (http) then make sure that ATS is disable.
1.6 KB Views: 7
99.9 KB Views: 14
179.3 KB Views: 18