mirror of
https://github.com/seven332/EhViewer
synced 2026-11-28 01:58:06 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d86dd3bc06 | ||
|
|
49f420c1eb | ||
|
|
c9103caad8 | ||
|
|
ee0ffc48d2 | ||
|
|
ed7eba7ef4 | ||
|
|
b6a16d1d58 | ||
|
|
04521dfeb6 | ||
|
|
d00f6e6cc6 | ||
|
|
7a47b2504d | ||
|
|
2da10a5855 | ||
|
|
323b36c58a | ||
|
|
9834d45ca9 | ||
|
|
c058bb01f0 | ||
|
|
f578c6cb8b | ||
|
|
2c43589c1c | ||
|
|
6e73f03c19 | ||
|
|
b7e2c5bce1 | ||
|
|
9707ac470a | ||
|
|
06fd28290c | ||
|
|
21ef5897ef | ||
|
|
bdd45b5f10 | ||
|
|
e68d4ad2c4 | ||
|
|
2e56ba4ed0 |
No files matched your search
@@ -1,30 +0,0 @@
|
||||
感谢您提交 Issue,请在提交前仔细阅读以下信息。
|
||||
|
||||
请在阅读完毕后,删除这些文字,并写下对该 Issue 的描述。
|
||||
|
||||
若您能熟练使用现代标准汉语,请务必使用该语言描述 Issue。
|
||||
|
||||
Issue 的内容仅可为
|
||||
* Bug 反馈
|
||||
* 功能申请
|
||||
|
||||
若您希望得到使用指导(譬如如何删除快速搜索),请至 [G+ 社区](https://plus.google.com/u/1/communities/103823982034655188459) 发贴。若有其他问题,可在应用内找到开发者的邮箱地址,使用电子邮件与开发者交流。
|
||||
|
||||
若内容为 Bug 反馈,请先查看 [release 页面](https://github.com/seven332/EhViewer/releases),以帮助确认该 bug 是否存在于最新版中;同时应详细描述 bug 内容与重现方法,必要时可附加截图,但请确定截图符合风序良俗。
|
||||
|
||||
功能申请包括添加新功能与改进现有功能。
|
||||
|
||||
一个 Issue 只包含一个 Bug 反馈或者功能申请。若有多个需求,请提交多个 Issue。
|
||||
|
||||
尽量不提交重复的 Issue,可先进行搜索。对于重复的 Issue,开发者可能会直接关闭并添加 Duplicate 标签。
|
||||
|
||||
|
||||
Thank you for taking the time to submit an issue. Before you proceed, please consider the following.
|
||||
|
||||
An issue can only be about:
|
||||
* Bug Report
|
||||
* Feature Request
|
||||
|
||||
If you need application instructions, please post your question in [G+ community](https://plus.google.com/u/1/communities/103823982034655188459). If you have other questions, please get the developer's email address in the application, and send him/her an email.
|
||||
|
||||
One issue one bug report or feature request.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: 功能申请 / Feature request
|
||||
about: 有个想法 / Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**这个功能是用来解决问题的吗? / Is your feature request related to a problem? Please describe.**
|
||||
描述这个问题。
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**描述你想要的解决方法 / Describe the solution you'd like**
|
||||
描述应通过何种行为来解决这个问题。
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**备注 / Additional context**
|
||||
还有别的想说的吗?
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
name: Bug 反馈 / Bug report
|
||||
about: 出问题了 / Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**简略描述 / Describe the bug**
|
||||
大概说下是什么问题。
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**如何重现 / To Reproduce**
|
||||
重现的步骤:
|
||||
1. 打开什么什么
|
||||
2. 点击什么什么
|
||||
3. 出现什么什么问题
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**预期行为 / Expected behavior**
|
||||
应该是什么样子的?
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**截图 / Screenshots**
|
||||
能截图的话就发截图,请注意风序良俗。
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**设备型号与 Android 版本 / Device model and Android version**
|
||||
- 设备型号:【比如 Pixel 6 XXXL】
|
||||
- Android 版本:【比如 Android 12.1】
|
||||
- Device model: [e.g. Pixel 6 XXXL]
|
||||
- Android version: [e.g. Android 12.1]
|
||||
|
||||
**备注 / Additional context**
|
||||
还有什么想说的?
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
name: Sad Panda / 下载太慢 / Slow download speed
|
||||
about: 所有其他问题 / All other questions
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
加入我们的 Telegram 群组,[https://t.me/ehviewer](https://t.me/ehviewer)。温柔[大小]姐姐手把手帮你解决问题。
|
||||
Join our Telegram group, [https://t.me/ehviewer](https://t.me/ehviewer). Administrators will help you solve the problem.
|
||||
+2
-2
@@ -12,8 +12,8 @@ android {
|
||||
applicationId "com.hippo.ehviewer"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 28
|
||||
versionCode 102
|
||||
versionName "1.7.1"
|
||||
versionCode 103
|
||||
versionName "1.7.2"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
resConfigs "zh", "zh-rCN", "zh-rHK", "zh-rTW",
|
||||
"es", "ja", "ko", "fr", "de", "th"
|
||||
|
||||
@@ -39,6 +39,8 @@
|
||||
android:largeHeap="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config">
|
||||
|
||||
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
|
||||
|
||||
<meta-data android:name="android.max_aspect" android:value="2.1"/>
|
||||
|
||||
<activity
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Hippo Seven
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.hippo.drawable;
|
||||
|
||||
/*
|
||||
* Created by Hippo on 2017/9/6.
|
||||
*/
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import androidx.annotation.IntRange;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public class TextDrawable extends Drawable {
|
||||
|
||||
private static final float STANDARD_TEXT_SIZE = 1000.0f;
|
||||
private static final Paint STANDARD_PAINT = new Paint();
|
||||
|
||||
static {
|
||||
STANDARD_PAINT.setTextSize(STANDARD_TEXT_SIZE);
|
||||
}
|
||||
|
||||
private String text;
|
||||
private float contentPercent;
|
||||
|
||||
private Paint backgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private Paint textPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
|
||||
private int textColor = Color.BLACK;
|
||||
private int backgroundColor = Color.BLACK;
|
||||
|
||||
private float x = 0.0f;
|
||||
private float y = 0.0f;
|
||||
private boolean textSizeDirty = false;
|
||||
private Rect textBounds = new Rect();
|
||||
|
||||
public TextDrawable(String text, float contentPercent) {
|
||||
this.text = text;
|
||||
this.contentPercent = contentPercent;
|
||||
STANDARD_PAINT.getTextBounds(text, 0, text.length(), textBounds);
|
||||
}
|
||||
|
||||
public int getTextColor() {
|
||||
return textColor;
|
||||
}
|
||||
|
||||
public void setTextColor(int textColor) {
|
||||
if (this.textColor != textColor) {
|
||||
this.textColor = textColor;
|
||||
invalidateSelf();
|
||||
}
|
||||
}
|
||||
|
||||
public int getBackgroundColor() {
|
||||
return backgroundColor;
|
||||
}
|
||||
|
||||
public void setBackgroundColor(int backgroundColor) {
|
||||
if (this.backgroundColor != backgroundColor) {
|
||||
this.backgroundColor = backgroundColor;
|
||||
invalidateSelf();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onBoundsChange(Rect bounds) {
|
||||
super.onBoundsChange(bounds);
|
||||
textSizeDirty = true;
|
||||
}
|
||||
|
||||
private void updateTextSizeIfDirty(Rect bounds) {
|
||||
if (!textSizeDirty) {
|
||||
return;
|
||||
}
|
||||
textSizeDirty = false;
|
||||
|
||||
int contentWidth = (int) (bounds.width() * contentPercent);
|
||||
int contentHeight = (int) (bounds.height() * contentPercent);
|
||||
float widthRatio = (float) contentWidth / (float) textBounds.width();
|
||||
float heightRatio = (float) contentHeight / (float) textBounds.height();
|
||||
float ratio = Math.min(widthRatio, heightRatio);
|
||||
float textSize = STANDARD_TEXT_SIZE * ratio;
|
||||
textPaint.setTextSize(textSize);
|
||||
x = (bounds.width() - textBounds.width() * ratio) / 2 - textBounds.left * ratio;
|
||||
y = (bounds.height() - textBounds.height() * ratio) / 2 - textBounds.top * ratio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw(@NonNull Canvas canvas) {
|
||||
Rect bounds = getBounds();
|
||||
if (!bounds.isEmpty()) {
|
||||
// Draw background
|
||||
backgroundPaint.setColor(backgroundColor);
|
||||
canvas.drawRect(bounds, backgroundPaint);
|
||||
|
||||
if (!TextUtils.isEmpty(text)) {
|
||||
// Draw text
|
||||
updateTextSizeIfDirty(bounds);
|
||||
textPaint.setColor(textColor);
|
||||
canvas.drawText(text, x, y, textPaint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAlpha(@IntRange(from = 0, to = 255) int alpha) {}
|
||||
|
||||
@Override
|
||||
public void setColorFilter(@Nullable ColorFilter colorFilter) {
|
||||
backgroundPaint.setColorFilter(colorFilter);
|
||||
textPaint.setColorFilter(colorFilter);
|
||||
invalidateSelf();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOpacity() {
|
||||
return PixelFormat.TRANSLUCENT;
|
||||
}
|
||||
}
|
||||
@@ -262,7 +262,7 @@ public class Settings {
|
||||
}
|
||||
|
||||
public static final String KEY_APPLY_NAV_BAR_THEME_COLOR = "apply_nav_bar_theme_color";
|
||||
private static final boolean DEFAULT_APPLY_NAV_BAR_THEME_COLOR = false;
|
||||
private static final boolean DEFAULT_APPLY_NAV_BAR_THEME_COLOR = true;
|
||||
|
||||
public static boolean getApplyNavBarThemeColor() {
|
||||
return getBoolean(KEY_APPLY_NAV_BAR_THEME_COLOR, DEFAULT_APPLY_NAV_BAR_THEME_COLOR);
|
||||
|
||||
@@ -138,7 +138,7 @@ public class EhClient {
|
||||
try {
|
||||
switch (mMethod) {
|
||||
case METHOD_SIGN_IN:
|
||||
return EhEngine.signIn(this, mOkHttpClient, (String) params[0], (String) params[1], (String) params[2], (String) params[3]);
|
||||
return EhEngine.signIn(this, mOkHttpClient, (String) params[0], (String) params[1]);
|
||||
case METHOD_GET_GALLERY_LIST:
|
||||
return EhEngine.getGalleryList(this, mOkHttpClient, (String) params[0]);
|
||||
case METHOD_GET_GALLERY_DETAIL:
|
||||
|
||||
@@ -134,17 +134,13 @@ public class EhEngine {
|
||||
}
|
||||
|
||||
public static String signIn(@Nullable EhClient.Task task, OkHttpClient okHttpClient,
|
||||
String username, String password, String recaptchaChallenge, String recaptchaResponse) throws Throwable {
|
||||
String username, String password) throws Throwable {
|
||||
FormBody.Builder builder = new FormBody.Builder()
|
||||
.add("UserName", username)
|
||||
.add("PassWord", password)
|
||||
.add("submit", "Log me in")
|
||||
.add("CookieDate", "1")
|
||||
.add("temporary_https", "off");
|
||||
if (!TextUtils.isEmpty(recaptchaChallenge) && !TextUtils.isEmpty(recaptchaResponse)) {
|
||||
builder.add("recaptcha_challenge_field", recaptchaChallenge);
|
||||
builder.add("recaptcha_response_field", recaptchaResponse);
|
||||
}
|
||||
String url = EhUrl.API_SIGN_IN;
|
||||
String referer = "https://forums.e-hentai.org/index.php?act=Login&CODE=00";
|
||||
String origin = "https://forums.e-hentai.org";
|
||||
@@ -214,7 +210,8 @@ public class EhEngine {
|
||||
if (filter) {
|
||||
for (int i = 0, n = list.size(); i < n; i++) {
|
||||
GalleryInfo info = list.get(i);
|
||||
if (!sEhFilter.filterTag(info) || !sEhFilter.filterTagNamespace(info)) {
|
||||
// Thumbnail mode need filter uploader again
|
||||
if (!sEhFilter.filterUploader(info) || !sEhFilter.filterTag(info) || !sEhFilter.filterTagNamespace(info)) {
|
||||
list.remove(i);
|
||||
i--;
|
||||
n--;
|
||||
|
||||
@@ -158,7 +158,7 @@ public final class EhFilter {
|
||||
List<Filter> filters = mTitleFilterList;
|
||||
if (null != title && filters.size() > 0) {
|
||||
for (int i = 0, n = filters.size(); i < n; i++) {
|
||||
if (filters.get(i).enable && title.contains(filters.get(i).text)) {
|
||||
if (filters.get(i).enable && title.toLowerCase().contains(filters.get(i).text)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,7 @@ public class GalleryComment implements Parcelable {
|
||||
public long time;
|
||||
public String user;
|
||||
public String comment;
|
||||
public long lastEdited;
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
@@ -52,6 +53,7 @@ public class GalleryComment implements Parcelable {
|
||||
dest.writeLong(this.time);
|
||||
dest.writeString(this.user);
|
||||
dest.writeString(this.comment);
|
||||
dest.writeLong(this.lastEdited);
|
||||
}
|
||||
|
||||
public GalleryComment() {
|
||||
@@ -69,6 +71,7 @@ public class GalleryComment implements Parcelable {
|
||||
this.time = in.readLong();
|
||||
this.user = in.readString();
|
||||
this.comment = in.readString();
|
||||
this.lastEdited = in.readLong();
|
||||
}
|
||||
|
||||
public static final Creator<GalleryComment> CREATOR = new Creator<GalleryComment>() {
|
||||
|
||||
@@ -444,6 +444,14 @@ public class GalleryDetailParser {
|
||||
comment.user = c3.child(0).text();
|
||||
// comment
|
||||
comment.comment = JsoupUtils.getElementByClass(element, "c6").html();
|
||||
// last edited
|
||||
Element c8 = JsoupUtils.getElementByClass(element, "c8");
|
||||
if (c8 != null) {
|
||||
Element e = c8.children().first();
|
||||
if (e != null) {
|
||||
comment.lastEdited = WEB_COMMENT_DATE_FORMAT.parse(temp).getTime();
|
||||
}
|
||||
}
|
||||
return comment;
|
||||
} catch (Throwable e) {
|
||||
ExceptionUtils.throwIfFatal(e);
|
||||
|
||||
@@ -59,6 +59,7 @@ import com.hippo.ehviewer.gallery.DirGalleryProvider;
|
||||
import com.hippo.ehviewer.gallery.EhGalleryProvider;
|
||||
import com.hippo.ehviewer.gallery.GalleryProvider2;
|
||||
import com.hippo.ehviewer.widget.GalleryGuideView;
|
||||
import com.hippo.ehviewer.widget.GalleryHeader;
|
||||
import com.hippo.ehviewer.widget.ReversibleSeekBar;
|
||||
import com.hippo.glgallery.GalleryPageView;
|
||||
import com.hippo.glgallery.GalleryProvider;
|
||||
@@ -369,6 +370,9 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
|
||||
case 2:
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
break;
|
||||
case 3:
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR;
|
||||
break;
|
||||
}
|
||||
setRequestedOrientation(orientation);
|
||||
|
||||
@@ -378,6 +382,12 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
|
||||
// Cutout
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
getWindow().getAttributes().layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES;
|
||||
|
||||
GalleryHeader galleryHeader = findViewById(R.id.gallery_header);
|
||||
galleryHeader.setOnApplyWindowInsetsListener((v, insets) -> {
|
||||
galleryHeader.setDisplayCutout(insets.getDisplayCutout());
|
||||
return insets;
|
||||
});
|
||||
}
|
||||
|
||||
if (Settings.getGuideGallery()) {
|
||||
@@ -834,6 +844,9 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
|
||||
case 2:
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
|
||||
break;
|
||||
case 3:
|
||||
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR;
|
||||
break;
|
||||
}
|
||||
setRequestedOrientation(orientation);
|
||||
mGalleryView.setLayoutMode(layoutMode);
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* Copyright 2019 Hippo Seven
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.hippo.ehviewer.ui.dialog;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.TextView;
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import com.hippo.ehviewer.R;
|
||||
|
||||
public class SelectItemWithIconAdapter extends BaseAdapter {
|
||||
|
||||
private Context context;
|
||||
private LayoutInflater inflater;
|
||||
|
||||
private CharSequence[] texts;
|
||||
private int[] icons;
|
||||
|
||||
public SelectItemWithIconAdapter(Context context, CharSequence[] texts, int[] icons) {
|
||||
int count = texts.length;
|
||||
if (count != icons.length) {
|
||||
throw new IllegalArgumentException("Length conflict");
|
||||
}
|
||||
this.context = context;
|
||||
this.inflater = LayoutInflater.from(context);
|
||||
this.texts = texts;
|
||||
this.icons = icons;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return texts.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int position) {
|
||||
return texts[position];
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int position) {
|
||||
return position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
if (convertView == null) {
|
||||
convertView = inflater.inflate(R.layout.dialog_item_select_with_icon, parent, false);
|
||||
}
|
||||
TextView view = (TextView) convertView;
|
||||
|
||||
view.setText(texts[position]);
|
||||
|
||||
Drawable icon = AppCompatResources.getDrawable(context, icons[position]);
|
||||
icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight());
|
||||
view.setCompoundDrawables(icon, null, null, null);
|
||||
|
||||
return view;
|
||||
}
|
||||
}
|
||||
@@ -687,6 +687,16 @@ public final class GalleryCommentsScene extends ToolbarScene
|
||||
ssb.append(" ").append(ss);
|
||||
}
|
||||
|
||||
if (comment.lastEdited != 0) {
|
||||
String str = context.getString(R.string.last_edited, ReadableTime.getTimeAgo(comment.lastEdited));
|
||||
SpannableString ss = new SpannableString(str);
|
||||
ss.setSpan(new RelativeSizeSpan(0.8f), 0, str.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
ss.setSpan(new StyleSpan(Typeface.BOLD), 0, str.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
ss.setSpan(new ForegroundColorSpan(AttrResources.getAttrColor(context, android.R.attr.textColorSecondary)),
|
||||
0, str.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
ssb.append("\n\n").append(ss);
|
||||
}
|
||||
|
||||
return TextUrl.handleTextUrl(ssb);
|
||||
}
|
||||
|
||||
|
||||
@@ -1096,7 +1096,7 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
if (null != keyword) {
|
||||
ListUrlBuilder lub = new ListUrlBuilder();
|
||||
lub.setMode(ListUrlBuilder.MODE_NORMAL);
|
||||
lub.setKeyword(keyword);
|
||||
lub.setKeyword("\"" + keyword + "\"");
|
||||
GalleryListScene.startScene(this, lub);
|
||||
return;
|
||||
}
|
||||
@@ -1186,7 +1186,15 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
} else if (mDownload == v) {
|
||||
GalleryInfo galleryInfo = getGalleryInfo();
|
||||
if (galleryInfo != null) {
|
||||
CommonOperations.startDownload(activity, galleryInfo, false);
|
||||
if (EhApplication.getDownloadManager(context).getDownloadState(galleryInfo.gid) == DownloadInfo.STATE_INVALID) {
|
||||
CommonOperations.startDownload(activity, galleryInfo, false);
|
||||
} else {
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle(R.string.download_remove_dialog_title)
|
||||
.setMessage(getString(R.string.download_remove_dialog_message, galleryInfo.title))
|
||||
.setPositiveButton(android.R.string.ok, (dialog1, which1) -> EhApplication.getDownloadManager(context).deleteDownload(galleryInfo.gid))
|
||||
.show();
|
||||
}
|
||||
}
|
||||
} else if (mRead == v) {
|
||||
GalleryInfo galleryInfo = null;
|
||||
|
||||
@@ -82,6 +82,7 @@ import com.hippo.ehviewer.download.DownloadManager;
|
||||
import com.hippo.ehviewer.ui.CommonOperations;
|
||||
import com.hippo.ehviewer.ui.GalleryActivity;
|
||||
import com.hippo.ehviewer.ui.MainActivity;
|
||||
import com.hippo.ehviewer.ui.dialog.SelectItemWithIconAdapter;
|
||||
import com.hippo.ehviewer.widget.GalleryInfoContentHelper;
|
||||
import com.hippo.ehviewer.widget.SearchBar;
|
||||
import com.hippo.ehviewer.widget.SearchLayout;
|
||||
@@ -1061,39 +1062,24 @@ public final class GalleryListScene extends BaseScene
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean download;
|
||||
switch (mDownloadManager.getDownloadState(gi.gid)) {
|
||||
default:
|
||||
case DownloadInfo.STATE_INVALID:
|
||||
download = true;
|
||||
break;
|
||||
case DownloadInfo.STATE_NONE:
|
||||
download = true;
|
||||
break;
|
||||
case DownloadInfo.STATE_WAIT:
|
||||
download = false;
|
||||
break;
|
||||
case DownloadInfo.STATE_DOWNLOAD:
|
||||
download = false;
|
||||
break;
|
||||
case DownloadInfo.STATE_FINISH:
|
||||
download = true;
|
||||
break;
|
||||
case DownloadInfo.STATE_FAILED:
|
||||
download = true;
|
||||
break;
|
||||
}
|
||||
boolean favourite = gi.favoriteSlot == -2;
|
||||
boolean downloaded = mDownloadManager.getDownloadState(gi.gid) != DownloadInfo.STATE_INVALID;
|
||||
boolean favourited = gi.favoriteSlot != -2;
|
||||
|
||||
CharSequence[] items = new CharSequence[] {
|
||||
context.getString(R.string.read),
|
||||
context.getString(download ? R.string.download : R.string.stop_downloading),
|
||||
context.getString(favourite ? R.string.add_to_favourites : R.string.remove_from_favourites),
|
||||
context.getString(downloaded ? R.string.delete_downloads : R.string.download),
|
||||
context.getString(favourited ? R.string.remove_from_favourites : R.string.add_to_favourites),
|
||||
};
|
||||
|
||||
int[] icons = new int[] {
|
||||
R.drawable.v_book_open_x24,
|
||||
downloaded ? R.drawable.v_delete_x24 : R.drawable.v_download_x24,
|
||||
favourited ? R.drawable.v_heart_broken_x24 : R.drawable.v_heart_x24,
|
||||
};
|
||||
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle(EhUtils.getSuitableTitle(gi))
|
||||
.setItems(items, (dialog, which) -> {
|
||||
.setAdapter(new SelectItemWithIconAdapter(context, items, icons), (dialog, which) -> {
|
||||
switch (which) {
|
||||
case 0: // Read
|
||||
Intent intent = new Intent(activity, GalleryActivity.class);
|
||||
@@ -1102,17 +1088,21 @@ public final class GalleryListScene extends BaseScene
|
||||
startActivity(intent);
|
||||
break;
|
||||
case 1: // Download
|
||||
if (download) {
|
||||
CommonOperations.startDownload(activity, gi, false);
|
||||
if (downloaded) {
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle(R.string.download_remove_dialog_title)
|
||||
.setMessage(getString(R.string.download_remove_dialog_message, gi.title))
|
||||
.setPositiveButton(android.R.string.ok, (dialog1, which1) -> mDownloadManager.deleteDownload(gi.gid))
|
||||
.show();
|
||||
} else {
|
||||
mDownloadManager.stopDownload(gi.gid);
|
||||
CommonOperations.startDownload(activity, gi, false);
|
||||
}
|
||||
break;
|
||||
case 2: // Favorites
|
||||
if (favourite) {
|
||||
CommonOperations.addToFavorites(activity, gi, new AddToFavoriteListener(context, activity.getStageId(), getTag()));
|
||||
} else {
|
||||
if (favourited) {
|
||||
CommonOperations.removeFromFavorites(activity, gi, new RemoveFromFavoriteListener(context, activity.getStageId(), getTag()));
|
||||
} else {
|
||||
CommonOperations.addToFavorites(activity, gi, new AddToFavoriteListener(context, activity.getStageId(), getTag()));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ import com.hippo.ehviewer.client.EhUrl;
|
||||
import com.hippo.ehviewer.client.EhUtils;
|
||||
import com.hippo.ehviewer.client.parser.ProfileParser;
|
||||
import com.hippo.ehviewer.ui.MainActivity;
|
||||
import com.hippo.ehviewer.widget.RecaptchaView;
|
||||
import com.hippo.scene.Announcer;
|
||||
import com.hippo.scene.SceneFragment;
|
||||
import com.hippo.util.ExceptionUtils;
|
||||
@@ -68,8 +67,6 @@ public final class SignInScene extends SolidScene implements EditText.OnEditorAc
|
||||
private EditText mUsername;
|
||||
@Nullable
|
||||
private EditText mPassword;
|
||||
private EditText mRecaptcha;
|
||||
private RecaptchaView mRecaptchaView;
|
||||
@Nullable
|
||||
private View mRegister;
|
||||
@Nullable
|
||||
@@ -127,8 +124,6 @@ public final class SignInScene extends SolidScene implements EditText.OnEditorAc
|
||||
mPasswordLayout = (TextInputLayout) ViewUtils.$$(loginForm, R.id.password_layout);
|
||||
mPassword = mPasswordLayout.getEditText();
|
||||
AssertUtils.assertNotNull(mPassword);
|
||||
mRecaptcha = (EditText) ViewUtils.$$(loginForm, R.id.recaptcha);
|
||||
mRecaptchaView = (RecaptchaView) ViewUtils.$$(loginForm, R.id.recaptcha_image);
|
||||
mRegister = ViewUtils.$$(loginForm, R.id.register);
|
||||
mSignIn = ViewUtils.$$(loginForm, R.id.sign_in);
|
||||
mSignInViaWebView = (TextView) ViewUtils.$$(loginForm, R.id.sign_in_via_webview);
|
||||
@@ -284,15 +279,12 @@ public final class SignInScene extends SolidScene implements EditText.OnEditorAc
|
||||
// Clean up for sign in
|
||||
EhUtils.signOut(context);
|
||||
|
||||
String challenge = mRecaptchaView.getChallenge();
|
||||
String response = mRecaptcha.getText().toString();
|
||||
|
||||
EhCallback callback = new SignInListener(context,
|
||||
activity.getStageId(), getTag());
|
||||
mRequestId = ((EhApplication) context.getApplicationContext()).putGlobalStuff(callback);
|
||||
EhRequest request = new EhRequest()
|
||||
.setMethod(EhClient.METHOD_SIGN_IN)
|
||||
.setArgs(username, password, challenge, response)
|
||||
.setArgs(username, password)
|
||||
.setCallback(callback);
|
||||
EhApplication.getEhClient(context).execute(request);
|
||||
|
||||
@@ -335,7 +327,7 @@ public final class SignInScene extends SolidScene implements EditText.OnEditorAc
|
||||
|
||||
new AlertDialog.Builder(context)
|
||||
.setTitle(R.string.sign_in_failed)
|
||||
.setMessage(ExceptionUtils.getReadableString(e))
|
||||
.setMessage(ExceptionUtils.getReadableString(e) + "\n\n" + getString(R.string.sign_in_failed_tip))
|
||||
.setPositiveButton(R.string.get_it, null)
|
||||
.show();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
/*
|
||||
* Copyright 2019 Hippo Seven
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.hippo.ehviewer.widget;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Rect;
|
||||
import android.os.Build;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.DisplayCutout;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import com.hippo.ehviewer.R;
|
||||
import com.hippo.yorozuya.ObjectUtils;
|
||||
|
||||
public class GalleryHeader extends ViewGroup {
|
||||
|
||||
private DisplayCutout displayCutout;
|
||||
|
||||
private View battery;
|
||||
private View progress;
|
||||
private View clock;
|
||||
|
||||
private Rect batteryRect = new Rect();
|
||||
private Rect progressRect = new Rect();
|
||||
private Rect clockRect = new Rect();
|
||||
|
||||
private int[] location = new int[2];
|
||||
|
||||
private int lastX = 0;
|
||||
private int lastY = 0;
|
||||
|
||||
public GalleryHeader(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.P)
|
||||
public void setDisplayCutout(@Nullable DisplayCutout displayCutout) {
|
||||
if (!ObjectUtils.equal(this.displayCutout, displayCutout)) {
|
||||
this.displayCutout = displayCutout;
|
||||
requestLayout();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
|
||||
battery = findViewById(R.id.battery);
|
||||
progress = findViewById(R.id.progress);
|
||||
clock = findViewById(R.id.clock);
|
||||
}
|
||||
|
||||
private void measureChild(Rect rect, View view, int width, int paddingLeft, int paddingRight) {
|
||||
int left;
|
||||
MarginLayoutParams lp = (MarginLayoutParams) view.getLayoutParams();
|
||||
if (view == battery) {
|
||||
left = paddingLeft + lp.leftMargin;
|
||||
} else if (view == progress) {
|
||||
left = paddingLeft + (width - paddingLeft - paddingRight) / 2 - view.getMeasuredWidth() / 2;
|
||||
} else {
|
||||
left = width - paddingRight - lp.rightMargin - view.getMeasuredWidth();
|
||||
}
|
||||
rect.set(left, lp.topMargin, left + view.getMeasuredWidth(), lp.topMargin + view.getMeasuredHeight());
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.P)
|
||||
private boolean offsetVertically(Rect rect, View view, int width) {
|
||||
int offset = 0;
|
||||
|
||||
measureChild(rect, view, width, 0, 0);
|
||||
rect.offset(lastX, lastY);
|
||||
|
||||
for (Rect notch : displayCutout.getBoundingRects()) {
|
||||
if (Rect.intersects(notch, rect)) {
|
||||
offset = Math.max(offset, notch.bottom - lastY);
|
||||
}
|
||||
}
|
||||
|
||||
if (offset != 0) {
|
||||
rect.offset(-lastX, -lastY);
|
||||
rect.offset(0, offset);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.P)
|
||||
private int getOffsetLeft(Rect rect, View view, int width) {
|
||||
int offset = 0;
|
||||
|
||||
measureChild(rect, view, width, 0, 0);
|
||||
rect.offset(lastX, lastY);
|
||||
|
||||
for (Rect notch : displayCutout.getBoundingRects()) {
|
||||
if (Rect.intersects(notch, rect)) {
|
||||
offset = Math.max(offset, notch.right - lastX);
|
||||
}
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
@RequiresApi(api = Build.VERSION_CODES.P)
|
||||
private int getOffsetRight(Rect rect, View view, int width) {
|
||||
int offset = 0;
|
||||
|
||||
measureChild(rect, view, width, 0, 0);
|
||||
rect.offset(lastX, lastY);
|
||||
|
||||
for (Rect notch : displayCutout.getBoundingRects()) {
|
||||
if (Rect.intersects(notch, rect)) {
|
||||
offset = Math.max(offset, lastX + width - notch.left);
|
||||
}
|
||||
}
|
||||
|
||||
return offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
if (MeasureSpec.getMode(widthMeasureSpec) != MeasureSpec.EXACTLY) {
|
||||
throw new IllegalStateException();
|
||||
}
|
||||
int width = MeasureSpec.getSize(widthMeasureSpec);
|
||||
|
||||
int height = 0;
|
||||
for (int i = 0; i < getChildCount(); i++) {
|
||||
View child = getChildAt(i);
|
||||
measureChild(child, widthMeasureSpec, heightMeasureSpec);
|
||||
MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams();
|
||||
height = Math.max(height, child.getMeasuredHeight() + lp.topMargin);
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && displayCutout != null) {
|
||||
// Check progress covered
|
||||
if (offsetVertically(progressRect, progress, width)) {
|
||||
offsetVertically(batteryRect, battery, width);
|
||||
offsetVertically(clockRect, clock, width);
|
||||
height = Math.max(progressRect.bottom, Math.max(batteryRect.bottom, clockRect.bottom));
|
||||
} else {
|
||||
// Clamp left and right
|
||||
int paddingLeft = getOffsetLeft(batteryRect, battery, width);
|
||||
int paddingRight = getOffsetRight(clockRect, clock, width);
|
||||
measureChild(batteryRect, battery, width, paddingLeft, paddingRight);
|
||||
measureChild(progressRect, progress, width, paddingLeft, paddingRight);
|
||||
measureChild(clockRect, clock, width, paddingLeft, paddingRight);
|
||||
}
|
||||
} else {
|
||||
measureChild(batteryRect, battery, width, 0, 0);
|
||||
measureChild(progressRect, progress, width, 0, 0);
|
||||
measureChild(clockRect, clock, width, 0, 0);
|
||||
}
|
||||
|
||||
setMeasuredDimension(width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onLayout(boolean changed, int l, int t, int r, int b) {
|
||||
battery.layout(batteryRect.left, batteryRect.top, batteryRect.right, batteryRect.bottom);
|
||||
progress.layout(progressRect.left, progressRect.top, progressRect.right, progressRect.bottom);
|
||||
clock.layout(clockRect.left, clockRect.top, clockRect.right, clockRect.bottom);
|
||||
|
||||
getLocationOnScreen(location);
|
||||
if (lastX != location[0] || lastY != location[1]) {
|
||||
lastX = location[0];
|
||||
lastY = location[1];
|
||||
requestLayout();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MarginLayoutParams generateLayoutParams(AttributeSet attrs) {
|
||||
return new MarginLayoutParams(getContext(), attrs);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkLayoutParams(ViewGroup.LayoutParams p) {
|
||||
return p instanceof MarginLayoutParams;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected MarginLayoutParams generateLayoutParams(ViewGroup.LayoutParams lp) {
|
||||
if (lp instanceof MarginLayoutParams) {
|
||||
return new MarginLayoutParams((MarginLayoutParams) lp);
|
||||
}
|
||||
return new MarginLayoutParams(lp);
|
||||
}
|
||||
}
|
||||
@@ -1,183 +0,0 @@
|
||||
/*
|
||||
* Copyright 2017 Hippo Seven
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.hippo.ehviewer.widget;
|
||||
|
||||
/*
|
||||
* Created by Hippo on 2017/8/20.
|
||||
*/
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import androidx.annotation.NonNull;
|
||||
import com.hippo.android.recaptcha.RecaptchaV1;
|
||||
import com.hippo.drawable.TextDrawable;
|
||||
import com.hippo.ehviewer.R;
|
||||
import com.hippo.widget.LoadImageView;
|
||||
import com.hippo.yorozuya.SimpleHandler;
|
||||
|
||||
public class RecaptchaView extends LoadImageView implements RecaptchaV1.RecaptchaCallback, View.OnClickListener {
|
||||
|
||||
private static final String CHALLENGE = "6LdtfgYAAAAAALjIPPiCgPJJah8MhAUpnHcKF8u_";
|
||||
|
||||
private boolean loading = false;
|
||||
private String challenge;
|
||||
private String image;
|
||||
|
||||
private TextDrawable waitingDrawable;
|
||||
private TextDrawable loadingDrawable;
|
||||
private TextDrawable failureDrawable;
|
||||
|
||||
public RecaptchaView(Context context) {
|
||||
super(context);
|
||||
init();
|
||||
}
|
||||
|
||||
public RecaptchaView(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
setOnClickListener(this);
|
||||
if (waitingDrawable == null) {
|
||||
waitingDrawable = new TextDrawable(getContext().getString(R.string.recaptcha_none), 0.6f);
|
||||
waitingDrawable.setBackgroundColor(Color.GRAY);
|
||||
waitingDrawable.setTextColor(Color.WHITE);
|
||||
}
|
||||
load(waitingDrawable);
|
||||
}
|
||||
|
||||
public String getChallenge() {
|
||||
return challenge;
|
||||
}
|
||||
|
||||
public void load() {
|
||||
if (loading) {
|
||||
return;
|
||||
}
|
||||
loading = false;
|
||||
challenge = null;
|
||||
image = null;
|
||||
|
||||
if (loadingDrawable == null) {
|
||||
loadingDrawable = new TextDrawable(getContext().getString(R.string.recaptcha_loading), 0.6f);
|
||||
loadingDrawable.setBackgroundColor(Color.GRAY);
|
||||
loadingDrawable.setTextColor(Color.WHITE);
|
||||
}
|
||||
load(loadingDrawable);
|
||||
|
||||
RecaptchaV1.recaptcha(getContext(), CHALLENGE, SimpleHandler.getInstance(), this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(@NonNull View v) {
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(@NonNull String challenge, @NonNull String image) {
|
||||
this.loading = false;
|
||||
this.challenge = challenge;
|
||||
this.image = image;
|
||||
|
||||
load(image, image);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure() {
|
||||
this.loading = false;
|
||||
this.challenge = null;
|
||||
this.image = null;
|
||||
|
||||
if (failureDrawable == null) {
|
||||
failureDrawable = new TextDrawable(getContext().getString(R.string.recaptcha_failure), 0.6f);
|
||||
failureDrawable.setBackgroundColor(Color.GRAY);
|
||||
failureDrawable.setTextColor(Color.WHITE);
|
||||
}
|
||||
load(failureDrawable);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Parcelable onSaveInstanceState() {
|
||||
SavedState ss = new SavedState(super.onSaveInstanceState());
|
||||
ss.loading = loading;
|
||||
ss.challenge = challenge;
|
||||
ss.image = image;
|
||||
return ss;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRestoreInstanceState(Parcelable state) {
|
||||
if (!(state instanceof SavedState)) {
|
||||
super.onRestoreInstanceState(state);
|
||||
return;
|
||||
}
|
||||
|
||||
SavedState ss = (SavedState) state;
|
||||
super.onRestoreInstanceState(ss.getSuperState());
|
||||
|
||||
if (ss.loading) {
|
||||
load();
|
||||
} else if (!TextUtils.isEmpty(ss.challenge) && !TextUtils.isEmpty(ss.image)) {
|
||||
onSuccess(ss.challenge, ss.image);
|
||||
}
|
||||
}
|
||||
|
||||
private static class SavedState extends BaseSavedState {
|
||||
|
||||
private boolean loading;
|
||||
private String challenge;
|
||||
private String image;
|
||||
|
||||
public SavedState(Parcelable superState) {
|
||||
super(superState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
super.writeToParcel(out, flags);
|
||||
out.writeByte(loading ? (byte) 1 : (byte) 0);
|
||||
out.writeString(challenge);
|
||||
out.writeString(image);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<SavedState> CREATOR
|
||||
= new Parcelable.Creator<SavedState>() {
|
||||
@Override
|
||||
public SavedState createFromParcel(Parcel in) {
|
||||
return new SavedState(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SavedState[] newArray(int size) {
|
||||
return new SavedState[size];
|
||||
}
|
||||
};
|
||||
|
||||
public SavedState(Parcel source) {
|
||||
super(source);
|
||||
loading = source.readByte() != 0;
|
||||
challenge = source.readString();
|
||||
image = source.readString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,17 +16,16 @@
|
||||
|
||||
package com.hippo.util;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import com.hippo.ehviewer.R;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
public final class ReadableTime {
|
||||
|
||||
private static Resources sResources;
|
||||
@@ -56,30 +55,21 @@ public final class ReadableTime {
|
||||
R.plurals.second
|
||||
};
|
||||
|
||||
private static final Calendar sCalendar = Calendar.getInstance(TimeZone.getTimeZone("GMT+08:00"));
|
||||
private static final Calendar sCalendar = Calendar.getInstance();
|
||||
private static final Object sCalendarLock = new Object();
|
||||
|
||||
private static final SimpleDateFormat DATE_FORMAT_WITHOUT_YEAR =
|
||||
new SimpleDateFormat("MMM d", Locale.getDefault());
|
||||
private static final SimpleDateFormat DATE_FORMAT_WITHOUT_YEAR = new SimpleDateFormat("MMM d");
|
||||
private static final SimpleDateFormat DATE_FORMAT_WITH_YEAR = new SimpleDateFormat("MMM d, yyyy");
|
||||
|
||||
private static final SimpleDateFormat DATE_FORMAT_WIT_YEAR =
|
||||
new SimpleDateFormat("yyy MMM d", Locale.getDefault());
|
||||
private static final SimpleDateFormat DATE_FORMAT_WITHOUT_YEAR_ZH = new SimpleDateFormat("M月d日");
|
||||
private static final SimpleDateFormat DATE_FORMAT_WITH_YEAR_ZH = new SimpleDateFormat("yyyy年M月d日");
|
||||
|
||||
private static final SimpleDateFormat DATE_FORMAT =
|
||||
new SimpleDateFormat("yy-MM-dd HH:mm", Locale.getDefault());
|
||||
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yy-MM-dd HH:mm");
|
||||
private static final Object sDateFormatLock1 = new Object();
|
||||
|
||||
private static final SimpleDateFormat FILENAMABLE_DATE_FORMAT =
|
||||
new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss-SSS", Locale.getDefault());
|
||||
private static final SimpleDateFormat FILENAMABLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss-SSS");
|
||||
private static final Object sDateFormatLock2 = new Object();
|
||||
|
||||
static {
|
||||
// The website use GMT+08:00, so tell user the same
|
||||
DATE_FORMAT.setTimeZone(TimeZone.getTimeZone("GMT+08:00"));
|
||||
|
||||
DATE_FORMAT_WITHOUT_YEAR.setTimeZone(TimeZone.getTimeZone("GMT+08:00"));
|
||||
}
|
||||
|
||||
public static void initialize(Context context) {
|
||||
sResources = context.getApplicationContext().getResources();
|
||||
}
|
||||
@@ -134,11 +124,12 @@ public final class ReadableTime {
|
||||
int nowYear = sCalendar.get(Calendar.YEAR);
|
||||
sCalendar.setTime(timeDate);
|
||||
int timeYear = sCalendar.get(Calendar.YEAR);
|
||||
boolean isZh = Locale.getDefault().getLanguage().equals("zh");
|
||||
|
||||
if (nowYear == timeYear) {
|
||||
return DATE_FORMAT_WITHOUT_YEAR.format(timeDate);
|
||||
return (isZh ? DATE_FORMAT_WITHOUT_YEAR_ZH : DATE_FORMAT_WITHOUT_YEAR).format(timeDate);
|
||||
} else {
|
||||
return DATE_FORMAT_WIT_YEAR.format(timeDate);
|
||||
return (isZh ? DATE_FORMAT_WITH_YEAR_ZH : DATE_FORMAT_WITH_YEAR).format(timeDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright 2019 Hippo Seven
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="?attr/drawableColorPrimary"
|
||||
android:pathData="@string/pd_download"/>
|
||||
|
||||
</vector>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright 2019 Hippo Seven
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="?attr/drawableColorPrimary"
|
||||
android:pathData="@string/pd_heart_broken"/>
|
||||
|
||||
</vector>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright 2019 Hippo Seven
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<vector
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="?attr/drawableColorPrimary"
|
||||
android:pathData="@string/pd_heart"/>
|
||||
|
||||
</vector>
|
||||
@@ -26,34 +26,42 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<com.hippo.widget.TextClock
|
||||
android:id="@+id/clock"
|
||||
android:layout_width="wrap_content"
|
||||
<com.hippo.ehviewer.widget.GalleryHeader
|
||||
android:id="@+id/gallery_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginTop="@dimen/gallery_widget_margin_v"
|
||||
android:layout_marginRight="@dimen/gallery_widget_margin_h"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
android:layout_gravity="top">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/gallery_widget_margin_v"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
<com.hippo.widget.TextClock
|
||||
android:id="@+id/clock"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="right"
|
||||
android:layout_marginTop="@dimen/gallery_widget_margin_v"
|
||||
android:layout_marginRight="@dimen/gallery_widget_margin_h"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
|
||||
<com.hippo.widget.BatteryView
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/battery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:layout_marginTop="@dimen/gallery_widget_margin_v"
|
||||
android:layout_marginLeft="@dimen/gallery_widget_margin_h"
|
||||
android:drawablePadding="4dp"
|
||||
app:color="?android:attr/textColorSecondary"
|
||||
app:warningColor="@color/red_500"/>
|
||||
<TextView
|
||||
android:id="@+id/progress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="@dimen/gallery_widget_margin_v"
|
||||
android:textColor="?android:attr/textColorSecondary"/>
|
||||
|
||||
<com.hippo.widget.BatteryView
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/battery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="left"
|
||||
android:layout_marginTop="@dimen/gallery_widget_margin_v"
|
||||
android:layout_marginLeft="@dimen/gallery_widget_margin_h"
|
||||
android:drawablePadding="4dp"
|
||||
app:color="?android:attr/textColorSecondary"
|
||||
app:warningColor="@color/red_500"/>
|
||||
|
||||
</com.hippo.ehviewer.widget.GalleryHeader>
|
||||
|
||||
<com.hippo.ehviewer.widget.SeekBarPanel
|
||||
android:id="@+id/seek_bar_panel"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (C) 2014 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<!--
|
||||
This layout file is used by the AlertDialog when displaying a list of items.
|
||||
This layout file is inflated and used as the TextView to display individual
|
||||
items.
|
||||
-->
|
||||
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@android:id/text1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="?android:attr/listPreferredItemHeightSmall"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSmall"
|
||||
android:textColor="?android:attr/textColorAlertDialogListItem"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="?attr/listPreferredItemPaddingLeft"
|
||||
android:paddingRight="?attr/listPreferredItemPaddingRight"
|
||||
android:drawablePadding="@dimen/keyline_margin"
|
||||
android:ellipsize="marquee"/>
|
||||
@@ -45,7 +45,6 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
@@ -73,40 +73,13 @@
|
||||
android:id="@+id/password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:imeOptions="actionNext"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="textPassword"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/recaptcha_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:minWidth="@dimen/single_max_width"
|
||||
android:hint="@string/recaptcha">
|
||||
|
||||
<com.hippo.widget.HackyTextInputEditText
|
||||
android:id="@+id/recaptcha"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"/>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.hippo.ehviewer.widget.RecaptchaView
|
||||
android:id="@+id/recaptcha_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="48dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:minWidth="@dimen/single_max_width"
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
<Space
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
<string name="error_password_cannot_empty">密码不可为空</string>
|
||||
<string name="skip_signing_in">跳过登录</string>
|
||||
<string name="sign_in_failed">登录失败</string>
|
||||
<string name="sign_in_failed_tip">若持续出错,请尝试“通过网页登录”或“通过 Cookie 登录”。</string>
|
||||
<string name="sign_in_failed_plain">这可能是网站更新导致的,也有可能是发生了奇怪的事情。您可以选择在登录按钮下方通过网页登录或者输入 cookie,或者跳过登录。跳过登录可能导致无法正常使用应用。如果你已经在 0.6.x 版登录过了,请优先尝试选择“通过 Cookie 登录”。</string>
|
||||
<string name="press_twice_exit">再按一次退出</string>
|
||||
<string name="content_layout_restore_tip">点击重试</string>
|
||||
@@ -170,6 +171,7 @@
|
||||
<string name="remove_from_favourites">移除收藏</string>
|
||||
|
||||
<string name="stop_downloading">停止下载</string>
|
||||
<string name="delete_downloads">删除下载</string>
|
||||
|
||||
<string name="quick_search">快速搜索</string>
|
||||
<string name="quick_search_tip">点击“+”来添加快速搜索</string>
|
||||
@@ -293,6 +295,7 @@
|
||||
<string name="vote_failed">投票失败</string>
|
||||
<string name="check_vote_status">查看投票情况</string>
|
||||
<string name="click_more_comments">点击加载更多评论</string>
|
||||
<string name="last_edited">上次修改时间:%s</string>
|
||||
|
||||
<!-- Gallery Previews -->
|
||||
<string name="gallery_previews">画廊预览</string>
|
||||
@@ -464,6 +467,7 @@
|
||||
<string name="settings_read_screen_rotation_default">系统默认</string>
|
||||
<string name="settings_read_screen_rotation_portrait">竖屏</string>
|
||||
<string name="settings_read_screen_rotation_landscape">横屏</string>
|
||||
<string name="settings_read_screen_rotation_sensor">自动旋转</string>
|
||||
<string name="settings_read_reading_direction">阅读方向</string>
|
||||
<string name="settings_read_reading_direction_left_to_right">从左至右</string>
|
||||
<string name="settings_read_reading_direction_right_to_Left">从右至左</string>
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
<string name="error_password_cannot_empty">密碼不可為空</string>
|
||||
<string name="skip_signing_in">跳過登錄</string>
|
||||
<string name="sign_in_failed">登錄失敗</string>
|
||||
<string name="sign_in_failed_tip">若持續出錯,請嘗試“通過網頁登錄”或“通過 Cookie 登錄”。</string>
|
||||
<string name="sign_in_failed_plain">這可能是網站更新導致的,也有可能是發生了奇怪的事情。您可以選擇在登錄按鈕下方通過網頁登錄或者輸入 cookie,或者跳過登錄。跳過登錄可能導致無法正常使用應用。如果你已經在 0.6.x 版登錄過了,請優先嚐試選擇“通過 Cookie 登錄”。</string>
|
||||
<string name="press_twice_exit">再按一次退出</string>
|
||||
<string name="content_layout_restore_tip">點擊重試</string>
|
||||
@@ -170,6 +171,7 @@
|
||||
<string name="remove_from_favourites">移除收藏</string>
|
||||
|
||||
<string name="stop_downloading">停止下載</string>
|
||||
<string name="delete_downloads">刪除下載</string>
|
||||
|
||||
<string name="quick_search">快速搜索</string>
|
||||
<string name="quick_search_tip">點擊“+”來添加快速搜索</string>
|
||||
@@ -293,6 +295,7 @@
|
||||
<string name="vote_failed">投票失敗</string>
|
||||
<string name="check_vote_status">查看投票情況</string>
|
||||
<string name="click_more_comments">點擊加載更多評論</string>
|
||||
<string name="last_edited">上次修改時間:%s</string>
|
||||
|
||||
<!-- Gallery Previews -->
|
||||
<string name="gallery_previews">畫廊預覽</string>
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
<string name="error_password_cannot_empty">密碼欄位不能為空</string>
|
||||
<string name="skip_signing_in">略過登入</string>
|
||||
<string name="sign_in_failed">登入失敗</string>
|
||||
<string name="sign_in_failed_tip">若持續出錯,請嘗試“通過網頁登入”或“通過 Cookie 登入”。</string>
|
||||
<string name="sign_in_failed_plain">這可能是網站更新造成的,也有可能是哪裡出錯了。您可以選擇在登入按鈕下方透過網頁登入或者輸入 cookie,也可以略過登入。略過登入可能導致無法正常使用應用程式。如果你已經在 0.6.x 版登入過了,請先試試“透過 Cookie 登入”。</string>
|
||||
<string name="press_twice_exit">再按一次離開</string>
|
||||
<string name="content_layout_restore_tip">點擊重試</string>
|
||||
@@ -170,6 +171,7 @@
|
||||
<string name="remove_from_favourites">移除收藏</string>
|
||||
|
||||
<string name="stop_downloading">停止下載</string>
|
||||
<string name="delete_downloads">刪除下載</string>
|
||||
|
||||
<string name="quick_search">快速搜尋</string>
|
||||
<string name="quick_search_tip">點擊“+”以新增快速搜尋</string>
|
||||
@@ -292,6 +294,7 @@
|
||||
<string name="vote_failed">推噓失敗</string>
|
||||
<string name="check_vote_status">檢視推噓狀態</string>
|
||||
<string name="click_more_comments">點選載入更多留言</string>
|
||||
<string name="last_edited">上次修改時間:%s</string>
|
||||
|
||||
<!-- Gallery Previews -->
|
||||
<string name="gallery_previews">圖庫預覽</string>
|
||||
|
||||
@@ -156,12 +156,14 @@
|
||||
<item>@string/settings_read_screen_rotation_default</item>
|
||||
<item>@string/settings_read_screen_rotation_portrait</item>
|
||||
<item>@string/settings_read_screen_rotation_landscape</item>
|
||||
<item>@string/settings_read_screen_rotation_sensor</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="screen_rotation_entry_values" translatable="false">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="reading_direction_entries">
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<string name="pd_homepage" translatable="false">M10,20V14H14V20H19V12H22L12,3L2,12H5V20H10Z</string>
|
||||
<string name="pd_fire" translatable="false">M11.71,19C9.93,19 8.5,17.59 8.5,15.86C8.5,14.24 9.53,13.1 11.3,12.74C13.07,12.38 14.9,11.53 15.92,10.16C16.31,11.45 16.5,12.81 16.5,14.2C16.5,16.84 14.36,19 11.71,19M13.5,0.67C13.5,0.67 14.24,3.32 14.24,5.47C14.24,7.53 12.89,9.2 10.83,9.2C8.76,9.2 7.2,7.53 7.2,5.47L7.23,5.1C5.21,7.5 4,10.61 4,14A8,8 0 0,0 12,22A8,8 0 0,0 20,14C20,8.6 17.41,3.8 13.5,0.67Z</string>
|
||||
<string name="pd_heart" translatable="false">M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z</string>
|
||||
<string name="pd_heart_broken" translatable="false">M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C8.17,3 8.82,3.12 9.44,3.33L13,9.35L9,14.35L12,21.35V21.35M16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35L11,14.35L15.5,9.35L12.85,4.27C13.87,3.47 15.17,3 16.5,3Z</string>
|
||||
<string name="pd_history" translatable="false">M11,7V12.11L15.71,14.9L16.5,13.62L12.5,11.25V7M12.5,2C8.97,2 5.91,3.92 4.27,6.77L2,4.5V11H8.5L5.75,8.25C6.96,5.73 9.5,4 12.5,4A7.5,7.5 0 0,1 20,11.5A7.5,7.5 0 0,1 12.5,19C9.23,19 6.47,16.91 5.44,14H3.34C4.44,18.03 8.11,21 12.5,21C17.74,21 22,16.75 22,11.5A9.5,9.5 0 0,0 12.5,2Z</string>
|
||||
<string name="pd_book_open" translatable="false">M21,4C19.9,3.7,18.7,3.5,17.5,3.5C15.6,3.5,13.4,3.9,12,5C10.6,3.9,8.4,3.5,6.5,3.5S2.5,3.9,1,5V19.6C1,19.9,1.3,20.1,1.5,20.1C1.6,20.1,1.6,20.1,1.8,20.1C3.1,19.5,5.1,19,6.5,19C8.4,19,10.6,19.4,12,20.5C13.4,19.6,15.8,19,17.5,19C19.1,19,20.9,19.3,22.3,20C22.4,20.1,22.4,20.1,22.6,20.1C22.9,20.1,23.1,19.8,23.1,19.6V5C22.4,4.6,21.8,4.3,21,4M21,17.5C19.9,17.1,18.7,17,17.5,17C15.8,17,13.4,17.6,12,18.5V7C13.4,6.2,15.8,5.5,17.5,5.5C18.7,5.5,19.9,5.7,21,6V17.5Z</string>
|
||||
<string name="pd_delete" translatable="false">M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z</string>
|
||||
|
||||
@@ -140,6 +140,7 @@
|
||||
<string name="error_password_cannot_empty">Password cannot be an empty string</string>
|
||||
<string name="skip_signing_in">Continue without signing in</string>
|
||||
<string name="sign_in_failed">Sign in failed</string>
|
||||
<string name="sign_in_failed_tip">If this issue continues, try \"Sign in via WebView\" or \"Sign in via cookies\"</string>
|
||||
<string name="sign_in_failed_plain">Perhaps it is a mistake due to website update or something wrong happened. You may try sign in via WebView or enter cookie or skip signing in under sign in button. But you may be a "Sad Panda" after skipping signing in. Try "Sign in via cookies" first if you had signed in on 0.6.x version.</string>
|
||||
<string name="press_twice_exit">Press twice to exit</string>
|
||||
<string name="content_layout_restore_tip">Tap to retry</string>
|
||||
@@ -214,6 +215,7 @@
|
||||
<string name="remove_from_favourites">Remove from favourites</string>
|
||||
|
||||
<string name="stop_downloading">Stop downloading</string>
|
||||
<string name="delete_downloads">Delete downloads</string>
|
||||
|
||||
<string name="quick_search">Quick search</string>
|
||||
<string name="quick_search_tip">Tap \"+\" to add Quick Search</string>
|
||||
@@ -339,6 +341,7 @@
|
||||
<string name="vote_failed">Vote failed</string>
|
||||
<string name="check_vote_status">View vote details</string>
|
||||
<string name="click_more_comments">Click to load more comments</string>
|
||||
<string name="last_edited">Last edited: %s</string>
|
||||
|
||||
<!-- Gallery Previews -->
|
||||
<string name="gallery_previews">Gallery Previews</string>
|
||||
@@ -509,6 +512,7 @@
|
||||
<string name="settings_read_screen_rotation_default">Default</string>
|
||||
<string name="settings_read_screen_rotation_portrait">Portrait</string>
|
||||
<string name="settings_read_screen_rotation_landscape">Landscape</string>
|
||||
<string name="settings_read_screen_rotation_sensor">Auto rotate</string>
|
||||
<string name="settings_read_reading_direction">Reading direction</string>
|
||||
<string name="settings_read_reading_direction_left_to_right">Left to right</string>
|
||||
<string name="settings_read_reading_direction_right_to_Left">Right to left</string>
|
||||
|
||||
Reference in new issue
Block a user