barryhappy / temptyview Goto Github PK
View Code? Open in Web Editor NEWJust a Wheel——A easy way to setEmptyView to ListView、GridView or RecyclerView etc..
Just a Wheel——A easy way to setEmptyView to ListView、GridView or RecyclerView etc..
Not Working !
1.有的布局不显示问题
2.这项目还维护嘛?
我沿用了你的思路,但如果给emptyView设置了ConstraintLayout.LayoutParams之后,在使用ConstraintLayout.removeView(emptyView)时,会有一个问题,emptyView消失,但RecyclerView的内容没有立即显示,需要手动拖动下才会显示出来。但如果你不给emptyView设置Constraint.LayoutParams则没有问题。
I've tried a bunch of different icons including the preset ones and still it shows only text !?
TViewUtil.EmptyViewBuilder.getInstance(this)
.setEmptyText(R.string.emptylist)
.setEmptyTextSize(18)
.setEmptyTextColor(Color.GRAY)
.setIconSrc(R.drawable.box)
.bindView(recyclerView);
}
my activity xml
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:padding="5dp"
android:layout_below="@id/toolbar"
android:layout_above="@id/ad_bar"
android:scrollbars="vertical"/>
</RelativeLayout>
试了好几次
if i want change empty text later , how ?
比如网络点击,点击重新获取数据等。
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.