czy1121 / loadinglayout Goto Github PK
View Code? Open in Web Editor NEW简单实用的页面多状态布局(content,loading,empty,error)
License: Apache License 2.0
简单实用的页面多状态布局(content,loading,empty,error)
License: Apache License 2.0
如果想自定义加载动画 只能先自定义loadingLayout ,然后在页面中加载一个gif图片吗?
还能不能使用animation-list 帧动画来实现动画效果 ??
看了源码发现你将布局中子View全部移除掉了?
错误日志:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.newseax.user, PID: 4818
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.unFocus(android.view.View)' on a null object reference
at android.view.ViewGroup.removeViewInternal(ViewGroup.java:5262)
at android.view.ViewGroup.removeViewAt(ViewGroup.java:5225)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1762)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1819)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2590)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2377)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2332)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2239)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:700)
at android.os.Handler.handleCallback(Handler.java:808)
at android.os.Handler.dispatchMessage(Handler.java:101)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7406)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:926)
非常诡异,暂时还没找到什么原因报错,大佬能分析下吗?
不能嵌套webview吗?
我放在BaseActivity里面wrap的话就报错
主界面是ViewPager和Fragment,在fragment里面使用warp(this)是一片空白
我在viewpager中的fragment里面用的wrap(View view)方法,我的fragment布局就swiperefreshlayout包裹一个recycleView,然后我在onCreateView里面将recycleView传入了wrap(View view)里面,最后return了swiperefreshlayout,但是页面什么也没有显示,就只有swiperefreshlayout的效果
不知道为什么,showError之前要先设置icon,不然会报错,要是再加个showXXX,服务器开小差了就好
考虑到需要对自定义布局中的某些控件设置监听,改变样式之类的,希望官方能够提供该方法
如果有的页面需要显示无数据的效果不同,好像这个loadingLayout只能全局设置效果,每个页面的显示效果都是一样的
感觉少了设置图片大小的功能,还需要自己重新写!!还好可以参考源码做修改!
老是显示loading布局。
对于fragment 不要直接替换他的child 会导致新的view高度为0 所以加一层在下面那层作怪~
···
<LinearLayout
android:id="@+id/ll_root"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
//多加里一层framelayout
LoadingLayout.wrap(llRoot)
···
希望添加这个方法 或者 开放出来,setContent 可以动态添加内容布局
在XML中包裹内容后,使用butterknife注解偶然的会出现
LoadingLayout.if()' on a null object reference这个错误
LoadingLayout.if()' on a null object reference
loadinglayout 是被垂直的 LinearLayout 包裹
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.