Giter VIP home page Giter VIP logo

smart-show's Introduction

试试作者其他的开源库?

模块导航:

代码实现

回到模块导航

如果你对实现感兴趣,请参考我的CSDN博客:

关于作者

回到模块导航

如果您在使用过程中发现任何问题,请联系我,我会立即跟进修复和维护。感谢您的支持!

作者:朱志强

微信:

邮箱:[email protected]

SmartToast部分

回到模块导航

  1. 三种Toast实现策略:系统window + Toast + dialog,根据情况动态择优选择
  2. 合理的复用策略,避免Toast重复弹跳
  3. 解决Android 7.1的系统bug——Toast BadTokenException
  4. 配置Toast风格,如背景颜色,文字大小和颜色等
  5. 完美解决应用关闭通知权限后Toast不显示问题
  6. 适配android 11对toast的相关限制
  7. 自定义toast显示时长
  8. 通过注解快速自定义新的Toast
  9. 结合主流app消息提示的效果,提供info、success、error、warning、complete、forbid、wait、fail 8 种类型的Emotion Toast

引入依赖


implementation "io.github.vincent-series:smart-toast:4.1.7"

API

Kotlin User Document
Java User Document

历史版本

查看历史版本

效果图

classic toast classic toast classic toast
默认背景 配置背景和Icon
Icon居于文本左侧
配置背景和Icon
Icon居于文本右侧

emotion toast emotion toast emotion toast
信息 成功 错误

emotion toast emotion toast emotion toast
警告 等待 禁止

emotion toast emotion toast emotion toast
失败 完成 任意一种都可配置背景,如

SmartSnackBar部分

回到模块导航

SmartSnackBar基于原生Snackbar进行封装改造,不仅使用上更加简易,而且进行了功能扩展:

  1. 支持顶部弹出
  2. 支持指定背景颜色
  3. 支持修改message、actionLabel的文本风格,如字体大小、粗细、颜色
  4. 支持显示icon及指定icon位置

引入依赖


implementation "io.github.vincent-series:smart-snackbar:4.1.2"

//material lib,such as 1.5.0
implementation 'com.google.android.material:material:x.y.z'

API

查看API文档

历史版本

查看历史版本

效果图

bottom snackbar bottom snackbar bottom snackbar
classic风格,默认背景 classic风格,自定义背景 material风格,自定义背景

top snackbar top snackbar top snackbar
classic风格,默认背景 classic风格,自定义背景 material风格,自定义背景

SmartDialog部分

回到模块导航

  1. 解决因activity、fragment生命周期导致的BadTokenException、NullPointException等问题
  2. 通过注解快速自定义Dialog
  3. 提供主流APP中使用的message、input、list、loading等对话框

引入依赖


implementation "io.github.vincent-series:smart-dialog:4.1.4"

API文档

Kotlin User Document
Java User Document

历史版本

查看历史版本

效果图

通知对话框 确认对话框 延时确认对话框
显示一条通知消息,只有确认按钮 确认用户操作 延时启用确认按钮
一般用于提示用户谨慎操作

文本输入对话框 数字输入对话框

点击即选列表对话框 单选列表对话框 多选列表对话框
通过点击列表项完成选择 常规单选列表 常规多选列表

加载对话框 加载对话框 加载对话框
BoxSize.LARGE BoxSize.MIDDLE BoxSize.SMALL

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.