xiaokun19931126 / Loadingview
loadview and tipview.加载框和提示框。
Stars: ✭ 129
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Loadingview
Bulma Toast
Bulma's pure JavaScript extension to display toasts
Stars: ✭ 93 (-27.91%)
Mutual labels: toast
Livesmashbar
An elegant looking and easy to use informative library with LiveData integration for Android.
Stars: ✭ 107 (-17.05%)
Mutual labels: toast
Vuetify Toast Snackbar
Basic Vue toast service that uses Vuetify Snackbar component.
Stars: ✭ 123 (-4.65%)
Mutual labels: toast
Jjhud
JJHUD is an displays a translucent HUD with an indicator and/or labels .
Stars: ✭ 94 (-27.13%)
Mutual labels: toast
Desktoptoast
A library for toast notifications from desktop app
Stars: ✭ 105 (-18.6%)
Mutual labels: toast
Nativescript Feedback
📢 Non-blocking textual feedback for your NativeScript app
Stars: ✭ 127 (-1.55%)
Mutual labels: toast
V Dialogs
A simple and clean instructional dialog plugin for Vue2, dialog type including Modal, Alert, Mask and Toast
Stars: ✭ 121 (-6.2%)
Mutual labels: toast
Android Appmsg
In-layout notifications. Based on Toast notifications and article by Cyril Mottier (http://android.cyrilmottier.com/?p=773).
Stars: ✭ 1,384 (+972.87%)
Mutual labels: toast
React Native Styled Toast
A theme friendly, easy to use react-native toast component built using styled-components and styled-system.
Stars: ✭ 119 (-7.75%)
Mutual labels: toast
Opensource
♨️ 分享GitHub优秀开源项目和主流开发使用的网站、解决问题方案收集以及学习网站或资料,涵盖了iOS, macOS X, Blockchain, Flutter, Weex, H5, Games, C++, Script等多方面的内容,其中iOS大致包涵以下内容:音视频;IM和直播;逆向开发;图像相关(OpenGL, Metal, GPUImage);内购(IAP), ApplePay和第三方支付;安全攻防和应用加固, 数据安全和算法;常用第三方库;导航栏和状态栏;侧边菜单;数据持久;蓝牙, 手势指纹面容ID解锁, 图片浏览器, 扫码, 下拉和上拉刷新, 指示器, Toast, Menu, Sensor, Privacy, WebView和进度条, 动画, 选择器, 搜索, 分享, 图片验证码, 设备相关信息, 广告, 高仿项目及Demo等。
Stars: ✭ 123 (-4.65%)
Mutual labels: toast
Floatingtoast
Android library to create customizable floating animated toasts like in Clash Royale app
Stars: ✭ 86 (-33.33%)
Mutual labels: toast
Awaittoast
🍞 An async waiting toast with basic toast. Inspired by facebook posting toast
Stars: ✭ 129 (+0%)
Mutual labels: toast
Vue Toastify
🔥 Simple, extendable, dependency free notification plugin. 🔥
Stars: ✭ 126 (-2.33%)
Mutual labels: toast
Toast
A Bootstrap 4.2+ jQuery plugin for the toast component
Stars: ✭ 121 (-6.2%)
Mutual labels: toast
LoadingView
耗时加载框和提示框。
图片展示:
展示1:耗时加载框
代码:
tipLoadDialog = new TipLoadDialog(this);
//默认是无阴影主题
tipLoadDialog.setMsgAndType(LOADING_玩命, TipLoadDialog.ICON_TYPE_LOADING).show();
展示2:耗时加载框,样式2
代码:
//设置另一种loading文字动画,注意不要加后缀...
tipLoadDialog.setNoShadowTheme()
.setMsgAndType("加载中", TipLoadDialog.ICON_TYPE_LOADING2)
.show();
展示3:tip提示框 1s后自动消失
代码:
//设置无阴影主题
tipLoadDialog.setNoShadowTheme().setMsgAndType(sucTip, TipLoadDialog.ICON_TYPE_SUCCESS).show();
展示4:阴影主题
代码:
//设置提示框阴影主题
tipLoadDialog.setShadowTheme().setMsgAndType(sucTip, TipLoadDialog.ICON_TYPE_SUCCESS).show();
展示5:设置圆角
代码:
//设置圆角
tipLoadDialog.setBackground(R.drawable.custom_dialog_bg_corner)
.setNoShadowTheme()
.setMsgAndType(LOADING_玩命, TipLoadDialog.ICON_TYPE_LOADING)
.show();
展示6:设置icon
代码:
//设置除了Loading之外的tip图标
tipLoadDialog.setSuccessIcon(R.mipmap.custom_tip)
.setMsgAndType(sucTip, TipLoadDialog.ICON_TYPE_SUCCESS)
.show();
展示7:设置背景颜色
代码:
//设置背景颜色
tipLoadDialog.setBackground(R.drawable.custom_dialog_bg_color)
.setNoShadowTheme()
.setMsgAndType(sucTip, TipLoadDialog.ICON_TYPE_SUCCESS)
.show();
展示8:设置提示文字颜色和大小
代码:
//设置提示信息的text的颜色和大小
tipLoadDialog.setNoShadowTheme()
.setMsgColor(Color.BLUE)
.setMsgSize(20)
.setMsgAndType(failTip, TipLoadDialog.ICON_TYPE_FAIL)
.show();
展示9:设置加载框文字颜色和大小,以及progressbar颜色
代码:
//设置加载框文字的颜色和大小 以及progressbar的颜色
tipLoadDialog.setNoShadowTheme()
.setProgressbarColor(Color.RED)
.setLoadingTextColor(Color.RED)
.setLoadingTextSize(20)
.setMsgAndType(LOADING_玩命, TipLoadDialog.ICON_TYPE_LOADING)
.show();
展示10:设置加载一次文字动画时间
代码:
//设置loadingText一次动画的时间
tipLoadDialog.setNoShadowTheme()
.setProgressbarColor(Color.WHITE)
.setLoadingTextColor(Color.WHITE)
.setLoadingTextSize(15)
.setLoadingTime(10000)
.setMsgAndType(LOADING_玩命, TipLoadDialog.ICON_TYPE_LOADING)
.show();
展示11:弹窗消失事件监听
代码:(比如用在登陆成功跳转页面时候调用)
//弹窗消失事件监听
tipLoadDialog.setNoShadowTheme()
.setMsgAndType("登录成功", TipLoadDialog.ICON_TYPE_SUCCESS)
.setDismissListener(new TipLoadDialog.DismissListener()
{
@Override
public void onDimissListener()
{
startActivity(new Intent(DialogTipActivity.this, HomeActivity.class));
//然后可以finish掉当前登录页
}
})
.show();
展示12:设置tip弹窗时间
代码:
//设置tip提示弹框时间
tipLoadDialog.setNoShadowTheme()
.setMsgAndType("停留2秒消失", TipLoadDialog.ICON_TYPE_SUCCESS)
.setTipTime(2000)
.show();
两种实现模式:
一、采用Dialog模式实现:
缺点:必须得依赖Activity页面,所以很难用单例模式来生成,因为会造成内存泄漏。
优点:dialog本来就是为这个而生的,比较简单。
二、采用Toast模式实现:
缺点:无法像dialog一样能获取焦点,屏蔽其他控件事件。(比如正在加载网络请求时,页面其他控件是不能点击
的,但是toast无法屏蔽事件)
优点:不依赖Activity,只需要Application即可。
duration时间问题。因为toast时间系统设置为固定的2秒和3.5秒。
使用toast需要解决两个问题:
①当duration不是2或者3.5秒时,怎么解决;
②当duration不确定时,怎么解决,比如正在进行网络请求;
解决方案:主要是利用了CountDownTimer类。Android自带的倒计时控件。
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].