adding some animations at list views

This commit is contained in:
tibbi
2021-03-09 22:50:15 +01:00
parent 08c1ed6244
commit 8e2d42382a
6 changed files with 10 additions and 5 deletions

View File

@@ -124,6 +124,7 @@ class DayFragment : Fragment() {
}.apply { }.apply {
mHolder.day_events.adapter = this mHolder.day_events.adapter = this
} }
mHolder.day_events.scheduleLayoutAnimation()
} }
private fun editEvent(event: Event) { private fun editEvent(event: Event) {

View File

@@ -123,6 +123,7 @@ class EventListFragment : MyFragmentHolder(), RefreshRecyclerViewListener {
mView.calendar_events_list.adapter = this mView.calendar_events_list.adapter = this
} }
mView.calendar_events_list.scheduleLayoutAnimation()
mView.calendar_events_list.endlessScrollListener = object : MyRecyclerView.EndlessScrollListener { mView.calendar_events_list.endlessScrollListener = object : MyRecyclerView.EndlessScrollListener {
override fun updateTop() { override fun updateTop() {
fetchPreviousPeriod() fetchPreviousPeriod()

View File

@@ -150,6 +150,7 @@ class MonthDayFragment : Fragment(), MonthlyCalendar, RefreshRecyclerViewListene
}.apply { }.apply {
month_day_events_list.adapter = this month_day_events_list.adapter = this
} }
month_day_events_list.scheduleLayoutAnimation()
} else { } else {
(currAdapter as EventListAdapter).updateListItems(listItems) (currAdapter as EventListAdapter).updateListItems(listItems)
} }

View File

@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/day_holder" android:id="@+id/day_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingTop="@dimen/medium_margin"> android:paddingTop="@dimen/medium_margin">
<include layout="@layout/top_navigation"/> <include layout="@layout/top_navigation" />
<com.simplemobiletools.commons.views.MyRecyclerView <com.simplemobiletools.commons.views.MyRecyclerView
android:id="@+id/day_events" android:id="@+id/day_events"
@@ -15,6 +14,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@+id/top_value" android:layout_below="@+id/top_value"
android:clipToPadding="false" android:clipToPadding="false"
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager"/> android:layoutAnimation="@anim/layout_animation"
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />
</RelativeLayout> </RelativeLayout>

View File

@@ -10,6 +10,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:clipToPadding="false" android:clipToPadding="false"
android:layoutAnimation="@anim/layout_animation"
android:overScrollMode="never" android:overScrollMode="never"
android:paddingTop="@dimen/medium_margin" android:paddingTop="@dimen/medium_margin"
android:scrollbars="vertical" android:scrollbars="vertical"
@@ -36,8 +37,8 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/calendar_empty_list_placeholder" android:layout_below="@+id/calendar_empty_list_placeholder"
android:background="?attr/selectableItemBackground"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:background="?attr/selectableItemBackground"
android:gravity="center" android:gravity="center"
android:padding="@dimen/activity_margin" android:padding="@dimen/activity_margin"
android:text="@string/create_new_event" android:text="@string/create_new_event"

View File

@@ -63,6 +63,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@+id/month_day_selected_day_label" android:layout_below="@+id/month_day_selected_day_label"
android:clipToPadding="false" android:clipToPadding="false"
android:layoutAnimation="@anim/layout_animation"
android:scrollbars="vertical" android:scrollbars="vertical"
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" /> app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager" />