Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanhua committed Aug 3, 2017
1 parent 43f882c commit b41a741
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

a library provide a easy way to show skeleton loading view like facebook and alipay

# Overview
# Preview


![img](screenshots/001.gif)
![img](https://github.com/sharish/ShimmerRecyclerView/raw/master/screenshots/list_demo.gif)
![img](screenshots/002.gif)
![img](screenshots/003.gif)
![img](screenshots/004.gif)
Expand All @@ -16,6 +16,11 @@ you can scan the qrcode for download demo apk

![](screenshots/qrcode.png)

# Feature
- Light
- Noninvasive,You don't need to make changes to existing code.
- Wide applicability,It is available for all views

# Getting started

In your build.gradle:
Expand All @@ -24,10 +29,7 @@ In your build.gradle:
compile 'com.ethanhua:skeleton:0.2.0'
}

# Feature
- Light
- No invasive,You don't need to make changes to existing code.
- Wide applicability,It is available for all views

# Usage
for recyclerview:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ private void init() {
final SkeletonScreen skeletonScreen = Skeleton.bind(recyclerView)
.adapter(adapter)
.load(R.layout.item_skeleton_news)
.count(10)
.show();
.show(); //default count is 10
recyclerView.postDelayed(new Runnable() {
@Override
public void run() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,7 @@ protected void onCreate(Bundle savedInstanceState) {
View rootView = findViewById(R.id.rootView);
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
TopicAdapter adapter = new TopicAdapter();
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false) {
@Override
public boolean canScrollVertically() {
return false;
}
};
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false);
recyclerView.setLayoutManager(linearLayoutManager);
recyclerView.setAdapter(adapter);
if (TYPE_VIEW.equals(mType)) {
Expand Down
4 changes: 2 additions & 2 deletions sample/src/main/res/layout/activity_view.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http:https://schemas.android.com/apk/res/android"
<android.support.v4.widget.NestedScrollView xmlns:android="http:https://schemas.android.com/apk/res/android"
xmlns:app="http:https://schemas.android.com/apk/res-auto"
xmlns:tools="http:https://schemas.android.com/tools"
android:layout_width="match_parent"
Expand Down Expand Up @@ -99,4 +99,4 @@


</LinearLayout>
</ScrollView>
</android.support.v4.widget.NestedScrollView>

0 comments on commit b41a741

Please sign in to comment.