A lightweight, flexible tip dialog in Android

Min SDK   11
Latest Commit   2017-08-16 04:23:43
License   

Github   https://github.com/michaelye/EasyDialog

         

使用APP客户端扫描二维码运行Demo


...

michaelye
http://www.douban.com/
China

http://michaelye1988.iteye.com
Android Developer

         

类似的还有....
AlertDialogPro This project can make it easy to theme and custom Android's dialog. Also provides Holo and Material themes for old devices.
CustomActivityOnCrash Android library that allows launching a custom activity when your app crashes, instead of showing the hated Unfortunately, X has stopped dialog.
BottomDialogDemo DialogFragment 实现底部弹窗
README

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.