Support manually refresh page

This commit is contained in:
tarsin committed 2023-01-31 10:01:28 +08:00
1 parent fa2cbbb0cc
commit 2f3b6df529
2 files changed
+21

No files matched your search

@@ -23,6 +23,7 @@ class ReaderPageSheet(
binding.copy.setOnClickListener { copy() }
binding.save.setOnClickListener { save() }
binding.saveTo.setOnClickListener { saveTo() }
binding.refresh.setOnClickListener { refresh() }
return binding.root
}
@@ -58,4 +59,9 @@ class ReaderPageSheet(
activity.saveImageTo(page.index)
dismiss()
}
private fun refresh() {
activity.mGalleryProvider?.retryPage(page)
dismiss()
}
}
@@ -5,6 +5,21 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/refresh"
android:layout_width="match_parent"
android:layout_height="56dp"
android:drawablePadding="32dp"
android:gravity="center_vertical"
android:clickable="true"
android:focusable="true"
android:paddingHorizontal="16dp"
android:foreground="?attr/selectableItemBackground"
android:text="@string/refresh"
android:textColor="?attr/colorOnBackground"
app:drawableStartCompat="@drawable/v_refresh_dark_x24"
app:drawableTint="?attr/colorOnBackground" />
<TextView
android:id="@+id/share"
android:layout_width="match_parent"