kopia lustrzana https://github.com/TeamNewPipe/NewPipe
rodzic
4b4337e078
commit
700c1b4b25
|
@ -151,7 +151,7 @@ class FeedFragment : BaseStateFragment<FeedState>() {
|
||||||
!recyclerView.canScrollVertically(-1)
|
!recyclerView.canScrollVertically(-1)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if (feedBinding.newItemsLoadedLayout.isVisible) {
|
if (feedBinding.newItemsLoadedButton.isVisible) {
|
||||||
hideNewItemsLoaded(true)
|
hideNewItemsLoaded(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -619,8 +619,8 @@ class FeedFragment : BaseStateFragment<FeedState>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showNewItemsLoaded() {
|
private fun showNewItemsLoaded() {
|
||||||
feedBinding.newItemsLoadedLayout.clearAnimation()
|
feedBinding.newItemsLoadedButton.clearAnimation()
|
||||||
feedBinding.newItemsLoadedLayout
|
feedBinding.newItemsLoadedButton
|
||||||
.slideUp(
|
.slideUp(
|
||||||
250L,
|
250L,
|
||||||
delay = 100,
|
delay = 100,
|
||||||
|
@ -636,20 +636,20 @@ class FeedFragment : BaseStateFragment<FeedState>() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun hideNewItemsLoaded(animate: Boolean, delay: Long = 0) {
|
private fun hideNewItemsLoaded(animate: Boolean, delay: Long = 0) {
|
||||||
feedBinding.newItemsLoadedLayout.clearAnimation()
|
feedBinding.newItemsLoadedButton.clearAnimation()
|
||||||
if (animate) {
|
if (animate) {
|
||||||
feedBinding.newItemsLoadedLayout.animate(
|
feedBinding.newItemsLoadedButton.animate(
|
||||||
false,
|
false,
|
||||||
200,
|
200,
|
||||||
delay = delay,
|
delay = delay,
|
||||||
execOnEnd = {
|
execOnEnd = {
|
||||||
// Make the layout invisible so that the onScroll toTop method
|
// Make the layout invisible so that the onScroll toTop method
|
||||||
// only does necessary work
|
// only does necessary work
|
||||||
feedBinding?.newItemsLoadedLayout?.isVisible = false
|
feedBinding?.newItemsLoadedButton?.isVisible = false
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
feedBinding.newItemsLoadedLayout.isVisible = false
|
feedBinding.newItemsLoadedButton.isVisible = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,25 +87,16 @@
|
||||||
|
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<Button
|
||||||
android:id="@+id/new_items_loaded_layout"
|
android:id="@+id/new_items_loaded_button"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignBottom="@id/swipeRefreshLayout"
|
||||||
android:visibility="gone"
|
android:layout_centerHorizontal="true"
|
||||||
tools:visibility="visible">
|
android:layout_marginBottom="5sp"
|
||||||
|
android:text="@string/feed_new_items"
|
||||||
<Button
|
android:textSize="12sp"
|
||||||
android:id="@+id/new_items_loaded_button"
|
android:theme="@style/ServiceColoredButton" />
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/feed_new_items"
|
|
||||||
android:textSize="12sp"
|
|
||||||
android:theme="@style/ServiceColoredButton"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintLeft_toLeftOf="parent"
|
|
||||||
app:layout_constraintRight_toRightOf="parent" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
Ładowanie…
Reference in New Issue