All Projects → o0o0oo00 → Pudding

o0o0oo00 / Pudding

Licence: mit
🌟 Pudding use WindowManager(don't need request permission) to pull down a view that are displayed on top their attached window

Programming Languages

kotlin
9241 projects
dsl
153 projects

Projects that are alternatives of or similar to Pudding

BalloonPopup
Forget Android Toast! BalloonPopup displays a round or squared popup and attaches it to a View, like a callout. Uses the Builder pattern for maximum ease. The popup can automatically hide and can persist when the value is updated.
Stars: ✭ 32 (-91.37%)
Mutual labels:  alert, toast, android-ui
RxLoading
RxJava library for showing a loading (i.e. progress bar) state while waiting for async data with minimal effort and advanced options.
Stars: ✭ 49 (-86.79%)
Mutual labels:  custom-view, android-ui
BTPS-SecPack
This repository contains a collection of PowerShell tools that can be utilized to protect and defend an environment based on the recommendations of multiple cyber security researchers at Microsoft. These tools were created with a small to medium size enterprise environment in mind as smaller organizations do not always have the type of funding a…
Stars: ✭ 33 (-91.11%)
Mutual labels:  alert, alerting
android-tableview-kotlin
Android's missing TableView component.
Stars: ✭ 40 (-89.22%)
Mutual labels:  custom-view, android-ui
YuanaItemSettingView
Customizable Item Setting View Android
Stars: ✭ 15 (-95.96%)
Mutual labels:  custom-view, android-ui
Image-Support
Add badge with counter to ImageView Android.
Stars: ✭ 128 (-65.5%)
Mutual labels:  custom-view, android-ui
iakit
无依赖 mini 组件库,只封装了 alert, toast, loading, actionSheet 等使用频率较高的组件。适用于类似 H5 活动页的简单移动端项目,不必为了使用这些组件而引入一个大而全的 UI 库和框架。
Stars: ✭ 38 (-89.76%)
Mutual labels:  alert, toast
xxy
xxy xxy.js alert 移动端弹窗 弹窗 上拉加载 下拉刷新 移动端UI 轮播 banner
Stars: ✭ 84 (-77.36%)
Mutual labels:  alert, toast
PassCodeText
A customised EditText view serving the purpose of taking numeric One Time Password from a user. With stunning animation, and high customizability.
Stars: ✭ 105 (-71.7%)
Mutual labels:  custom-view, jitpack
WaveView
Simple Android library to draw sinusoidal waves.
Stars: ✭ 43 (-88.41%)
Mutual labels:  custom-view, android-ui
signal-strength-view
📶 Material design signal strength view for Android
Stars: ✭ 30 (-91.91%)
Mutual labels:  custom-view, android-ui
PaymentCardView
Custom Credit/Debit card view
Stars: ✭ 62 (-83.29%)
Mutual labels:  jitpack, android-ui
snmp notifier
A webhook to relay Prometheus alerts as SNMP traps, because sometimes, you have to deal with legacy
Stars: ✭ 33 (-91.11%)
Mutual labels:  alert, alerting
RTL-Toast
Android Toast For RTL Applications
Stars: ✭ 16 (-95.69%)
Mutual labels:  toast, android-ui
MaterialDesign-Toast
Custom android Toast with Material Design
Stars: ✭ 70 (-81.13%)
Mutual labels:  toast, android-ui
mCustomView
总结了博主这么多年所写的自定义view,以及自定义view的教程
Stars: ✭ 17 (-95.42%)
Mutual labels:  custom-view, android-ui
slackcat
A simple way of sending messages from the CLI output to your Slack with webhook.
Stars: ✭ 102 (-72.51%)
Mutual labels:  alert, alerting
vue2-dialog
A mobile Vue plugin for VueDialog
Stars: ✭ 21 (-94.34%)
Mutual labels:  alert, toast
JDToaster
🍞 Toasty iOS alerts
Stars: ✭ 25 (-93.26%)
Mutual labels:  alert, toast
Razor.SweetAlert2
A Razor class library for interacting with SweetAlert2
Stars: ✭ 98 (-73.58%)
Mutual labels:  alert, toast

Pudding

代替Toast/SnackBar新方式,使用WindowManager 无需申请权限

WIKI

中文说明

Usage

allprojects {
    repositories {
    ...
     maven { url 'https://jitpack.io' }
   implementation 'com.github.o0o0oo00:Pudding:1.2.1'

GIF可能要等会就顺畅了,一开始可能会比较迟钝 (●゚ω゚●)

常见的可配置的几种形式

Common configurable Pudding

Pudding.create(this) {
    setTitle("This is Title")
    setText("this is text")
}.show()
Pudding.create(this) {
    setChocoBackgroundColor(resources.getColor(R.color.colorAccent))
    setTitleTypeface(Typeface.DEFAULT_BOLD)
}.show()
Pudding.create(this) {
    setTitle("Choco Title")
    setText("this is text")
    setIcon(R.drawable.ic_event_available_black_24dp)
}.show()
Pudding.create(this) {
    setTitle("Choco Title")
    setText("This is Text , it's very short and I don't like short \n This is Text , it's very short and I don't like short")
    onShow {
        Toast.makeText(this@MainActivity, "onShowListener", Toast.LENGTH_SHORT).show()
    }
    onDismiss {
        Toast.makeText(this@MainActivity, "onDismissListener", Toast.LENGTH_SHORT).show()
    }
}.show()

配合FancyDialog可实现Pudding显示在Dialog的阴影之上

With FancyDialog, Pudding can be displayed above the shadow of Dialog.

每个Activity拥有各自的Pudding,互相之间不影响

Each Activity has its own Pudding, which does not affect each other.

*Imitate Alerter and ☆⌒(^-゜)v THX!! a lot

what's different

Use activity decorView we can show a view on top of Activity。but when dialog is showing , its black background will cover the view , that is not cool. so i create this repository to solve this problem , and I hope it's useful to you

Something new

  • Use DSL style to config Choco
  • Show Queue
  • Cover Dialog/PopWindow
  • Don't need to request permission

TODO

  1. 两种addView方式

    • [x] activity decorView
    • [x] windowManager
      • [x] 动画显示
      • [x] 生命周期控制
      • [x] 有权限/无权限情况 (考虑到这个需求不是很大,而且每个项目的权限适配都不一致,而且国产手机权限这一块参差不齐,所以决定不做这一块了,对功能也没影响)
      • [x] 各个版本的适配
  2. 内部显示队列(考虑可以使用kotlin通道来实现)

    • [x] 上一条未消失时,后来一条等待
    • [x] 直接顶掉上一条,上一条渐变消失
  3. 左右/上下滑动消失动画

    • [x] 上下消失
    • [x] 左右滑动消失
  4. Pudding cover dialog

可能会有的疑问:

  • [x] Pudding使用的是WindowManager 难道不需要申请权限吗?

    • [x] Pudding使用WindowManager.LayoutParams.TYPE_APPLICATION_SUB_PANEL的层级低于系统级层级TYPE_SYSTEM_ALERT也就是在2000之下,是不需要申请权限的。
  • [x] 不同的Activity对应的WindowManager是否相同

    • [x] 不同的window,不同的WindowManager,相同的WindowManagerGlobal(最终实现view的添加、删除、更新)
  • [x] 不同的WindowManager为什么可以移除对方的View

    • [x] 因为所有的Activity共同只有一个WindowManagerGlobal(其内部持有所有添加的View的集合引用)
  • [X] 如何去维护一个Pudding队列

    • [x] 用一个Map<string,pudding>
    • [X] 什么时间 去clear这个map (●゚ω゚●)挠头? when activity destory clean the key which is activity toString()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].