M2Dia
🦄 This is a Material Design 2 pop-up component developed in Java, combined with Lottie to achieve perfect pop-up functionality. It provides rich interface design and animation effects.
Install / Use
/learn @uyevan/M2DiaREADME
❤️M2Dia Android Dialog Tool
<div align="center"> <img src="https://pan.losfer.cn/view.php/911f908b42b9c15bfcf1543cb45f33d8.png"> </div>- 🕊️ This is a Material Design 2 pop-up component developed in Java, combined with Lottie to achieve perfect pop-up functionality. It provides rich interface design and animation effects.
- 🐬这是一个使用Java开发的Material Design 2弹出式组件,结合Lottie,可以实现完美的弹出功能。它提供了丰富的界面设计和动画效果。
🤡Configuration
Context, title, and type must be assigned, and other parameters can be customized and implemented. Place this anywhere in your app:
m2Dia = M2Dia.createSuccess(MainActivity.this, getString(R.string.success_title), M2Dia.M2ButTpe.HAVE_ALL_BUT)
.setContent(getString(R.string.context)) // set the context , default null
.setConfirmClick(con) // confirm button click , default dismiss
.setCloseClick(clo) // close button click , default dismiss
.setConfirmButText("confirm T") // confirm button text , default "confirm"
.setCloseButText("close T") // close button text , default "close"
.setLottieJson(M2Dia.M2Type.SUCCESS, "success.json") // custom lottie , default success.json
.setRepeatCount(5) // lottie count ,if 0 then only play 1 , default 0
.setCancelables(false) // Allow closing by clicking the return button , default true
.setCanceledOnTouchOutsides(false) // Allow closing by clicking on the screen , default true
.showM2(); // show the dialog
When you want to close it, you can define an M2Dia class variable and implement the following methods:
private M2Dia m2Dia; //import
...
m2Dia = M2Dia.createError(MainActivity.this, getString(R.string.error_title), M2Dia.M2ButTpe.NO_CLOSE_BUT)
.showM2(); //create
...
m2Dia.dismiss(); //dismiss
🐳Usage
Each method always returns a Toast object, so you can customize the Toast much more. DON'T FORGET THE show() METHOD!
Have confirm and close button:
M2Dia.createWarning(MainActivity.this, getString(R.string.warning_title), M2Dia.M2ButTpe.HAVE_ALL_BUT)
.showM2();
Have confirm button ,no have close button:
M2Dia.createError(MainActivity.this, getString(R.string.error_title), M2Dia.M2ButTpe.NO_CLOSE_BUT)
.showM2();
Hi there 👋,I'm Evan.
- 🔭 I’m currently working on something cool.
- 🌱 I’m currently learning Everything I like.
- 💬 Ask me about anything related to Java/Python.
- 📫 How to reach me: uyevan@163.com
- 😄 Read more about my Blog: GoTo
🏁Screenshots
gif

img
<img title="" src="https://pan.losfer.cn/view.php/a649e8418926da7df8e957703e369afa.jpg" alt="" width="221" data-align="center"> <img title="" src="https://pan.losfer.cn/view.php/1e657818d594831f94722e6f442cb3d2.jpg" alt="" width="221" data-align="center"> <img title="" src="https://pan.losfer.cn/view.php/d46b2866c9c52f02cf8e29d23629f41f.jpg" alt="" width="221" data-align="center">Related Skills
diffs
336.2kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
openpencil
1.7kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
HappyColorBlend
HappyColorBlendVibe Project Guidelines Project Overview HappyColorBlendVibe is a Figma plugin for color palette generation with advanced tint/shade blending capabilities. It allows designers to
ui-ux-pro-max-skill
50.9kAn AI SKILL that provide design intelligence for building professional UI/UX multiple platforms
