An easy-to-use dialog box component with better experience than native dialog box, more customizable, more scalable, easy to achieve a variety of dialog boxes, menus and hint effects, more iOS, MIUI, Material You and other theme extensions are available.
Dialogs are a crucial part of software-user interaction, and DialogX makes it easy for developers to handle all of this. We are committed to creating a dialog component that is convenient to use anytime, anywhere, allowing developers to worry less and accomplish more. DialogX is not only user-friendly but also provides a wealth of customization interfaces, such as custom layouts, day-night mode switching, and the creation of exclusive app themes.
DialogX contains the following dialog components:
The basic dialog box component can realize the basic dialog box business logic, including the title, message text, single/double/triple button reminder function, and the three buttons can be displayed vertically/horizontally to meet most of the daily blocking reminder requirements.
InputDialog is an extension component of the basic dialog box, which not only contains the basic functions but also provides input box, customizable input prompt text, input text style and callback of input content after clicking the button.
The blocking wait dialog, which displays the basic circular wait animation as well as the progress display animation, is single-instance, which means that switching from the wait state (WaitDialog) to the tip state (TipDialog) is seamless, and you can freely choose to display three states of success/warning/error message alerts at the end of the wait, and the animation switching will be seamless.
BottomDialog provides a pop-up dialog style from the bottom, with title, prompt text and custom layout.
BottomMenu is an extension of BottomDialog, which provides additional menu function on top of BottomDialog, the menu can set menu content/menu icon/select function, and can also provide "Cancel" close button under different themes.
Provides a Toast-like text prompt feature, but with more powerful customization properties. You can set text tips, icons, and a control button, and you can set a continuous display or define the length of time it will automatically disappear. popTip is a non-blocking tip, which means that the user can still operate the interface while popTip is displayed.
This component is not a replacement for Notification, does not support cross-platform display by default (you can use the hover permission to allow it), and is only used for in-app notification alerts, with more powerful customization properties. PopNotification is a non-blocking alert, meaning that the user can still operate the interface while PopNotification is displayed.
FullScreenDialog provides a pop-up effect from the bottom, similar to BottomDialog but with more freedom of customization than BottomDialog. FullScreenDialog will not provide any base implementation, developers can customize the layout. By default, it will only provide a default down-close logic and a sunken Activity background display effect.
CustomDialog provides ALIGN option to easily customize the pop-up mode of the dialog box, which supports multiple pop-up modes of screen center, screen bottom, screen top, screen left and screen right by default, and also provides corresponding pop-up animation effect, of course, users can also customize the animation effect.
A mask can be implemented to show the operation guide diagram, or to guide the operation tips for buttons. GuideDialog can be displayed around a component on the interface and realize the effect of stage light. Stage light can be selected from round (outer, inner), square (outer, inner) and rectangle modes, and square and rectangle can be set with rounded corners.
DialogX adopts a theme separation structure, the main framework contains only Material design style dialog components, you can extend the themes by introducing additional theme packages.
In addition, each set of themes contains two display styles: light/dark, and you can freely switch the display of dialogs through DialogX's settings.
Theme design developers can also use the theme customization interface provided by DialogX to implement custom themes, or to style and modify existing themes.
You can also go deeper Learn how to use the DialogX theme
You can also go deeper Learn how to make a DialogX theme
You can try it by downloading the demo first: http://beta.kongzue.com/DialogXDemo
Because of dependencies, DialogX currently only supports AndroidX as the base for development. If you are using the latest version of Android Studio, the default project will be created using AndroidX as the underlying framework.
Please choose one of the following two sources to bring in your project.
1) In the project's build.gradle file, find the allprojects{}
block and add the following code.
allprojects {
repositories {
google()
jcenter()
mavenCentral() //增加 mavenCentral 仓库
}
}
⚠️ Please note that projects created with the Arctic Fox version of Android Studio will require you to go to settings.gradle and add the above jitpack repository configuration.
2) Find the dependencies{}
code block in the app's build.gradle file and add the following statement to it.
def dialogx_version = "0.0.49"
implementation "com.kongzue.dialogx:DialogX:${dialogx_version}"
1) In the project's build.gradle file, find the allprojects{}
block and add the following code.
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' } //add jitPack Maven
}
}
⚠️Please note that projects created with the Arctic Fox version of Android Studio require you to go to settings.gradle to add the above jitpack repository configuration.
2) Find the dependencies{}
block in the app's build.gradle file, and add the following statement to it:
def dialogx_version = "0.0.49"
implementation "com.github.kongzue.DialogX:DialogX:${dialogx_version}"
For specific instructions, see DialogX Wiki
Currently DialogX still provides only the most basic dialog implementation and no advanced functional modules, in order to avoid bloating your application.
However, in order to ensure that some common features, such as address selection, date selection and "share to" dialogs, are simpler to use, we provide extensions to meet these needs.
Each module is introduced separately in the extension package, so you don't need to worry about introducing unnecessary features and resources.
The extension package is currently in the preliminary development stage, to preview or make your suggestions, please visit: DialogXSample
View FAQ
🚀 More >
Please refer to the article Migrating from DialogV3 to DialogX
DialogX follows the Apache License 2.0 open source license.
Copyright Kongzue DialogX
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Thank you to all who have contributed to DialogX!
If DialogX has helped you build your software better, please give DialogX a Star, every click you make is a great support for DialogX!