I tried to improve the most useful dialogs of the Dialogs library. In my version, HTML tags are interpreted (even in the text of buttons), the InputBox uses a Masked EditText and has more options, you can check if the input is valid before closing the dialog, and the CustomDialog is fully customizable. I also solved an issue with the virtual keyboard.
MsgBox (under Gingerbread and JellyBean):
InputBox (under Gingerbread and JellyBean):
CustomDialog (under Gingerbread and JellyBean):
Another CustomDialog (under Gingerbread and JellyBean):
v1.1:
- I added a CloseDialog function;
- I added a margin parameter to the custom dialog.
v1.2:
- I fixed a bug in InputBox when there's a default value;
- I added the BackKeyPressed event for custom dialogs.
v1.3:
- I added a PasswordMode option to the InputBox;
- I added a CancelOnTouchOutside option.
v1.4:
- I added a CursorPosition option to the InputBox.
v2.0:
- I moved the CustomDialog parameters to the BD_CustomDlgParams class.
- I added two new parameters: Duration and DialogGravity.
- I removed the Margin parameter and added the MarginHeight parameter (to be used when Gravity is set to TOP).
- The BodyWidth and BodyHeight parameters defines now accurately the size of the dialog body.
v2.1:
- I added a "closing" event raised just before a custom dialog is dismissed. You can cancel the closure by returning False.
v2.11:
- I added the "DlgResponse" parameter to the Closing event.
This library does not work with Android versions < 2.
It requires another library: Masked EditText
MsgBox (under Gingerbread and JellyBean):
InputBox (under Gingerbread and JellyBean):
CustomDialog (under Gingerbread and JellyBean):
Another CustomDialog (under Gingerbread and JellyBean):
v1.1:
- I added a CloseDialog function;
- I added a margin parameter to the custom dialog.
v1.2:
- I fixed a bug in InputBox when there's a default value;
- I added the BackKeyPressed event for custom dialogs.
v1.3:
- I added a PasswordMode option to the InputBox;
- I added a CancelOnTouchOutside option.
v1.4:
- I added a CursorPosition option to the InputBox.
v2.0:
- I moved the CustomDialog parameters to the BD_CustomDlgParams class.
- I added two new parameters: Duration and DialogGravity.
- I removed the Margin parameter and added the MarginHeight parameter (to be used when Gravity is set to TOP).
- The BodyWidth and BodyHeight parameters defines now accurately the size of the dialog body.
v2.1:
- I added a "closing" event raised just before a custom dialog is dismissed. You can cancel the closure by returning False.
v2.11:
- I added the "DlgResponse" parameter to the Closing event.
This library does not work with Android versions < 2.
It requires another library: Masked EditText
Attachments
Last edited: