Merge branch 'discover_info' into 'master'
Add text to bottom of discover Closes #262 See merge request pixeldroid/PixelDroid!340
This commit is contained in:
commit
c058370214
@ -86,6 +86,7 @@ class SearchDiscoverFragment : BaseFragment() {
|
||||
try {
|
||||
val discoverPosts = api.discover()
|
||||
adapter.addPosts(discoverPosts.posts)
|
||||
binding.discoverNoInfiniteLoad.visibility = View.VISIBLE
|
||||
showError(show = false)
|
||||
} catch (exception: IOException) {
|
||||
showError()
|
||||
|
@ -39,7 +39,9 @@
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout
|
||||
android:id="@+id/motionLayout"
|
||||
android:layout_width="match_parent"
|
||||
@ -68,9 +70,21 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/discoverText" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/discoverNoInfiniteLoad"
|
||||
android:visibility="invisible"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="50dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/discover_no_infinite_load"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/motionLayout"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -190,6 +190,7 @@ For more info about Pixelfed, you can check here: https://pixelfed.org"</string>
|
||||
<string name="profile_picture">Profile picture</string>
|
||||
<string name="open_drawer_menu">Open drawer menu</string>
|
||||
<string name="discover">DISCOVER</string>
|
||||
<string name="discover_no_infinite_load">Discover doesn\'t load infinitely. Pull to refresh for other images.</string>
|
||||
<string name="something_went_wrong">Something went wrong…</string>
|
||||
<string name="panda_pull_to_refresh_to_try_again">This panda is not happy. Pull to refresh to try again.</string>
|
||||
<string name="delete">Delete</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user