Add read from page hint

This commit is contained in:
tehcneko committed 2021-03-20 15:48:56 +08:00
1 parent 1cdb0e9fac
commit 3dca2f5eff
3 files changed
+12 -2

No files matched your search

@@ -94,6 +94,8 @@ import com.hippo.ehviewer.client.parser.RateGalleryParser;
import com.hippo.ehviewer.client.parser.VoteTagParser;
import com.hippo.ehviewer.dao.DownloadInfo;
import com.hippo.ehviewer.dao.Filter;
import com.hippo.ehviewer.gallery.EhGalleryProvider;
import com.hippo.ehviewer.gallery.GalleryProvider2;
import com.hippo.ehviewer.ui.CommonOperations;
import com.hippo.ehviewer.ui.GalleryActivity;
import com.hippo.ehviewer.ui.MainActivity;
@@ -178,7 +180,7 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
@Nullable
private TextView mDownload;
@Nullable
private View mRead;
private TextView mRead;
// Below header
@Nullable
private View mBelowHeader;
@@ -521,7 +523,13 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
mOtherActions = (ImageView) ViewUtils.$$(mHeader, R.id.other_actions);
mActionGroup = (ViewGroup) ViewUtils.$$(mHeader, R.id.action_card);
mDownload = (TextView) ViewUtils.$$(mActionGroup, R.id.download);
mRead = ViewUtils.$$(mActionGroup, R.id.read);
mRead = (TextView) ViewUtils.$$(mActionGroup, R.id.read);
GalleryProvider2 galleryProvider = new EhGalleryProvider(requireContext(), mGalleryInfo);
galleryProvider.start();
int startPage = galleryProvider.getStartPage();
if (startPage != 0) {
mRead.setText(getString(R.string.read_from, startPage));
}
mUploader.setOnClickListener(this);
mCategory.setOnClickListener(this);
mOtherActions.setOnClickListener(this);
@@ -749,4 +749,5 @@
<string name="comment_user_uploader">%s (上传者)</string>
<string name="settings_eh_metered_network_warning">流量计费网络警告</string>
<string name="metered_network_warning">正在使用流量计费网络</string>
<string name="read_from">从第 %d 页阅读</string>
</resources>
+1
View File
@@ -813,4 +813,5 @@
<string name="comment_user_uploader">%s (Uploader)</string>
<string name="settings_eh_metered_network_warning">Metered network warning</string>
<string name="metered_network_warning">Connected to metered networks</string>
<string name="read_from">Read page %d</string>
</resources>