xiandanin / loadingbar Goto Github PK
View Code? Open in Web Editor NEW极简使用的解耦Loading组件
极简使用的解耦Loading组件
现在很多app都是用SwipeRefreshLayout
当做loading加载控件,但是缺点就是要在xml中进行定义并去包住要显示内容的Layout,不知道您有没有什么好的方式呢?
我这样获取parent 对吗?
private View mParent;
mParent = inflater.inflate(R.layout.fragment_monitor, null);
懒加载页面方法里LoadingBar.make(mParent).show();
获取数据成功的回调方法里 LoadingBar.cancel(mParent);
然而loadingbar出不来
这是什么问题呢
感谢
Hey, It would be nice if you translate more text to English
5.0似乎也是..
日志重点:
at com.dyhdyh.widget.loading.dialog.LoadingDialog.show(LoadingDialog.java:33)
Caused by: android.view.InflateException: Binary XML file line #41: Error inflating class
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 6: TypedValue{t=0x2/d=0x101009b a=1}
调用代码:
LoadingDialog.make(AppPortableFishPondActivity.this).setMessage("保存中").show();
parent是LinearLayout,parent的父布局,也就是最外层的布局还是linearlayout,loadingbar不显示
dialog的坏处是会遮盖整个屏幕,造成所有操作无响应。
比如网络不好,超时时间是20s,用户必须等待20s,否则无法执行其他操作。或者出错后无法回调,造成dialog永远无法消失。用户必须结束app。
当然可以设置按实体返回键关闭dialog,但是这样会造成重复提交等很多问题
ios上面的loading不会遮住toolbar,只会遮住toolbar以下的页面,即使loading不消失,依然可以点击左上角的返回键。 android上面有办法实现吗?
使用自定义DialogFactory显示不出来?
断点发现好像是使用自定义DialogFactory的时候isValid()方法不通过,
我传的上下文就是activity的,但是显示不出来?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.