Don’t know what’s the use of loading pages
The cause of
One day Design picked up a GIF
Github.com/frakbot/Jum…
How to use
It is also very easy to use in XML:
<com.wang.bookloading.widget.BookLoadingView
android:id="@+id/book_loading_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:blv_tickColor="@color/light_green500"
app:blv_tickStrokeWidth="4dp"
app:blv_lineColor="@color/grey500"
app:blv_lineStrokeWidth="8dp">
</com.wang.bookloading.widget.BookLoadingView>
Copy the code
In Java, just:
@OnClick(R.id.show_btn)
public void onMShowBtnClicked() {
//start loading
mBookLoadingView.setVisibility(View.VISIBLE, 0);
}
@OnClick(R.id.hide_btn)
public void onMHideBtnClicked() {
//stop loading
mBookLoadingView.setVisibility(View.GONE);
}
Copy the code
name | format | description |
---|---|---|
blv_delay | integer | A delay in the start of an animation |
blv_firstDuration | integer | Path animation time |
blv_textDuration | integer | Text animation time |
blv_pageDuration | integer | The time of the page turn animation |
blv_startColor | color | The color at the beginning and end of the page being turned |
blv_endColor | color | The color of the middle of the page when it is turned |
blv_tickColor | color | The square root on the left |
blv_tickStrokeWidth | dimension | The square root on the left |
blv_lines | float | Right-hand line book |
blv_lineColor | color | Color of the right line |
blv_lineStrokeWidth | dimension | The thickness of the line on the right |
blv_linePadding | dimension | The spacing of the right line |
blv_textSize | dimension | Bottom text size |
blv_textColor | color | Bottom text color |
blv_text | string | Bottom text content |
TODO
- Modify the bottom text animation (the existing idea is that a text is a view, and then animate it. But personally it feels stupid. Have a good idea to issue to me. thanks)
- When turning pages, the thickness of the page is increased
- Width customization