jakubkinst / android-statefullayout Goto Github PK
View Code? Open in Web Editor NEWA custom Android ViewGroup to display different states of screen (CONTENT, PROGRESS, OFFLINE, EMPTY, etc.)
A custom Android ViewGroup to display different states of screen (CONTENT, PROGRESS, OFFLINE, EMPTY, etc.)
If you don't create at all a reference of the StatefulLayout on your activity but just specify the layout in your xml then you receive a crash on the onSavedInstanceState where is trying to access the value of the state. A null check should be nice to have.
setOfflineRetryText
and app:offlineRetryText
had a bug,it set to offlineText...
我一个viewpager,有4个fragment,每个fragment都是用同一个布局文件,都含有StatefulLayout,现在出现一个情况,比如我4个fragment都有一个网络访问,我全部滑过了(PagerAdapter里的destroyItem我注释了,所以不会销毁掉),然后这时4个fragment中,调用了showOffline,发现只有当前页跟上一页才会正常显示offlineView,而其他的fragment不会显示,直接变成空白页了。。。
app:offlineRetryText无效
因为
// setState custom offline retry text if(a.hasValue(R.styleable.SflStatefulLayout_offlineRetryText)) { setOfflineText(a.getString(R.styleable.SflStatefulLayout_offlineRetryText)); }
希望能够增加SimpleStatefulLayout中retry button的style的api
It would be great if there a swipeToRefresh in error or empty view
as the title says, how to make transition between state (empty to content) to fade in and fade out in StatefulLayout, not in SimpleStatefulLayout...
Hey, I probbably found an issue.
When I set empty view visible, then wrapping SwipeRefreshLayout's indicator is not visible, but it's actually triggers refresh. There is visible indicator leaving animation, but not progress animation.
Layouts hierarchy:
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/refresh_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<cz.kinst.jakub.view.StatefulLayout
android:id="@+id/state_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:progressLayout="@layout/view_progress"
>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:listitem="@layout/item_conversation"
/>
</cz.kinst.jakub.view.StatefulLayout>
</android.support.v4.widget.SwipeRefreshLayout>
Any idea?
lyState.getEmptyView().setOnClickListener(new View.OnClickListener() {
@OverRide
public void onClick(View v) {
}
});
When I use showContent
without using showProgress
, nothing is shown.
Well, I think this is not a bug, you can solve with adding showProgress
But I'll let you know just in case.
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.