Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michaelye/EasyDialog
A lightweight, flexible tip dialog in Android
https://github.com/michaelye/EasyDialog
Last synced: 1 day ago
JSON representation
A lightweight, flexible tip dialog in Android
- Host: GitHub
- URL: https://github.com/michaelye/EasyDialog
- Owner: michaelye
- License: other
- Created: 2015-04-20T04:04:49.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-16T04:23:43.000Z (almost 7 years ago)
- Last Synced: 2024-02-29T00:38:58.869Z (4 months ago)
- Language: Java
- Size: 2.31 MB
- Stars: 705
- Watchers: 23
- Forks: 191
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-github-android-ui - EasyDialog - Android轻量级提示对话框 (对话框)
- awesome-stars - michaelye/EasyDialog - A lightweight, flexible tip dialog in Android (Java)
- awesome-github-android-ui - EasyDialog - Android轻量级提示对话框 (对话框)
README
# EasyDialog
## A lightweight, flexible tip dialog in AndroidDemo can be download in GooglePlay
![](demo.gif)
A lightweight, flexible tip dialog in Android.You can custom the dialog style easily,set the TipView location, background color,animations,just only one line code!!!
This Project and Demo is open source in github.###Special Thanks
Feature "Added left and right gravity" was contributed by [akihiro0228](https://github.com/akihiro0228)Issue "The triangle's right margin is not suitable on low density screens" was contributed by [vigilancer](https://github.com/vigilancer)
## How to use
```groovy
dependencies {
compile 'com.github.michaelye.easydialog:easydialog:1.4'
}
```
```java
View view = this.getLayoutInflater().inflate(R.layout.layout_tip_content_horizontal, null);
new EasyDialog(MainActivity.this)
// .setLayoutResourceId(R.layout.layout_tip_content_horizontal)//layout resource id
.setLayout(view)
.setBackgroundColor(MainActivity.this.getResources().getColor(R.color.background_color_black))
// .setLocation(new location[])//point in screen
.setLocationByAttachedView(btnTopLeft)
.setGravity(EasyDialog.GRAVITY_BOTTOM)
.setAnimationTranslationShow(EasyDialog.DIRECTION_X, 1000, -600, 100, -50, 50, 0)
.setAnimationAlphaShow(1000, 0.3f, 1.0f)
.setAnimationTranslationDismiss(EasyDialog.DIRECTION_X, 500, -50, 800)
.setAnimationAlphaDismiss(500, 1.0f, 0.0f)
.setTouchOutsideDismiss(true)
.setMatchParent(true)
.setMarginLeftAndRight(24, 24)
.setOutsideColor(MainActivity.this.getResources().getColor(R.color.outside_color_trans))
.show();
```## License
Use and distribution of licensed under the Apache2.0 license. See the [LICENSE](https://github.com/michaelye/EasyDialog/blob/master/LICENSE) file for full text.