Skip to content
A lightweight, flexible tip dialog in Android
Branch: master
Clone or download
michaelye Merge pull request #38 from okarakose/feature/corner-radius
corner radius changed from default to optional
Latest commit 8383da3 Aug 16, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea Add DialogDismissed and DialogShow listener callback Feb 4, 2016
app Add DialogDismissed and DialogShow listener callback Feb 4, 2016
easydialog code-style curly brackets Aug 15, 2017
gradle/wrapper first commit Apr 20, 2015
.gitignore first commit Apr 20, 2015
EasyDialogDemo.iml first commit Apr 20, 2015
LICENSE
README.md Update README.md May 13, 2017
build.gradle first commit Apr 20, 2015
demo.gif add demo gif Jan 29, 2016
google-play-badge.png add google play badge Jan 29, 2016
gradle.properties commit all changes Dec 27, 2015
gradlew first commit Apr 20, 2015
gradlew.bat first commit Apr 20, 2015
key.jks commit all changes Dec 27, 2015
settings.gradle

README.md

EasyDialog

A lightweight, flexible tip dialog in Android

Demo can be download in GooglePlay

Android app on Google Play

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

Issue "The triangle's right margin is not suitable on low density screens" was contributed by vigilancer

How to use

dependencies {
  compile 'com.github.michaelye.easydialog:easydialog:1.4'
}

     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 file for full text.

You can’t perform that action at this time.