Kongzue DialogX dialog box component
More convenient and easy to use, can be customized to a higher degree, more expansibility, easy to achieve a variety of dialog boxes, menus and prompts, more iOS, MIUI and other theme extension options
DialogX advantage
Dialog box is an important component for software to respond to user operations and feedback, and DialogX will help developers to quickly complete these transactions.
We want to reduce the worry, the worry, and create a dialog box component that can be easily used at any time, in any situation.
Under the premise of easy to use, DialogX provides more personalized interfaces for developers to expand, including inserting custom layout in the dialog box, switching between light and dark color modes, and even custom themes more in line with the App UI.
✅DialogX features:
- DialogX adopts a new implementation method, which does not rely on AlertDialog, Window or Fragment implementation, making it lighter and faster.
- DialogX starts thread independent, you can start DialogX in any thread and it will automatically run in the UI thread.
- DialogX start without context parameters, the default static method to provide a line of code to achieve dialog box start, use more convenient.
- More freedom, developers can easily customize the style of any component in the dialog box, including text style, button text style, menu text style, input text style, large to the title, small to the prompt message can be modified according to the need.
- DialogX adopts the theme separation design and has its own Material theme by default. It can introduce other styles of themes such as IOS, Kongzue and MIUI, which greatly reduces the size of the App. At the same time, it provides a theme interface.
- With less coupling and fewer problems, DialogX lets you shut down activities while the dialog is running, without worrying about WindowLeaked errors that components like AlertDialog might throw at you.
- More smooth experience, DialogX animation effect is more rich, dialog box start animation using nonlinear animation, more coherent waiting prompt to complete the error animation transition effect, let your APP more dynamic.
- All themes support light and dark modes by default. You can switch the theme of the dialog box with light and dark colors by one-click configuration, and the layout content is free to meet customization requirements. DialogX also supports automatic system light and dark mode switching, which can automatically determine the display effect of light and dark colors according to system Settings.
- Easy implementation of dialog box lifecycle control and immersive adaptation.
DialogX dialog
DialogX contains the following dialog box components:
-
Basic dialog MessageDialog and InputDialog InputDialog
The basic dialog box component can realize the basic dialog box business logic, including title, message text, single/double/three button remind function, the three buttons can be displayed in vertical/horizontal, meet most of the daily blocking remind requirements.
InputDialog is an extension of the basic dialog box. In addition to basic functions, it also provides an input box, which allows you to customize the input prompt text, input text style, and input content callback after clicking a button.
-
WaitDialog and TipDialog
It is singleton, which means that switching from WaitDialog to prompt state is seamless. You can choose to display success/warning/error messages at the end of the wait. Animation transitions will also work seamlessly.
-
BottomDialog box BottomDialog and BottomMenu
BottomDialog provides a dialog box style that pops up from the bottom, setting the title, prompt text and custom layout, as well as sliding down to close and sliding up to expand when using the Material theme.
BottomMenu is an extension component of BottomDialog, which provides additional menu functions on the basis of BottomDialog. Menu contents/menu ICONS/radio options can be set in the menu, and the “Cancel” button can also be provided under different themes
-
Simple tip PopTip
Provides a text prompt similar to Toast, but with more powerful custom properties. You can set text prompts, ICONS, and a control button, and you can set the duration of the display or define the automatic disappearance period. PopTip is non-blocking, which means that the user can manipulate the interface while PopTip is displayed.
-
FullScreenDialog
FullScreenDialog provides the effect of a dialog box popping up from the bottom, which is similar to BottomDialog but has more freedom of customization than BottomDialog. FullScreenDialog will not provide any base implementation and developers can customize the implementation layout. The default only provides a default drop down logic and an Activity background drop.
-
CustomDialog box CustomDialog
According to the dialog box component of the customized degrees of freedom, the layout content is completely user-generated. CustomDialog provides the ALIGN option to easily customize the dialog box pop-up mode. By default, the center of the screen, the bottom of the screen, the top of the screen, the left of the screen, and the right of the screen are supported, and the corresponding pop-up effects are provided. Of course, the user can also customize the animation effect.
DialogX theme
DialogX uses the topic separation structure, the main framework only contains the Material design style dialog box components, you can introduce additional topic packages to achieve theme extension.
In addition, each set of themes contains two display styles of light/dark, you can freely switch the display effect of dialog box through DialogX Settings.
Theme design developers can also customize themes by using DialogX’s theme customization interface, or make style adjustments and modifications to existing themes.
Can you also learn more about how to use DialogX topics
You can also learn more about how to develop DialogX themes
Demo
You can try to download the Demo: first beta.kongzue.com/DialogXDemo
Start using DialogX
Due to dependence, DialogX currently only supports AndroidX as the basis for development. If you are using the latest version of Android Studio, the default project is created using AndroidX as the underlying framework. Older Versions of Android Support compatibility libraries will be updated in the future.
Please choose one of the following four ways of introduction.
📥 introduced
Gradle imports the jCenter source
To introduce DialogX into your project, you need to find the Dependencies {} code block in the build.gradle file of your app and add the following statement:
Implementation 'com. Kongzue. Dialogx: dialogx: 0.0.37'Copy the code
Method 2: Gradle imports the jitPack source
- Find it in the build.gradle file of project
allprojects{}
The code block adds the following code:
Google () jCenter () Maven {url 'https://jitpack.io'}Copy the code
- Find it in the build.gradle file of your app
dependencies{}
Code block and add the following statement:
Implementation 'com. Making. Kongzue. Dialogx: dialogx: 0.0.37'Copy the code
Method 3: Import the AAR package file directly
Please go to the Release page to download the AAR package file according to the required version.
-
Place the AAR in the LIBS directory.
-
Add the following code to the Build. gradle Module:
Build.gradle Repositories {flatDir {dirs 'libs'}} implementation(Name: 'AAR ', ext: 'AAR ')Copy the code
Method 4: Manually configure Maven
<dependency>
<groupId>com.kongzue.dialogx</groupId>
<artifactId>DialogX</artifactId>
<version>0.0.37</version>
<type>pom</type>
</dependency>
Copy the code
▶ ️ use
Please refer to the DialogX Wiki for instructions
ℹ️ use process encountered problems?
Viewing Frequently Asked Questions
🔁 How to migrate from DialogV3 to DialogX
Refer to the article migrating from DialogV3 to DialogX
Open source licenses
DialogX complies with the Apache License 2.0 open source protocol.
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.
Copy the code