Giter Site home page Giter Site logo

dialogdemo's Introduction

DialogDemo

这是一个自定义Dialog弹窗提示

在App的开发中,提示框是经常用到的一个技术点。因为样式与之前不一样,所以就自定义写一个,今天自定义的提示框,跟之前差不多都是直接继承至Dialog, 但是没有使用XML布局,都是动态创建View和画的背景,另外还支持添加动画。

下面来看看效果图:

            image         image  

matedialog包下的是一些抽取的Base类和工具类,MaterialDialog是比较灵活的可以定制其布局样式和动画支持的dialog,在onCreateView函数中创建你所需要定制的布局即可。不需要动画就直接忽略不设置。

而AbsAlertDialog与ComAlertDialog就一个单独的类,直接copy即可不需要带那么多附加的东西。方便但不能定制,比较合布局统一的项目。 二者的区别在于AbsAlertDialog支持设置显示隐藏动画,ComAlertDialog不支持,不过大部分的提示框基本都不存在动画效果。

使用时方法在项目里Activity中的showDialogh函数里,文案大小、颜色或背景等都可以在外部传入。设置按钮点击回调后可在其回调方法里进行你的流程操作。

好了,就是这样,希望能帮助有需要的各位!

dialogdemo's People

Contributors

wewewe avatar

Stargazers

 avatar  avatar xushanpei avatar 罗斯柴尔德 avatar

Watchers

James Cloos avatar 罗斯柴尔德 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.