[Android][Github][Open Source] RecyclerView - AnimatedRecyclerView
2019. 3. 16. 00:59ㆍPrograming/Android Open Source
https://github.com/MLSDev/AnimatedRecyclerView
Setup
To use this library your minSdkVersion
must be >= 16.
In your build.gradle :
dependencies {
implementation "com.mlsdev.animatedrv:library:1.0.1"
}
Example
From the layout
<com.mlsdev.animatedrv.AnimatedRecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:animationDuration="600"
app:layoutAnimation="@anim/layout_animation_from_bottom"
app:layoutManagerOrientation="vertical"
app:layoutManagerReverse="false"
app:layoutManagerType="linear" />
You can create any layout animations
<layoutAnimation xmlns:android="http://schemas.android.com/apk/res/android"
android:animation="@anim/item_animation_from_bottom"
android:animationOrder="normal"
android:delay="15%" />
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="500">
<translate
android:fromYDelta="50%p"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:toYDelta="0" />
<alpha
android:fromAlpha="0"
android:interpolator="@android:anim/accelerate_decelerate_interpolator"
android:toAlpha="1" />
</set>
From the code
AnimatedRecyclerView recyclerView = new AnimatedRecyclerView.Builder(this)
.orientation(LinearLayoutManager.VERTICAL)
.layoutManagerType(AnimatedRecyclerView.LayoutManagerType.LINEAR)
.animation(R.anim.layout_animation_from_bottom)
.animationDuration(600)
.reverse(false)
.build();
Start animation
- First option
adapter.notifyDataSetChanged();
recyclerView.scheduleLayoutAnimation();
- Second option Your
RecyclerView
must be casted to theAnimatedRecyclerView
and an adapter must be set.
recyclerView.notifyDataSetChanged();
Authors
- Sergey Petrosyuk, MLSDev
About MLSDev
AnimatedRecyclerView is maintained by MLSDev, Inc. We specialize in providing all-in-one solution in mobile and web development. Our team follows Lean principles and works according to agile methodologies to deliver the best results reducing the budget for development and its timeline.
Find out more here and don't hesitate to contact us!
'Programing > Android Open Source' 카테고리의 다른 글
[Android][Github][Open Source] ProgressBar - AVLoadingIndicatorView (0) | 2019.03.18 |
---|---|
[Android][Github][Open Source] Layout - FoldableLayout (0) | 2019.03.16 |
Google Android Volley HTTP Library (0) | 2017.07.19 |
Android Volley Tutorial – Making HTTP GET, POST, PUT (0) | 2017.07.17 |
[구글 오픈 소스] 깃허브에서 인기 높은 구글의 오픈소스 프로젝트 10종 (0) | 2015.11.18 |