mirror of
https://github.com/seven332/EhViewer
synced 2026-11-30 11:08:04 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6af75a9758 | ||
|
|
e4fc925b04 | ||
|
|
2262779ba0 | ||
|
|
b52cd2a619 | ||
|
|
8bad20e58c | ||
|
|
30ca44b9c6 | ||
|
|
cf43ed965e | ||
|
|
dab29819bd | ||
|
|
5fb090f241 | ||
|
|
ff84c63445 | ||
|
|
140ace739e | ||
|
|
5f8c078367 | ||
|
|
faddb37557 | ||
|
|
5d8fe06d5c | ||
|
|
2e34913c7d | ||
|
|
6cc607469b | ||
|
|
26eff55e6d | ||
|
|
9a5743dd67 | ||
|
|
0b547147b1 | ||
|
|
6bd3bd5e80 | ||
|
|
af93a6730e | ||
|
|
27e4bd4e0b | ||
|
|
459b27253a | ||
|
|
bb99570cd4 | ||
|
|
3f2b62c119 | ||
|
|
91e9975a24 | ||
|
|
00485efd0e | ||
|
|
c5d56243e0 | ||
|
|
b8c3229d9f | ||
|
|
8cf935accc | ||
|
|
2cf5589369 | ||
|
|
89addaf211 | ||
|
|
f5409c7b8a | ||
|
|
733ddb5964 | ||
|
|
537380eeb7 | ||
|
|
e44473f26b | ||
|
|
a503832016 | ||
|
|
4935995342 | ||
|
|
a367373c87 | ||
|
|
62cd2e4809 | ||
|
|
7df7defa92 | ||
|
|
56b42c67d5 | ||
|
|
d1afcc2f54 | ||
|
|
f6b05ed42b | ||
|
|
095334d338 | ||
|
|
dac0ef178d | ||
|
|
c23a502e9e | ||
|
|
5ddd652076 | ||
|
|
3f9e3f620d | ||
|
|
1c62fe9615 | ||
|
|
8703102c97 | ||
|
|
28ab591769 | ||
|
|
8cc2bfbced | ||
|
|
7612dde6d4 | ||
|
|
5188fe7170 | ||
|
|
c31048e829 | ||
|
|
44629bb405 |
No files matched your search
+4
-6
@@ -1,5 +1,3 @@
|
||||
import com.android.build.gradle.internal.tasks.DefaultAndroidTask
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'android-chinese-string'
|
||||
|
||||
@@ -10,8 +8,8 @@ android {
|
||||
applicationId "com.hippo.ehviewer"
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 27
|
||||
versionCode 81
|
||||
versionName "1.0.28"
|
||||
versionCode 83
|
||||
versionName "1.0.30"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
resConfigs "zh", "zh-rCN", "zh-rHK", "zh-rTW",
|
||||
"es", "ja", "ko"
|
||||
@@ -52,7 +50,7 @@ task copyNotice(type: Copy) {
|
||||
finalizedBy ":daogenerator:executeDaoGenerator"
|
||||
}
|
||||
|
||||
tasks.withType(DefaultAndroidTask) {
|
||||
tasks.withType(JavaCompile) {
|
||||
task -> task.dependsOn copyNotice
|
||||
}
|
||||
|
||||
@@ -81,7 +79,7 @@ dependencies {
|
||||
implementation 'com.github.seven332:ripple:0.1.2'
|
||||
implementation 'com.github.seven332:streampipe:0.1.0'
|
||||
implementation 'com.github.seven332:tuxiang:0.1.2'
|
||||
implementation 'com.github.seven332:unifile:0.2.0'
|
||||
implementation 'com.github.seven332:unifile:b59c14e47b'
|
||||
implementation 'com.github.seven332:yorozuya:0.1.2'
|
||||
implementation 'com.github.seven332:yorozuya-thread:0.1.1'
|
||||
implementation 'com.github.seven332:yorozuya-collect:0.1.4'
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<shortcut
|
||||
android:shortcutId="start_all"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/ic_shortcut_start"
|
||||
android:shortcutShortLabel="@string/download_start_all"
|
||||
android:shortcutLongLabel="@string/download_start_all"
|
||||
android:shortcutDisabledMessage="@string/download_start_all">
|
||||
<intent
|
||||
android:action="start_all"
|
||||
android:targetPackage="com.hippo.ehviewer.debug"
|
||||
android:targetClass="com.hippo.ehviewer.shortcuts.ShortcutsActivity"/>
|
||||
<categories android:name="android.shortcut.conversation" />
|
||||
</shortcut>
|
||||
|
||||
<shortcut
|
||||
android:shortcutId="stop_all"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/ic_shortcut_stop"
|
||||
android:shortcutShortLabel="@string/download_stop_all"
|
||||
android:shortcutLongLabel="@string/download_stop_all"
|
||||
android:shortcutDisabledMessage="@string/download_stop_all">
|
||||
<intent
|
||||
android:action="stop_all"
|
||||
android:targetPackage="com.hippo.ehviewer.debug"
|
||||
android:targetClass="com.hippo.ehviewer.shortcuts.ShortcutsActivity" />
|
||||
<categories android:name="android.shortcut.conversation" />
|
||||
</shortcut>
|
||||
|
||||
</shortcuts>
|
||||
@@ -48,6 +48,9 @@
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
|
||||
<meta-data android:name="android.app.shortcuts"
|
||||
android:resource="@xml/shortcuts" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
@@ -144,6 +147,14 @@
|
||||
android:theme="@style/AppTheme.NoActionBar"
|
||||
android:label="@string/hosts"/>
|
||||
|
||||
<activity
|
||||
android:name="com.hippo.ehviewer.shortcuts.ShortcutsActivity"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||
android:excludeFromRecents="true"
|
||||
android:taskAffinity=""
|
||||
android:launchMode="singleTask">
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name="com.hippo.ehviewer.download.DownloadService"
|
||||
android:label="@string/download_service_label"/>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2018 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.content;
|
||||
|
||||
/*
|
||||
* Created by Hippo on 2018/3/27.
|
||||
*/
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.ContextWrapper;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Build;
|
||||
import android.os.LocaleList;
|
||||
import java.util.Locale;
|
||||
|
||||
public class ContextLocalWrapper extends ContextWrapper {
|
||||
|
||||
public ContextLocalWrapper(Context base) {
|
||||
super(base);
|
||||
}
|
||||
|
||||
public static ContextLocalWrapper wrap(Context context, Locale newLocale) {
|
||||
Resources res = context.getResources();
|
||||
Configuration configuration = res.getConfiguration();
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
|
||||
configuration.setLocale(newLocale);
|
||||
|
||||
LocaleList localeList = new LocaleList(newLocale);
|
||||
LocaleList.setDefault(localeList);
|
||||
configuration.setLocales(localeList);
|
||||
|
||||
context = context.createConfigurationContext(configuration);
|
||||
|
||||
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
|
||||
configuration.setLocale(newLocale);
|
||||
context = context.createConfigurationContext(configuration);
|
||||
|
||||
} else {
|
||||
configuration.locale = newLocale;
|
||||
res.updateConfiguration(configuration, res.getDisplayMetrics());
|
||||
}
|
||||
|
||||
return new ContextLocalWrapper(context);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright 2018 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.content;
|
||||
|
||||
/*
|
||||
* Created by Hippo on 2018/3/27.
|
||||
*/
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import com.hippo.scene.SceneApplication;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class RecordingApplication extends SceneApplication {
|
||||
|
||||
private List<WeakReference<Activity>> list = new LinkedList<>();
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
|
||||
registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() {
|
||||
@Override
|
||||
public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
|
||||
list.add(new java.lang.ref.WeakReference<>(activity));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityDestroyed(Activity activity) {
|
||||
Iterator<WeakReference<Activity>> iterator = list.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
WeakReference<Activity> reference = iterator.next();
|
||||
Activity a = reference.get();
|
||||
// Remove current activity and null
|
||||
if (a == null || a == activity) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityStarted(Activity activity) {}
|
||||
|
||||
@Override
|
||||
public void onActivityResumed(Activity activity) {}
|
||||
|
||||
@Override
|
||||
public void onActivityPaused(Activity activity) {}
|
||||
|
||||
@Override
|
||||
public void onActivityStopped(Activity activity) {}
|
||||
|
||||
@Override
|
||||
public void onActivitySaveInstanceState(Activity activity, Bundle outState) {}
|
||||
});
|
||||
}
|
||||
|
||||
public void recreate() {
|
||||
// Copy list
|
||||
ArrayList<Activity> listCopy = new ArrayList<>(list.size());
|
||||
for (WeakReference<Activity> reference: list) {
|
||||
Activity activity = reference.get();
|
||||
if (activity == null) continue;
|
||||
listCopy.add(activity);
|
||||
}
|
||||
|
||||
// Finish all activities
|
||||
for (int i = listCopy.size() - 1; i >= 0; --i) {
|
||||
listCopy.get(i).recreate();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,9 +26,9 @@ import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.util.LruCache;
|
||||
import android.util.Log;
|
||||
|
||||
import com.hippo.beerbelly.SimpleDiskCache;
|
||||
import com.hippo.conaco.Conaco;
|
||||
import com.hippo.content.RecordingApplication;
|
||||
import com.hippo.ehviewer.client.EhClient;
|
||||
import com.hippo.ehviewer.client.EhCookieStore;
|
||||
import com.hippo.ehviewer.client.EhDns;
|
||||
@@ -40,7 +40,6 @@ import com.hippo.ehviewer.ui.CommonOperations;
|
||||
import com.hippo.image.Image;
|
||||
import com.hippo.image.ImageBitmap;
|
||||
import com.hippo.network.StatusCodeException;
|
||||
import com.hippo.scene.SceneApplication;
|
||||
import com.hippo.text.Html;
|
||||
import com.hippo.unifile.UniFile;
|
||||
import com.hippo.util.BitmapUtils;
|
||||
@@ -49,21 +48,20 @@ import com.hippo.yorozuya.FileUtils;
|
||||
import com.hippo.yorozuya.IntIdGenerator;
|
||||
import com.hippo.yorozuya.OSUtils;
|
||||
import com.hippo.yorozuya.SimpleHandler;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
public class EhApplication extends SceneApplication implements Thread.UncaughtExceptionHandler {
|
||||
public class EhApplication extends RecordingApplication implements Thread.UncaughtExceptionHandler {
|
||||
|
||||
private static final String TAG = EhApplication.class.getSimpleName();
|
||||
|
||||
public static final boolean BETA = false;
|
||||
public static final boolean AUTO_UPDATE = true;
|
||||
|
||||
private static final boolean DEBUG_CONACO = false;
|
||||
private static final boolean DEBUG_PRINT_NATIVE_MEMORY = false;
|
||||
@@ -149,6 +147,9 @@ public class EhApplication extends SceneApplication implements Thread.UncaughtEx
|
||||
if (null != dir) {
|
||||
FileUtils.deleteContent(dir);
|
||||
}
|
||||
|
||||
// Add .nomedia to external temp dir
|
||||
CommonOperations.ensureNoMediaFile(UniFile.fromFile(AppConfig.getExternalTempDir()));
|
||||
}
|
||||
|
||||
private void update() {
|
||||
|
||||
@@ -718,26 +718,42 @@ public class Settings {
|
||||
/********************
|
||||
****** Favorites
|
||||
********************/
|
||||
public static final String KEY_FAV_CAT_0 = "fav_cat_0";
|
||||
public static final String KEY_FAV_CAT_1 = "fav_cat_1";
|
||||
public static final String KEY_FAV_CAT_2 = "fav_cat_2";
|
||||
public static final String KEY_FAV_CAT_3 = "fav_cat_3";
|
||||
public static final String KEY_FAV_CAT_4 = "fav_cat_4";
|
||||
public static final String KEY_FAV_CAT_5 = "fav_cat_5";
|
||||
public static final String KEY_FAV_CAT_6 = "fav_cat_6";
|
||||
public static final String KEY_FAV_CAT_7 = "fav_cat_7";
|
||||
public static final String KEY_FAV_CAT_8 = "fav_cat_8";
|
||||
public static final String KEY_FAV_CAT_9 = "fav_cat_9";
|
||||
public static final String DEFAULT_FAV_CAT_0 = "Favorites 0";
|
||||
public static final String DEFAULT_FAV_CAT_1 = "Favorites 1";
|
||||
public static final String DEFAULT_FAV_CAT_2 = "Favorites 2";
|
||||
public static final String DEFAULT_FAV_CAT_3 = "Favorites 3";
|
||||
public static final String DEFAULT_FAV_CAT_4 = "Favorites 4";
|
||||
public static final String DEFAULT_FAV_CAT_5 = "Favorites 5";
|
||||
public static final String DEFAULT_FAV_CAT_6 = "Favorites 6";
|
||||
public static final String DEFAULT_FAV_CAT_7 = "Favorites 7";
|
||||
public static final String DEFAULT_FAV_CAT_8 = "Favorites 8";
|
||||
public static final String DEFAULT_FAV_CAT_9 = "Favorites 9";
|
||||
private static final String KEY_FAV_CAT_0 = "fav_cat_0";
|
||||
private static final String KEY_FAV_CAT_1 = "fav_cat_1";
|
||||
private static final String KEY_FAV_CAT_2 = "fav_cat_2";
|
||||
private static final String KEY_FAV_CAT_3 = "fav_cat_3";
|
||||
private static final String KEY_FAV_CAT_4 = "fav_cat_4";
|
||||
private static final String KEY_FAV_CAT_5 = "fav_cat_5";
|
||||
private static final String KEY_FAV_CAT_6 = "fav_cat_6";
|
||||
private static final String KEY_FAV_CAT_7 = "fav_cat_7";
|
||||
private static final String KEY_FAV_CAT_8 = "fav_cat_8";
|
||||
private static final String KEY_FAV_CAT_9 = "fav_cat_9";
|
||||
private static final String DEFAULT_FAV_CAT_0 = "Favorites 0";
|
||||
private static final String DEFAULT_FAV_CAT_1 = "Favorites 1";
|
||||
private static final String DEFAULT_FAV_CAT_2 = "Favorites 2";
|
||||
private static final String DEFAULT_FAV_CAT_3 = "Favorites 3";
|
||||
private static final String DEFAULT_FAV_CAT_4 = "Favorites 4";
|
||||
private static final String DEFAULT_FAV_CAT_5 = "Favorites 5";
|
||||
private static final String DEFAULT_FAV_CAT_6 = "Favorites 6";
|
||||
private static final String DEFAULT_FAV_CAT_7 = "Favorites 7";
|
||||
private static final String DEFAULT_FAV_CAT_8 = "Favorites 8";
|
||||
private static final String DEFAULT_FAV_CAT_9 = "Favorites 9";
|
||||
|
||||
private static final String KEY_FAV_COUNT_0 = "fav_count_0";
|
||||
private static final String KEY_FAV_COUNT_1 = "fav_count_1";
|
||||
private static final String KEY_FAV_COUNT_2 = "fav_count_2";
|
||||
private static final String KEY_FAV_COUNT_3 = "fav_count_3";
|
||||
private static final String KEY_FAV_COUNT_4 = "fav_count_4";
|
||||
private static final String KEY_FAV_COUNT_5 = "fav_count_5";
|
||||
private static final String KEY_FAV_COUNT_6 = "fav_count_6";
|
||||
private static final String KEY_FAV_COUNT_7 = "fav_count_7";
|
||||
private static final String KEY_FAV_COUNT_8 = "fav_count_8";
|
||||
private static final String KEY_FAV_COUNT_9 = "fav_count_9";
|
||||
|
||||
private static final String KEY_FAV_LOCAL = "fav_local";
|
||||
private static final String KEY_FAV_CLOUD = "fav_cloud";
|
||||
|
||||
private static final int DEFAULT_FAV_COUNT = 0;
|
||||
|
||||
public static String[] getFavCat() {
|
||||
String[] favCat = new String[10];
|
||||
@@ -770,6 +786,53 @@ public class Settings {
|
||||
.apply();
|
||||
}
|
||||
|
||||
public static int[] getFavCount() {
|
||||
int[] favCount = new int[10];
|
||||
favCount[0] = sSettingsPre.getInt(KEY_FAV_COUNT_0, DEFAULT_FAV_COUNT);
|
||||
favCount[1] = sSettingsPre.getInt(KEY_FAV_COUNT_1, DEFAULT_FAV_COUNT);
|
||||
favCount[2] = sSettingsPre.getInt(KEY_FAV_COUNT_2, DEFAULT_FAV_COUNT);
|
||||
favCount[3] = sSettingsPre.getInt(KEY_FAV_COUNT_3, DEFAULT_FAV_COUNT);
|
||||
favCount[4] = sSettingsPre.getInt(KEY_FAV_COUNT_4, DEFAULT_FAV_COUNT);
|
||||
favCount[5] = sSettingsPre.getInt(KEY_FAV_COUNT_5, DEFAULT_FAV_COUNT);
|
||||
favCount[6] = sSettingsPre.getInt(KEY_FAV_COUNT_6, DEFAULT_FAV_COUNT);
|
||||
favCount[7] = sSettingsPre.getInt(KEY_FAV_COUNT_7, DEFAULT_FAV_COUNT);
|
||||
favCount[8] = sSettingsPre.getInt(KEY_FAV_COUNT_8, DEFAULT_FAV_COUNT);
|
||||
favCount[9] = sSettingsPre.getInt(KEY_FAV_COUNT_9, DEFAULT_FAV_COUNT);
|
||||
return favCount;
|
||||
}
|
||||
|
||||
public static void putFavCount(int[] count) {
|
||||
Assert.assertEquals(10, count.length);
|
||||
sSettingsPre.edit()
|
||||
.putInt(KEY_FAV_COUNT_0, count[0])
|
||||
.putInt(KEY_FAV_COUNT_1, count[1])
|
||||
.putInt(KEY_FAV_COUNT_2, count[2])
|
||||
.putInt(KEY_FAV_COUNT_3, count[3])
|
||||
.putInt(KEY_FAV_COUNT_4, count[4])
|
||||
.putInt(KEY_FAV_COUNT_5, count[5])
|
||||
.putInt(KEY_FAV_COUNT_6, count[6])
|
||||
.putInt(KEY_FAV_COUNT_7, count[7])
|
||||
.putInt(KEY_FAV_COUNT_8, count[8])
|
||||
.putInt(KEY_FAV_COUNT_9, count[9])
|
||||
.apply();
|
||||
}
|
||||
|
||||
public static int getFavLocalCount() {
|
||||
return sSettingsPre.getInt(KEY_FAV_LOCAL, DEFAULT_FAV_COUNT);
|
||||
}
|
||||
|
||||
public static void putFavLocalCount(int count) {
|
||||
sSettingsPre.edit().putInt(KEY_FAV_LOCAL, count).apply();
|
||||
}
|
||||
|
||||
public static int getFavCloudCount() {
|
||||
return sSettingsPre.getInt(KEY_FAV_CLOUD, DEFAULT_FAV_COUNT);
|
||||
}
|
||||
|
||||
public static void putFavCloudCount(int count) {
|
||||
sSettingsPre.edit().putInt(KEY_FAV_CLOUD, count).apply();
|
||||
}
|
||||
|
||||
private static final String KEY_RECENT_FAV_CAT = "recent_fav_cat";
|
||||
private static final int DEFAULT_RECENT_FAV_CAT = FavListUrlBuilder.FAV_CAT_ALL;
|
||||
|
||||
@@ -886,6 +949,8 @@ public class Settings {
|
||||
********************/
|
||||
private static final String KEY_BETA_UPDATE_CHANNEL = "beta_update_channel";
|
||||
private static final boolean DEFAULT_BETA_UPDATE_CHANNEL = EhApplication.BETA;
|
||||
private static final String KEY_AUTO_CHECK_FOR_UPDATES = "auto_check_for_updates";
|
||||
private static final boolean DEFAULT_AUTO_CHECK_FOR_UPDATES = EhApplication.AUTO_UPDATE;
|
||||
|
||||
public static boolean getBetaUpdateChannel() {
|
||||
return getBoolean(KEY_BETA_UPDATE_CHANNEL, DEFAULT_BETA_UPDATE_CHANNEL);
|
||||
@@ -895,6 +960,10 @@ public class Settings {
|
||||
putBoolean(KEY_BETA_UPDATE_CHANNEL, value);
|
||||
}
|
||||
|
||||
public static boolean getAutoCheckUpdateEnable() {
|
||||
return getBoolean(KEY_AUTO_CHECK_FOR_UPDATES, DEFAULT_AUTO_CHECK_FOR_UPDATES);
|
||||
}
|
||||
|
||||
/********************
|
||||
****** Crash
|
||||
********************/
|
||||
@@ -963,6 +1032,17 @@ public class Settings {
|
||||
putBoolean(KEY_BUILT_IN_HOSTS, value);
|
||||
}
|
||||
|
||||
public static final String KEY_APP_LANGUAGE = "app_language";
|
||||
private static final String DEFAULT_APP_LANGUAGE = "system";
|
||||
|
||||
public static String getAppLanguage() {
|
||||
return getString(KEY_APP_LANGUAGE, DEFAULT_APP_LANGUAGE);
|
||||
}
|
||||
|
||||
public static void putAppLanguage(String value) {
|
||||
putString(KEY_APP_LANGUAGE, value);
|
||||
}
|
||||
|
||||
/********************
|
||||
****** Guide
|
||||
********************/
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright 2018 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.shortcuts;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.hippo.ehviewer.download.DownloadService;
|
||||
|
||||
/**
|
||||
* Created by onlymash on 3/25/18.
|
||||
*/
|
||||
|
||||
public class ShortcutsActivity extends Activity{
|
||||
public void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
String action = null;
|
||||
Intent intent = getIntent();
|
||||
if (intent != null){
|
||||
action = intent.getAction();
|
||||
if (action != null && (action.equals(DownloadService.ACTION_START_ALL) ||
|
||||
action.equals(DownloadService.ACTION_STOP_ALL))){
|
||||
startService(new Intent(this, DownloadService.class).setAction(action));
|
||||
}
|
||||
}
|
||||
finish();
|
||||
}
|
||||
}
|
||||
@@ -430,11 +430,11 @@ public final class SpiderQueen implements Runnable {
|
||||
}
|
||||
|
||||
public Object forceRequest(int index) {
|
||||
return request(index, true, false);
|
||||
return request(index, true, true, false);
|
||||
}
|
||||
|
||||
public Object request(int index) {
|
||||
return request(index, false, true);
|
||||
return request(index, true, false, true);
|
||||
}
|
||||
|
||||
private int getPageState(int index) {
|
||||
@@ -483,7 +483,7 @@ public final class SpiderQueen implements Runnable {
|
||||
* Float for download percent<br>
|
||||
* null for wait
|
||||
*/
|
||||
private Object request(int index, boolean force, boolean addNeighbor) {
|
||||
private Object request(int index, boolean ignoreError, boolean force, boolean addNeighbor) {
|
||||
if (mQueenThread == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -492,7 +492,8 @@ public final class SpiderQueen implements Runnable {
|
||||
int state = getPageState(index);
|
||||
|
||||
// Fix state for force
|
||||
if (force && (state == STATE_FINISHED || state == STATE_FAILED)) {
|
||||
if ((force && (state == STATE_FINISHED || state == STATE_FAILED)) ||
|
||||
(ignoreError && state == STATE_FAILED)) {
|
||||
// Update state to none at once
|
||||
updatePageState(index, STATE_NONE);
|
||||
state = STATE_NONE;
|
||||
@@ -518,7 +519,7 @@ public final class SpiderQueen implements Runnable {
|
||||
} else {
|
||||
size = Integer.MAX_VALUE;
|
||||
}
|
||||
for (int i = index + 1, n = index + i + mPreloadNumber; i < n && i < size; i++) {
|
||||
for (int i = index + 1, n = index + 1 + mPreloadNumber; i < n && i < size; i++) {
|
||||
if (STATE_NONE == getPageState(i)) {
|
||||
mRequestPageQueue2.add(i);
|
||||
}
|
||||
@@ -713,10 +714,13 @@ public final class SpiderQueen implements Runnable {
|
||||
spiderInfo.pages = GalleryDetailParser.parsePages(body);
|
||||
spiderInfo.previewPages = GalleryDetailParser.parsePreviewPages(body);
|
||||
PreviewSet previewSet = GalleryDetailParser.parsePreviewSet(body);
|
||||
if ((index >= 0 && index < spiderInfo.pages - 1) || (index == 0 && spiderInfo.pages == 1)) {
|
||||
spiderInfo.previewPerPage = previewSet.size();
|
||||
} else {
|
||||
spiderInfo.previewPerPage = Math.max(spiderInfo.previewPerPage, previewSet.size());
|
||||
|
||||
if (previewSet.size() > 0) {
|
||||
if (index == 0) {
|
||||
spiderInfo.previewPerPage = previewSet.size();
|
||||
} else {
|
||||
spiderInfo.previewPerPage = previewSet.getPosition(0) / index;
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0, n = previewSet.size(); i < n; i++) {
|
||||
@@ -762,6 +766,9 @@ public final class SpiderQueen implements Runnable {
|
||||
} else {
|
||||
previewIndex = 0;
|
||||
}
|
||||
if (spiderInfo.previewPages > 0) {
|
||||
previewIndex = Math.min(previewIndex, spiderInfo.previewPages - 1);
|
||||
}
|
||||
|
||||
try {
|
||||
String url = EhUrl.getGalleryDetailUrl(
|
||||
@@ -1048,6 +1055,8 @@ public final class SpiderQueen implements Runnable {
|
||||
boolean interrupt = false;
|
||||
boolean leakSkipHathKey = false;
|
||||
|
||||
Log.d("TAG", "index = " + index);
|
||||
|
||||
// Try twice
|
||||
for (int i = 0; i < 5; i++) {
|
||||
if (leakSkipHathKey) {
|
||||
@@ -1400,7 +1409,7 @@ public final class SpiderQueen implements Runnable {
|
||||
// Can't find the file, it might be removed from cache,
|
||||
// Reset it state and request it
|
||||
updatePageState(index, STATE_NONE, null);
|
||||
request(index, false, false);
|
||||
request(index, false, false, false);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -206,6 +206,12 @@ public final class CommonOperations {
|
||||
}
|
||||
}, activity.getString(R.string.remember_favorite_collection), false)
|
||||
.setTitle(R.string.add_favorites_dialog_title)
|
||||
.setOnCancelListener(new DialogInterface.OnCancelListener() {
|
||||
@Override
|
||||
public void onCancel(DialogInterface dialog) {
|
||||
listener.onCancel();
|
||||
}
|
||||
})
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,15 +16,16 @@
|
||||
|
||||
package com.hippo.ehviewer.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.util.Log;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.google.analytics.tracking.android.EasyTracker;
|
||||
import com.hippo.content.ContextLocalWrapper;
|
||||
import com.hippo.ehviewer.EhApplication;
|
||||
import com.hippo.ehviewer.Settings;
|
||||
import java.util.Locale;
|
||||
|
||||
public abstract class EhActivity extends AppCompatActivity {
|
||||
|
||||
@@ -74,4 +75,26 @@ public abstract class EhActivity extends AppCompatActivity {
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void attachBaseContext(Context newBase) {
|
||||
Locale locale = null;
|
||||
String language = Settings.getAppLanguage();
|
||||
if (language != null && !language.equals("system")) {
|
||||
String[] split = language.split("-");
|
||||
if (split.length == 1) {
|
||||
locale = new Locale(split[0]);
|
||||
} else if (split.length == 2) {
|
||||
locale = new Locale(split[0], split[1]);
|
||||
} else if (split.length == 3) {
|
||||
locale = new Locale(split[0], split[1], split[2]);
|
||||
}
|
||||
}
|
||||
|
||||
if (locale != null) {
|
||||
newBase = ContextLocalWrapper.wrap(newBase, locale);
|
||||
}
|
||||
|
||||
super.attachBaseContext(newBase);
|
||||
}
|
||||
}
|
||||
@@ -16,15 +16,17 @@
|
||||
|
||||
package com.hippo.ehviewer.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.util.Log;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import com.google.analytics.tracking.android.EasyTracker;
|
||||
import com.hippo.app.AppCompatPreferenceActivity;
|
||||
import com.hippo.content.ContextLocalWrapper;
|
||||
import com.hippo.ehviewer.EhApplication;
|
||||
import com.hippo.ehviewer.Settings;
|
||||
import java.util.Locale;
|
||||
|
||||
public abstract class EhPreferenceActivity extends AppCompatPreferenceActivity {
|
||||
|
||||
@@ -74,4 +76,27 @@ public abstract class EhPreferenceActivity extends AppCompatPreferenceActivity {
|
||||
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void attachBaseContext(Context newBase) {
|
||||
Locale locale = null;
|
||||
String language = Settings.getAppLanguage();
|
||||
if (language != null && !language.equals("system")) {
|
||||
String[] split = language.split("-");
|
||||
if (split.length == 1) {
|
||||
locale = new Locale(split[0]);
|
||||
} else if (split.length == 2) {
|
||||
locale = new Locale(split[0], split[1]);
|
||||
} else if (split.length == 3) {
|
||||
locale = new Locale(split[0], split[1], split[2]);
|
||||
}
|
||||
}
|
||||
|
||||
if (locale == null) {
|
||||
locale = Resources.getSystem().getConfiguration().locale;
|
||||
}
|
||||
|
||||
newBase = ContextLocalWrapper.wrap(newBase, locale);
|
||||
super.attachBaseContext(newBase);
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import android.animation.Animator;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
@@ -69,6 +70,7 @@ import com.hippo.util.SystemUiHelper;
|
||||
import com.hippo.widget.ColorView;
|
||||
import com.hippo.yorozuya.AnimationUtils;
|
||||
import com.hippo.yorozuya.ConcurrentPool;
|
||||
import com.hippo.yorozuya.IOUtils;
|
||||
import com.hippo.yorozuya.MathUtils;
|
||||
import com.hippo.yorozuya.ResourcesUtils;
|
||||
import com.hippo.yorozuya.SimpleAnimatorListener;
|
||||
@@ -76,6 +78,10 @@ import com.hippo.yorozuya.SimpleHandler;
|
||||
import com.hippo.yorozuya.ViewUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChangeListener,
|
||||
GalleryView.Listener {
|
||||
@@ -94,11 +100,14 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
|
||||
private static final long SLIDER_ANIMATION_DURING = 150;
|
||||
private static final long HIDE_SLIDER_DELAY = 3000;
|
||||
|
||||
private static final int WRITE_REQUEST_CODE = 43;
|
||||
|
||||
private String mAction;
|
||||
private String mFilename;
|
||||
private Uri mUri;
|
||||
private GalleryInfo mGalleryInfo;
|
||||
private int mPage;
|
||||
private String mCacheFileName;
|
||||
|
||||
@Nullable
|
||||
private GLRootView mGLRootView;
|
||||
@@ -837,7 +846,7 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
|
||||
return;
|
||||
}
|
||||
|
||||
File dir = AppConfig.getExternalImageDir();
|
||||
File dir = AppConfig.getExternalTempDir();
|
||||
if (null == dir) {
|
||||
Toast.makeText(this, R.string.error_cant_create_temp_file, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
@@ -862,17 +871,15 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
|
||||
Uri uri = new Uri.Builder()
|
||||
.scheme(ContentResolver.SCHEME_CONTENT)
|
||||
.authority(BuildConfig.FILE_PROVIDER_AUTHORITY)
|
||||
.appendPath("image")
|
||||
.appendPath("temp")
|
||||
.appendPath(filename)
|
||||
.build();
|
||||
|
||||
Intent intent = new Intent();
|
||||
intent.setAction(Intent.ACTION_SEND);
|
||||
intent.putExtra(Intent.EXTRA_STREAM, uri);
|
||||
intent.setType(mimeType);
|
||||
startActivity(Intent.createChooser(intent, getString(R.string.share_image)));
|
||||
|
||||
// Sync media store
|
||||
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, file.getUri()));
|
||||
}
|
||||
|
||||
private void saveImage(int page) {
|
||||
@@ -897,32 +904,107 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
|
||||
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, file.getUri()));
|
||||
}
|
||||
|
||||
private void saveImageTo(int page) {
|
||||
if (null == mGalleryProvider) {
|
||||
return;
|
||||
}
|
||||
File dir = getCacheDir();
|
||||
UniFile file;
|
||||
if (null == (file = mGalleryProvider.save(page, UniFile.fromFile(dir), mGalleryProvider.getImageFilename(page)))) {
|
||||
Toast.makeText(this, R.string.error_cant_save_image, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
String filename = file.getName();
|
||||
if (filename == null) {
|
||||
Toast.makeText(this, R.string.error_cant_save_image, Toast.LENGTH_SHORT).show();
|
||||
return;
|
||||
}
|
||||
mCacheFileName = filename;
|
||||
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
|
||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||
intent.setType("image/*");
|
||||
intent.putExtra(Intent.EXTRA_TITLE, filename);
|
||||
startActivityForResult(intent, WRITE_REQUEST_CODE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, Intent resultData) {
|
||||
if (requestCode == WRITE_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
|
||||
if (resultData != null){
|
||||
Uri uri = resultData.getData();
|
||||
String filepath = getCacheDir() + "/" + mCacheFileName;
|
||||
File cachefile = new File(filepath);
|
||||
|
||||
InputStream is = null;
|
||||
OutputStream os = null;
|
||||
ContentResolver resolver = getContentResolver();
|
||||
|
||||
try {
|
||||
is = new FileInputStream(cachefile);
|
||||
os = resolver.openOutputStream(uri);
|
||||
IOUtils.copy(is, os);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
IOUtils.closeQuietly(is);
|
||||
IOUtils.closeQuietly(os);
|
||||
}
|
||||
|
||||
cachefile.delete();
|
||||
|
||||
Toast.makeText(this, getString(R.string.image_saved, uri.getPath()), Toast.LENGTH_SHORT).show();
|
||||
// Sync media store
|
||||
sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void showPageDialog(final int page) {
|
||||
Resources resources = GalleryActivity.this.getResources();
|
||||
new AlertDialog.Builder(GalleryActivity.this)
|
||||
.setTitle(resources.getString(R.string.page_menu_title, page + 1))
|
||||
.setItems(R.array.page_menu_entries, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (mGalleryProvider == null) {
|
||||
return;
|
||||
}
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(GalleryActivity.this);
|
||||
builder.setTitle(resources.getString(R.string.page_menu_title, page + 1));
|
||||
|
||||
switch (which) {
|
||||
case 0: // Refresh
|
||||
mGalleryProvider.forceRequest(page);
|
||||
break;
|
||||
case 1: // Share
|
||||
shareImage(page);
|
||||
break;
|
||||
case 2: // Save
|
||||
saveImage(page);
|
||||
break;
|
||||
case 3: // Add a bookmark
|
||||
break;
|
||||
}
|
||||
}
|
||||
}).show();
|
||||
final CharSequence[] items;
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
|
||||
items = new CharSequence[]{
|
||||
getString(R.string.page_menu_refresh),
|
||||
getString(R.string.page_menu_share),
|
||||
getString(R.string.page_menu_save),
|
||||
getString(R.string.page_menu_save_to)};
|
||||
}else {
|
||||
items = new CharSequence[]{
|
||||
getString(R.string.page_menu_refresh),
|
||||
getString(R.string.page_menu_share),
|
||||
getString(R.string.page_menu_save)};
|
||||
}
|
||||
pageDialogListener(builder, items, page);
|
||||
builder.show();
|
||||
}
|
||||
|
||||
private void pageDialogListener(AlertDialog.Builder builder, CharSequence[] items, int page){
|
||||
builder.setItems(items, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
if (mGalleryProvider == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (which) {
|
||||
case 0: // Refresh
|
||||
mGalleryProvider.forceRequest(page);
|
||||
break;
|
||||
case 1: // Share
|
||||
shareImage(page);
|
||||
break;
|
||||
case 2: // Save
|
||||
saveImage(page);
|
||||
break;
|
||||
case 3: // Save to
|
||||
saveImageTo(page);
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private class NotifyTask implements Runnable {
|
||||
|
||||
@@ -331,7 +331,9 @@ public final class MainActivity extends StageActivity
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
onInit();
|
||||
CommonOperations.checkUpdate(this, false);
|
||||
if (Settings.getAutoCheckUpdateEnable()) {
|
||||
CommonOperations.checkUpdate(this, false);
|
||||
}
|
||||
checkDownloadLocation();
|
||||
if (Settings.getCellularNetworkWarning()) {
|
||||
checkCellularNetwork();
|
||||
|
||||
@@ -24,24 +24,24 @@ import android.content.res.Resources;
|
||||
import android.os.Bundle;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceFragment;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.hippo.ehviewer.AppConfig;
|
||||
import com.hippo.ehviewer.EhApplication;
|
||||
import com.hippo.ehviewer.EhDB;
|
||||
import com.hippo.ehviewer.R;
|
||||
import com.hippo.ehviewer.Settings;
|
||||
import com.hippo.util.LogCat;
|
||||
import com.hippo.util.ReadableTime;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class AdvancedFragment extends PreferenceFragment implements Preference.OnPreferenceClickListener {
|
||||
public class AdvancedFragment extends PreferenceFragment
|
||||
implements Preference.OnPreferenceClickListener, Preference.OnPreferenceChangeListener {
|
||||
|
||||
private static final String KEY_DUMP_LOGCAT = "dump_logcat";
|
||||
private static final String KEY_CLEAR_MEMORY_CACHE = "clear_memory_cache";
|
||||
private static final String KEY_APP_LANGUAGE = "app_language";
|
||||
private static final String KEY_EXPORT_DATA = "export_data";
|
||||
private static final String KEY_IMPORT_DATA = "import_data";
|
||||
|
||||
@@ -52,6 +52,7 @@ public class AdvancedFragment extends PreferenceFragment implements Preference.O
|
||||
|
||||
Preference dumpLogcat = findPreference(KEY_DUMP_LOGCAT);
|
||||
Preference clearMemoryCache = findPreference(KEY_CLEAR_MEMORY_CACHE);
|
||||
Preference appLanguage = findPreference(KEY_APP_LANGUAGE);
|
||||
Preference exportData = findPreference(KEY_EXPORT_DATA);
|
||||
Preference importData = findPreference(KEY_IMPORT_DATA);
|
||||
|
||||
@@ -59,6 +60,8 @@ public class AdvancedFragment extends PreferenceFragment implements Preference.O
|
||||
clearMemoryCache.setOnPreferenceClickListener(this);
|
||||
exportData.setOnPreferenceClickListener(this);
|
||||
importData.setOnPreferenceClickListener(this);
|
||||
|
||||
appLanguage.setOnPreferenceChangeListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -131,4 +134,14 @@ public class AdvancedFragment extends PreferenceFragment implements Preference.O
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceChange(Preference preference, Object newValue) {
|
||||
String key = preference.getKey();
|
||||
if (KEY_APP_LANGUAGE.equals(key)) {
|
||||
((EhApplication) getActivity().getApplication()).recreate();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -196,12 +196,6 @@ public class CookieSignInScene extends SolidScene implements EditText.OnEditorAc
|
||||
} else {
|
||||
mIpbPassHashLayout.setError(null);
|
||||
}
|
||||
if (TextUtils.isEmpty(igneous)) {
|
||||
mIgneousLayout.setError(getString(R.string.text_is_empty));
|
||||
return;
|
||||
} else {
|
||||
mIgneousLayout.setError(null);
|
||||
}
|
||||
|
||||
hideSoftInput();
|
||||
|
||||
@@ -242,7 +236,9 @@ public class CookieSignInScene extends SolidScene implements EditText.OnEditorAc
|
||||
store.addCookie(newCookie(EhCookieStore.KEY_IPD_MEMBER_ID, id, EhUrl.DOMAIN_EX));
|
||||
store.addCookie(newCookie(EhCookieStore.KEY_IPD_PASS_HASH, hash, EhUrl.DOMAIN_E));
|
||||
store.addCookie(newCookie(EhCookieStore.KEY_IPD_PASS_HASH, hash, EhUrl.DOMAIN_EX));
|
||||
store.addCookie(newCookie(EhCookieStore.KEY_IGNEOUS, igneous, EhUrl.DOMAIN_E));
|
||||
store.addCookie(newCookie(EhCookieStore.KEY_IGNEOUS, igneous, EhUrl.DOMAIN_EX));
|
||||
if (!igneous.isEmpty()) {
|
||||
store.addCookie(newCookie(EhCookieStore.KEY_IGNEOUS, igneous, EhUrl.DOMAIN_E));
|
||||
store.addCookie(newCookie(EhCookieStore.KEY_IGNEOUS, igneous, EhUrl.DOMAIN_EX));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -635,7 +635,7 @@ public class DownloadsScene extends ToolbarScene
|
||||
if (list == null) {
|
||||
return false;
|
||||
}
|
||||
if (position < 0 && position >= list.size()) {
|
||||
if (position < 0 || position >= list.size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1092,7 +1092,7 @@ public class DownloadsScene extends ToolbarScene
|
||||
}
|
||||
int size = list.size();
|
||||
int index = recyclerView.getChildAdapterPosition(itemView);
|
||||
if (index < 0 && index >= size) {
|
||||
if (index < 0 || index >= size) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import android.support.annotation.Nullable;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.v4.widget.DrawerLayout;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.support.v7.widget.DividerItemDecoration;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
import android.support.v7.widget.RecyclerView;
|
||||
import android.support.v7.widget.Toolbar;
|
||||
@@ -43,9 +44,6 @@ import android.view.LayoutInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.github.amlcurran.showcaseview.ShowcaseView;
|
||||
@@ -55,7 +53,6 @@ import com.hippo.annotation.Implemented;
|
||||
import com.hippo.drawable.DrawerArrowDrawable;
|
||||
import com.hippo.easyrecyclerview.EasyRecyclerView;
|
||||
import com.hippo.easyrecyclerview.FastScroller;
|
||||
import com.hippo.easyrecyclerview.LinearDividerItemDecoration;
|
||||
import com.hippo.ehviewer.EhApplication;
|
||||
import com.hippo.ehviewer.EhDB;
|
||||
import com.hippo.ehviewer.R;
|
||||
@@ -70,6 +67,7 @@ import com.hippo.ehviewer.ui.MainActivity;
|
||||
import com.hippo.ehviewer.ui.annotation.DrawerLifeCircle;
|
||||
import com.hippo.ehviewer.ui.annotation.ViewLifeCircle;
|
||||
import com.hippo.ehviewer.ui.annotation.WholeLifeCircle;
|
||||
import com.hippo.ehviewer.widget.EhDrawerLayout;
|
||||
import com.hippo.ehviewer.widget.SearchBar;
|
||||
import com.hippo.refreshlayout.RefreshLayout;
|
||||
import com.hippo.ripple.Ripple;
|
||||
@@ -80,9 +78,7 @@ import com.hippo.util.DrawableManager;
|
||||
import com.hippo.widget.ContentLayout;
|
||||
import com.hippo.widget.FabLayout;
|
||||
import com.hippo.widget.SearchBarMover;
|
||||
import com.hippo.yorozuya.LayoutUtils;
|
||||
import com.hippo.yorozuya.ObjectUtils;
|
||||
import com.hippo.yorozuya.ResourcesUtils;
|
||||
import com.hippo.yorozuya.SimpleHandler;
|
||||
import com.hippo.yorozuya.ViewUtils;
|
||||
|
||||
@@ -96,7 +92,7 @@ import java.util.List;
|
||||
public class FavoritesScene extends BaseScene implements
|
||||
EasyRecyclerView.OnItemClickListener, EasyRecyclerView.OnItemLongClickListener,
|
||||
FastScroller.OnDragHandlerListener, SearchBarMover.Helper, SearchBar.Helper,
|
||||
FabLayout.OnClickFabListener, EasyRecyclerView.CustomChoiceListener, AdapterView.OnItemClickListener {
|
||||
FabLayout.OnClickFabListener, EasyRecyclerView.CustomChoiceListener {
|
||||
|
||||
private static final long ANIMATE_TIME = 300L;
|
||||
|
||||
@@ -129,12 +125,11 @@ public class FavoritesScene extends BaseScene implements
|
||||
private DrawerArrowDrawable mLeftDrawable;
|
||||
|
||||
@Nullable
|
||||
@DrawerLifeCircle
|
||||
private ArrayAdapter<String> mDrawerAdapter;
|
||||
private EhDrawerLayout mDrawerLayout;
|
||||
|
||||
@Nullable
|
||||
@DrawerLifeCircle
|
||||
private List<String> mDrawerList;
|
||||
|
||||
private FavDrawerAdapter mDrawerAdapter;
|
||||
@Nullable
|
||||
@WholeLifeCircle
|
||||
private EhClient mClient;
|
||||
@@ -143,13 +138,16 @@ public class FavoritesScene extends BaseScene implements
|
||||
private String[] mFavCatArray;
|
||||
@Nullable
|
||||
@WholeLifeCircle
|
||||
private int[] mFavCountArray;
|
||||
@Nullable
|
||||
@WholeLifeCircle
|
||||
private FavListUrlBuilder mUrlBuilder;
|
||||
|
||||
public int current; // -1 for error
|
||||
public int limit; // -1 for error
|
||||
|
||||
@Nullable
|
||||
private int[] mFavCountArray;
|
||||
private int mFavLocalCount = 0;
|
||||
private int mFavCountSum = 0;
|
||||
|
||||
private boolean mHasFirstRefresh;
|
||||
private boolean mSearchMode;
|
||||
@@ -181,6 +179,9 @@ public class FavoritesScene extends BaseScene implements
|
||||
Assert.assertNotNull(context);
|
||||
mClient = EhApplication.getEhClient(context);
|
||||
mFavCatArray = Settings.getFavCat();
|
||||
mFavCountArray = Settings.getFavCount();
|
||||
mFavLocalCount = Settings.getFavLocalCount();
|
||||
mFavCountSum = Settings.getFavCloudCount();
|
||||
|
||||
if (savedInstanceState == null) {
|
||||
onInit();
|
||||
@@ -206,7 +207,7 @@ public class FavoritesScene extends BaseScene implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSaveInstanceState(Bundle outState) {
|
||||
public void onSaveInstanceState(@NonNull Bundle outState) {
|
||||
super.onSaveInstanceState(outState);
|
||||
|
||||
boolean hasFirstRefresh;
|
||||
@@ -227,6 +228,8 @@ public class FavoritesScene extends BaseScene implements
|
||||
|
||||
mClient = null;
|
||||
mFavCatArray = null;
|
||||
mFavCountArray = null;
|
||||
mFavCountSum = 0;
|
||||
mUrlBuilder = null;
|
||||
}
|
||||
|
||||
@@ -236,6 +239,9 @@ public class FavoritesScene extends BaseScene implements
|
||||
@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.scene_favorites, container, false);
|
||||
ContentLayout contentLayout = (ContentLayout) view.findViewById(R.id.content_layout);
|
||||
MainActivity activity = getActivity2();
|
||||
Assert.assertNotNull(activity);
|
||||
mDrawerLayout = (EhDrawerLayout) ViewUtils.$$(activity, R.id.draw_view);
|
||||
mRecyclerView = contentLayout.getRecyclerView();
|
||||
FastScroller fastScroller = contentLayout.getFastScroller();
|
||||
RefreshLayout refreshLayout = contentLayout.getRefreshLayout();
|
||||
@@ -410,95 +416,76 @@ public class FavoritesScene extends BaseScene implements
|
||||
mOldKeyword = null;
|
||||
}
|
||||
|
||||
private class InfoHolder extends RecyclerView.ViewHolder {
|
||||
private class FavDrawerHolder extends RecyclerView.ViewHolder {
|
||||
|
||||
private final TextView key;
|
||||
private final TextView value;
|
||||
|
||||
public InfoHolder(View itemView) {
|
||||
private FavDrawerHolder(View itemView) {
|
||||
super(itemView);
|
||||
key = (TextView) ViewUtils.$$(itemView, R.id.key);
|
||||
value = (TextView) ViewUtils.$$(itemView, R.id.value);
|
||||
}
|
||||
}
|
||||
|
||||
private class InfoAdapter extends RecyclerView.Adapter<InfoHolder> {
|
||||
|
||||
private static final int TYPE_HEADER = 0;
|
||||
private static final int TYPE_DATA = 1;
|
||||
private class FavDrawerAdapter extends RecyclerView.Adapter<FavDrawerHolder> {
|
||||
|
||||
private final LayoutInflater mInflater;
|
||||
|
||||
public InfoAdapter(LayoutInflater inflater) {
|
||||
private FavDrawerAdapter(LayoutInflater inflater) {
|
||||
mInflater = inflater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemViewType(int position) {
|
||||
return 0 == position ? TYPE_HEADER : TYPE_DATA;
|
||||
return position;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public InfoHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
return new InfoHolder(mInflater.inflate(TYPE_HEADER == viewType ?
|
||||
R.layout.item_favorite_info_header : R.layout.item_favorite_info_data, parent, false));
|
||||
public FavDrawerHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new FavDrawerHolder(mInflater.inflate(R.layout.item_drawer_favorites, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressLint("SetTextI18n")
|
||||
public void onBindViewHolder(InfoHolder holder, int position) {
|
||||
public void onBindViewHolder(@NonNull FavDrawerHolder holder, int position) {
|
||||
if (0 == position) {
|
||||
holder.key.setText(R.string.collections);
|
||||
holder.value.setText(R.string.count);
|
||||
holder.itemView.setEnabled(false);
|
||||
holder.key.setText(R.string.local_favorites);
|
||||
holder.value.setText(Integer.toString(mFavLocalCount));
|
||||
holder.itemView.setEnabled(true);
|
||||
} else if (1 == position){
|
||||
holder.key.setText(R.string.cloud_favorites);
|
||||
holder.value.setText(Integer.toString(mFavCountSum));
|
||||
holder.itemView.setEnabled(true);
|
||||
} else {
|
||||
if (null == mFavCatArray || null == mFavCountArray ||
|
||||
mFavCatArray.length < position || mFavCountArray.length < position) {
|
||||
mFavCatArray.length < (position - 1) ||
|
||||
mFavCountArray.length < (position - 1)) {
|
||||
return;
|
||||
}
|
||||
holder.key.setText(mFavCatArray[position - 1]);
|
||||
holder.value.setText(Integer.toString(mFavCountArray[position - 1]));
|
||||
holder.key.setText(mFavCatArray[position - 2]);
|
||||
holder.value.setText(Integer.toString(mFavCountArray[position - 2]));
|
||||
holder.itemView.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return 11;
|
||||
if (null == mFavCatArray) {
|
||||
return 2;
|
||||
}
|
||||
return 12;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("InflateParams")
|
||||
private void showFavoritesInfoDialog() {
|
||||
Context context = getContext2();
|
||||
if (null == context || null == mFavCatArray || null == mFavCountArray) {
|
||||
return;
|
||||
}
|
||||
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
context = builder.getContext();
|
||||
final LayoutInflater inflater = LayoutInflater.from(context);
|
||||
EasyRecyclerView rv = (EasyRecyclerView) inflater.inflate(R.layout.dialog_recycler_view, null);
|
||||
rv.setAdapter(new InfoAdapter(inflater));
|
||||
rv.setLayoutManager(new LinearLayoutManager(context));
|
||||
LinearDividerItemDecoration decoration = new LinearDividerItemDecoration(
|
||||
LinearDividerItemDecoration.VERTICAL, context.getResources().getColor(R.color.divider),
|
||||
LayoutUtils.dp2pix(context, 1));
|
||||
decoration.setPadding(ResourcesUtils.getAttrDimensionPixelOffset(context, R.attr.dialogPreferredPadding));
|
||||
rv.addItemDecoration(decoration);
|
||||
rv.setSelector(Ripple.generateRippleDrawable(context, false));
|
||||
rv.setClipToPadding(false);
|
||||
builder.setView(rv).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateDrawerView(LayoutInflater inflater,
|
||||
@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
View view = inflater.inflate(R.layout.drawer_list, container, false);
|
||||
Toolbar toolbar = (Toolbar) ViewUtils.$$(view, R.id.toolbar);
|
||||
ListView listView = (ListView) view.findViewById(R.id.list_view);
|
||||
|
||||
View view = inflater.inflate(R.layout.drawer_list_rv, container, false);
|
||||
final Context context = getContext2();
|
||||
Toolbar toolbar = (Toolbar) ViewUtils.$$(view, R.id.toolbar);
|
||||
|
||||
Assert.assertNotNull(context);
|
||||
|
||||
toolbar.setTitle(R.string.collections);
|
||||
@@ -508,9 +495,6 @@ public class FavoritesScene extends BaseScene implements
|
||||
public boolean onMenuItemClick(MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
switch (id) {
|
||||
case R.id.action_info:
|
||||
showFavoritesInfoDialog();
|
||||
return true;
|
||||
case R.id.action_default_favorites_slot:
|
||||
String[] items = new String[12];
|
||||
items[0] = getString(R.string.let_me_select);
|
||||
@@ -531,15 +515,13 @@ public class FavoritesScene extends BaseScene implements
|
||||
}
|
||||
});
|
||||
|
||||
mDrawerList = new ArrayList<>(12);
|
||||
mDrawerList.add(getString(R.string.local_favorites));
|
||||
mDrawerList.add(getString(R.string.cloud_favorites));
|
||||
if (mFavCatArray != null) {
|
||||
Collections.addAll(mDrawerList, mFavCatArray);
|
||||
}
|
||||
mDrawerAdapter = new ArrayAdapter<>(context, R.layout.item_simple_list, mDrawerList);
|
||||
listView.setAdapter(mDrawerAdapter);
|
||||
listView.setOnItemClickListener(this);
|
||||
EasyRecyclerView recyclerView = (EasyRecyclerView) view.findViewById(R.id.recycler_view_drawer);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(context));
|
||||
recyclerView.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
|
||||
|
||||
mDrawerAdapter = new FavDrawerAdapter(inflater);
|
||||
recyclerView.setAdapter(mDrawerAdapter);
|
||||
recyclerView.setOnItemClickListener(this);
|
||||
|
||||
return view;
|
||||
}
|
||||
@@ -549,7 +531,6 @@ public class FavoritesScene extends BaseScene implements
|
||||
super.onDestroyDrawerView();
|
||||
|
||||
mDrawerAdapter = null;
|
||||
mDrawerList = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -590,19 +571,53 @@ public class FavoritesScene extends BaseScene implements
|
||||
@Override
|
||||
@Implemented(EasyRecyclerView.OnItemClickListener.class)
|
||||
public boolean onItemClick(EasyRecyclerView parent, View view, int position, long id) {
|
||||
if (mRecyclerView != null && mRecyclerView.isInCustomChoice()) {
|
||||
mRecyclerView.toggleItemChecked(position);
|
||||
} else if (mHelper != null) {
|
||||
GalleryInfo gi = mHelper.getDataAt(position);
|
||||
Bundle args = new Bundle();
|
||||
args.putString(GalleryDetailScene.KEY_ACTION, GalleryDetailScene.ACTION_GALLERY_INFO);
|
||||
args.putParcelable(GalleryDetailScene.KEY_GALLERY_INFO, gi);
|
||||
Announcer announcer = new Announcer(GalleryDetailScene.class).setArgs(args);
|
||||
View thumb;
|
||||
if (ApiHelper.SUPPORT_TRANSITION && null != (thumb = view.findViewById(R.id.thumb))) {
|
||||
announcer.setTranHelper(new EnterGalleryDetailTransaction(thumb));
|
||||
if (mDrawerLayout != null && mDrawerLayout.isDrawerOpen(Gravity.RIGHT)){
|
||||
// Skip if in search mode
|
||||
if (mRecyclerView != null && mRecyclerView.isInCustomChoice()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (mUrlBuilder == null || mHelper == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Local favorite position is 0, All favorite position is 1, so position - 2 is OK
|
||||
int newFavCat = position - 2;
|
||||
|
||||
// Check is the same
|
||||
if (mUrlBuilder.getFavCat() == newFavCat) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Ensure outOfCustomChoiceMode to avoid error
|
||||
if (mRecyclerView != null) {
|
||||
mRecyclerView.isInCustomChoice();
|
||||
}
|
||||
|
||||
exitSearchMode(true);
|
||||
|
||||
mUrlBuilder.setKeyword(null);
|
||||
mUrlBuilder.setFavCat(newFavCat);
|
||||
updateSearchBar();
|
||||
mHelper.refresh();
|
||||
|
||||
closeDrawer(Gravity.RIGHT);
|
||||
|
||||
} else {
|
||||
if (mRecyclerView != null && mRecyclerView.isInCustomChoice()) {
|
||||
mRecyclerView.toggleItemChecked(position);
|
||||
} else if (mHelper != null) {
|
||||
GalleryInfo gi = mHelper.getDataAt(position);
|
||||
Bundle args = new Bundle();
|
||||
args.putString(GalleryDetailScene.KEY_ACTION, GalleryDetailScene.ACTION_GALLERY_INFO);
|
||||
args.putParcelable(GalleryDetailScene.KEY_GALLERY_INFO, gi);
|
||||
Announcer announcer = new Announcer(GalleryDetailScene.class).setArgs(args);
|
||||
View thumb;
|
||||
if (ApiHelper.SUPPORT_TRANSITION && null != (thumb = view.findViewById(R.id.thumb))) {
|
||||
announcer.setTranHelper(new EnterGalleryDetailTransaction(thumb));
|
||||
}
|
||||
startScene(announcer);
|
||||
}
|
||||
startScene(announcer);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -805,41 +820,6 @@ public class FavoritesScene extends BaseScene implements
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Implemented(AdapterView.OnItemClickListener.class)
|
||||
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
|
||||
// Skip if in search mode
|
||||
if (mRecyclerView != null && mRecyclerView.isInCustomChoice()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mUrlBuilder == null || mHelper == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Local favorite position is 0, All favorite position is 1, so position - 2 is OK
|
||||
int newFavCat = position - 2;
|
||||
|
||||
// Check is the same
|
||||
if (mUrlBuilder.getFavCat() == newFavCat) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Ensure outOfCustomChoiceMode to avoid error
|
||||
if (mRecyclerView != null) {
|
||||
mRecyclerView.isInCustomChoice();
|
||||
}
|
||||
|
||||
exitSearchMode(true);
|
||||
|
||||
mUrlBuilder.setKeyword(null);
|
||||
mUrlBuilder.setFavCat(newFavCat);
|
||||
updateSearchBar();
|
||||
mHelper.refresh();
|
||||
|
||||
closeDrawer(Gravity.RIGHT);
|
||||
}
|
||||
|
||||
private void enterSearchMode(boolean animation) {
|
||||
if (mSearchMode ||mSearchBar == null || mSearchBarMover == null || mLeftDrawable == null) {
|
||||
return;
|
||||
@@ -864,22 +844,26 @@ public class FavoritesScene extends BaseScene implements
|
||||
if (mHelper != null && mSearchBarMover != null &&
|
||||
mHelper.isCurrentTask(taskId)) {
|
||||
|
||||
if (mFavCatArray != null && mDrawerList != null) {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
mFavCatArray[i] = result.catArray[i];
|
||||
mDrawerList.set(i + 2, result.catArray[i]);
|
||||
}
|
||||
|
||||
if (mDrawerAdapter != null) {
|
||||
mDrawerAdapter.notifyDataSetChanged();
|
||||
}
|
||||
if (mFavCatArray != null) {
|
||||
System.arraycopy(result.catArray, 0, mFavCatArray, 0,10);
|
||||
}
|
||||
|
||||
mFavCountArray = result.countArray;
|
||||
if (mFavCountArray != null){
|
||||
mFavCountSum = 0;
|
||||
for (int i = 0; i < 10; i++ ){
|
||||
mFavCountSum = mFavCountSum + mFavCountArray[i];
|
||||
}
|
||||
Settings.putFavCloudCount(mFavCountSum);
|
||||
}
|
||||
|
||||
updateSearchBar();
|
||||
mHelper.setPages(taskId, result.pages);
|
||||
mHelper.onGetPageData(taskId, result.galleryInfoList);
|
||||
|
||||
if (mDrawerAdapter != null) {
|
||||
mDrawerAdapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -903,6 +887,8 @@ public class FavoritesScene extends BaseScene implements
|
||||
mHelper.setPages(taskId, 0);
|
||||
mHelper.onGetPageData(taskId, Collections.EMPTY_LIST);
|
||||
} else {
|
||||
mFavLocalCount = list.size();
|
||||
Settings.putFavLocalCount(mFavLocalCount);
|
||||
mHelper.setPages(taskId, 1);
|
||||
mHelper.onGetPageData(taskId, list);
|
||||
}
|
||||
@@ -1144,7 +1130,7 @@ public class FavoritesScene extends BaseScene implements
|
||||
private final int mTaskId;
|
||||
private final String mKeyword;
|
||||
|
||||
public AddFavoritesListener(Context context, int stageId,
|
||||
private AddFavoritesListener(Context context, int stageId,
|
||||
String sceneTag, int taskId, String keyword) {
|
||||
super(context, stageId, sceneTag);
|
||||
mTaskId = taskId;
|
||||
@@ -1183,7 +1169,7 @@ public class FavoritesScene extends BaseScene implements
|
||||
private final boolean mLocal;
|
||||
private final String mKeyword;
|
||||
|
||||
public GetFavoritesListener(Context context, int stageId,
|
||||
private GetFavoritesListener(Context context, int stageId,
|
||||
String sceneTag, int taskId, boolean local, String keyword) {
|
||||
super(context, stageId, sceneTag);
|
||||
mTaskId = taskId;
|
||||
@@ -1195,6 +1181,7 @@ public class FavoritesScene extends BaseScene implements
|
||||
public void onSuccess(FavoritesParser.Result result) {
|
||||
// Put fav cat
|
||||
Settings.putFavCat(result.catArray);
|
||||
Settings.putFavCount(result.countArray);
|
||||
FavoritesScene scene = getScene();
|
||||
if (scene != null) {
|
||||
if (mLocal) {
|
||||
|
||||
@@ -322,7 +322,7 @@ public final class GalleryCommentsScene extends ToolbarScene
|
||||
rv.setAdapter(new RecyclerView.Adapter<InfoHolder>() {
|
||||
@Override
|
||||
public InfoHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
return new InfoHolder(inflater.inflate(R.layout.item_favorite_info_data, parent, false));
|
||||
return new InfoHolder(inflater.inflate(R.layout.item_drawer_favorites, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1538,6 +1538,14 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
}
|
||||
}
|
||||
|
||||
private void onModifyFavoritesFailure(boolean addOrRemove) {
|
||||
mModifingFavorites = false;
|
||||
}
|
||||
|
||||
private void onModifyFavoritesCancel(boolean addOrRemove) {
|
||||
mModifingFavorites = false;
|
||||
}
|
||||
|
||||
private class ModifyFavoritesListener extends EhCallback<GalleryDetailScene, Void> {
|
||||
|
||||
private final boolean mAddOrRemove;
|
||||
@@ -1564,10 +1572,19 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene
|
||||
public void onFailure(Exception e) {
|
||||
showTip(mAddOrRemove ? R.string.remove_from_favorite_failure :
|
||||
R.string.add_to_favorite_failure, LENGTH_SHORT);
|
||||
GalleryDetailScene scene = getScene();
|
||||
if (scene != null) {
|
||||
scene.onModifyFavoritesFailure(mAddOrRemove);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCancel() {}
|
||||
public void onCancel() {
|
||||
GalleryDetailScene scene = getScene();
|
||||
if (scene != null) {
|
||||
scene.onModifyFavoritesCancel(mAddOrRemove);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInstance(SceneFragment scene) {
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48">
|
||||
<path
|
||||
android:pathData="M46,24A22,22 0,0 1,24 46,22 22,0 0,1 2,24 22,22 0,0 1,24 2,22 22,0 0,1 46,24Z"
|
||||
android:fillColor="@color/shortcut_bg"
|
||||
android:fillAlpha="1"/>
|
||||
<path
|
||||
android:pathData="M20,17V31L31,24Z"
|
||||
android:fillColor="@color/colorPrimary"
|
||||
android:fillAlpha="1"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="48dp"
|
||||
android:height="48dp"
|
||||
android:viewportWidth="48"
|
||||
android:viewportHeight="48">
|
||||
<path
|
||||
android:pathData="M46,24A22,22 0,0 1,24 46,22 22,0 0,1 2,24 22,22 0,0 1,24 2,22 22,0 0,1 46,24Z"
|
||||
android:fillColor="@color/shortcut_bg"
|
||||
android:fillAlpha="1"/>
|
||||
<path
|
||||
android:pathData="m18,31h4L22,17h-4zM26,17v14h4L30,17Z"
|
||||
android:fillColor="@color/colorPrimary"
|
||||
android:fillAlpha="1"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/shortcut_bg"/>
|
||||
<foreground android:drawable="@drawable/ic_play_arrow_108dp"/>
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/shortcut_bg"/>
|
||||
<foreground android:drawable="@drawable/ic_pause_108dp"/>
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:pathData="m42,68h8V40H42ZM58,40v28h8V40Z"
|
||||
android:fillColor="@color/colorPrimary"
|
||||
android:fillAlpha="1"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:pathData="M46,40V68L68,54Z"
|
||||
android:fillColor="@color/colorPrimary"
|
||||
android:fillAlpha="1"/>
|
||||
</vector>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright 2016 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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_width="match_parent"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
android:elevation="8dp"
|
||||
android:saveEnabled="false"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.hippo.easyrecyclerview.EasyRecyclerView
|
||||
android:id="@+id/recycler_view_drawer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright 2016 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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<android.support.v7.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_width="match_parent"
|
||||
android:background="?attr/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
android:saveEnabled="false"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:background="@drawable/shadow_bottom"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<com.hippo.easyrecyclerview.EasyRecyclerView
|
||||
android:id="@+id/recycler_view_drawer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
+16
-13
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright 2015 Hippo Seven
|
||||
~ Copyright 2018 Hippo Seven
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
@@ -20,23 +20,26 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="?attr/dialogPreferredPadding"
|
||||
android:paddingRight="?attr/dialogPreferredPadding">
|
||||
android:minHeight="?attr/listPreferredItemHeightSmall"
|
||||
android:background="?android:attr/selectableItemBackground">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/key"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:textColor="@color/primary_text_light"
|
||||
android:padding="8dp"/>
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textAppearance="?attr/textAppearanceListItemSmall"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingLeft="?attr/listPreferredItemPaddingLeft"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/value"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/primary_text_light"
|
||||
android:padding="8dp"/>
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textAppearance="?attr/textAppearanceListItemSmall"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingRight="?attr/listPreferredItemPaddingRight"/>
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright 2016 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.
|
||||
-->
|
||||
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="?attr/dialogPreferredPadding"
|
||||
android:paddingRight="?attr/dialogPreferredPadding">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/key"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="2"
|
||||
android:textColor="@color/secondary_text_light"
|
||||
android:padding="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/value"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/secondary_text_light"
|
||||
android:padding="8dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -25,10 +25,4 @@
|
||||
android:title="@string/default_favorites_collection"
|
||||
app:showAsAction="always"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_info"
|
||||
android:icon="@drawable/v_info_dark_x24"
|
||||
android:title="@string/favorites_info"
|
||||
app:showAsAction="ifRoom"/>
|
||||
|
||||
</menu>
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
<string name="homepage">ホームページ</string>
|
||||
<string name="whats_hot">人気</string>
|
||||
<string name="favourite">気に入り</string>
|
||||
<string name="favourite">お気に入り</string>
|
||||
<string name="history">閲覧履歴</string>
|
||||
<string name="downloads">ダウンロード</string>
|
||||
<string name="settings">設定</string>
|
||||
@@ -41,56 +41,56 @@
|
||||
<string name="display_name_dialog_title">ニックネームを入力</string>
|
||||
<string name="display_name">ニックネーム</string>
|
||||
<string name="display_name_is_empty">ニックネームが空</string>
|
||||
<string name="sign_in_first">ログインください</string>
|
||||
<string name="sign_in_first">ログインしてください</string>
|
||||
|
||||
<string name="default_display_name">Little Hippo</string>
|
||||
|
||||
<string name="cookie_explain">Cookieは、ブラウザに格納された小さなデータです。Cookie及びその入手方法がかわからない場合は、Webで検索してください。\n\n特定のCookieを入力することでログインしてください。</string>
|
||||
<string name="text_is_empty">テキストが空</string>
|
||||
<string name="waring">警告</string>
|
||||
<string name="wrong_cookie_warning">あなたが入力したCookieは間違ったようです。チェックしてください。</string>
|
||||
<string name="i_will_check_it">よい</string>
|
||||
<string name="i_dont_think_so">間違ってない</string>
|
||||
<string name="wrong_cookie_warning">あなたが入力したCookieは間違っているようです。チェックしてください。</string>
|
||||
<string name="i_will_check_it">正しいです</string>
|
||||
<string name="i_dont_think_so">間違っています</string>
|
||||
<string name="found_cookies">古いCookieを探す</string>
|
||||
|
||||
<string name="invalid_download_location">ダウンロードパスは利用できません。ダウンロードパスをリセットしてください。</string>
|
||||
|
||||
<string name="cellular_network_warning">モバイルネットワークを使っている</string>
|
||||
<string name="cellular_network_warning">モバイルネットワークを使用中です。</string>
|
||||
|
||||
<string name="error_bad_status_code">間違ったステータスコード:%d</string>
|
||||
<string name="error_timeout">タイムアウト</string>
|
||||
<string name="error_unknown_host">未知ホスト</string>
|
||||
<string name="error_redirection">リダイレクトが多すぎ</string>
|
||||
<string name="error_socket">ネットエラー</string>
|
||||
<string name="error_unknown">おかしいエラー</string>
|
||||
<string name="error_cant_find_activity">アクティビティが見つからない</string>
|
||||
<string name="error_cannot_parse_the_url">リンクを分析できない</string>
|
||||
<string name="error_not_folder_path">フォルダパスではない</string>
|
||||
<string name="error_no_provider">providerがない</string>
|
||||
<string name="error_decoding_failed">デコード失敗</string>
|
||||
<string name="error_not_found">見つからない</string>
|
||||
<string name="error_redirection">リダイレクトが多すぎます</string>
|
||||
<string name="error_socket">ネットワークエラー</string>
|
||||
<string name="error_unknown">未知なエラー</string>
|
||||
<string name="error_cant_find_activity">アクティビティが見つかりません。</string>
|
||||
<string name="error_cannot_parse_the_url">リンクを分析できません。</string>
|
||||
<string name="error_not_folder_path">フォルダが見つかりません。</string>
|
||||
<string name="error_no_provider">プロバイダが見つかりません。</string>
|
||||
<string name="error_decoding_failed">デコードに失敗しました。</string>
|
||||
<string name="error_not_found">見つかりませんでした。</string>
|
||||
<string name="error_empty">空</string>
|
||||
<string name="error_invalid_zip_file">無効のzipファイル</string>
|
||||
<string name="error_reading_failed">読み取り失敗</string>
|
||||
<string name="error_out_of_range">範囲外</string>
|
||||
<string name="error_write_failed">書き込み失敗</string>
|
||||
<string name="error_parse_error">分析失敗</string>
|
||||
<string name="error_invalid_zip_file">無効なzipファイルです。</string>
|
||||
<string name="error_reading_failed">読み取りに失敗しました。</string>
|
||||
<string name="error_out_of_range">範囲外です。</string>
|
||||
<string name="error_write_failed">書き込みに失敗しました。</string>
|
||||
<string name="error_parse_error">分析に失敗しました。</string>
|
||||
<string name="error_509">509</string>
|
||||
<string name="error_invalid_url">無効のリンク</string>
|
||||
<string name="error_get_ptoken_error">pToken取得エラー</string>
|
||||
<string name="error_invalid_specify_gallery">指定ギャラリーのキーワードは「618395 0439fa3666」のようはずです。</string>
|
||||
<string name="error_cant_create_temp_file">一時ファイルを作成できない</string>
|
||||
<string name="error_cant_save_image">画像を保存できない</string>
|
||||
<string name="error_invalid_number">無効数字</string>
|
||||
<string name="error_invalid_url">無効なリンクです。</string>
|
||||
<string name="error_get_ptoken_error">pToken取得に失敗しました。</string>
|
||||
<string name="error_invalid_specify_gallery">指定ギャラリーのキーワードは、例えば「618395 0439fa3666」のようになるはずです。</string>
|
||||
<string name="error_cant_create_temp_file">一時ファイルを作成できません。</string>
|
||||
<string name="error_cant_save_image">画像を保存できません。</string>
|
||||
<string name="error_invalid_number">無効な数字です。</string>
|
||||
|
||||
<string name="app_waring">このアプリの内容はインターネットからのもので、内容によっては生理や心理に回復不能な損害を与えることが可能です。このアプリの作成者は、このアプリケによって引き起こされるいかなる結果に対しても責任を負いません。</string>
|
||||
<string name="error_username_cannot_empty">ユーザー名が空は不可能</string>
|
||||
<string name="error_password_cannot_empty">パスワードが空は不可能</string>
|
||||
<string name="skip_signing_in">ログインをスキップ</string>
|
||||
<string name="sign_in_failed">ログイン失敗</string>
|
||||
<string name="app_waring">このアプリの内容はインターネットからのもので、内容によっては生理や心理に回復不能な損害を与える可能性があります。。このアプリの作成者は、このアプリケーションによって引き起こされるいかなる結果に対しても責任を負いません。</string>
|
||||
<string name="error_username_cannot_empty">ユーザー名を入力してください。</string>
|
||||
<string name="error_password_cannot_empty">パスワードを入力してください。</string>
|
||||
<string name="skip_signing_in">ログインをスキップします。</string>
|
||||
<string name="sign_in_failed">ログインに失敗しました。</string>
|
||||
<string name="sign_in_failed_plain">これはウェブサイトのアップデートによって引き起こされることかもしれず、またおかしいことが起こったかもしれません。ログインボタンの下でWebでログインするか、Cookieを入力するか、あるいはログインをスキップします。ログインをスキップするでアプリが正常に使用できなくなることがあります。0.6.xバージョンでログインした場合は、「Cookieでログイン」を選択することが推奨です。</string>
|
||||
<string name="press_twice_exit">もう一度押して終了</string>
|
||||
<string name="content_layout_restore_tip">クリックしてもう一度試し</string>
|
||||
<string name="content_layout_restore_tip">クリックしてもう一度試す</string>
|
||||
<string name="write_rationale">EhViewerはギャラリーをダウンロードするためにデバイスのストレージへのアクセスを要求します。あなたは許可しますか?</string>
|
||||
<string name="you_rejected_me">痛い</string>
|
||||
<string name="analytics_explain">あなたは、開発者があなたのデバイスや使用状況に関する情報を収集できるように同意しますか?これは開発にとって大きな助けになります。<br><br>データ統計サービスはGoogleアナリティクスによって提供で、 <a href="https://www.google.com/policies/privacy/">https://www.google.com/policies/privacy/</a> にプライバシーポリシーを閲覧できます。<br><br>データ統計に参加することに同意すると、Android APIのバージョン、デバイスモデル、言語の場所、アプリのバージョン番号、セッションの長さ、使用するアプリの数など、デバイス情報とアプリの使用状況が記録されます。開発者は、電話番号、電子メールアドレス、IMEIの情報は記録しないことを約束します。<br><br>統計に参加することに同意するまで、あなたの情報は記録されません。<br><br>記録されたデータはGoogleアナリティクスで分析され、分析レポートはアプリ開発者のみがアクセスできます。</string>
|
||||
@@ -112,12 +112,12 @@
|
||||
<!-- Update -->
|
||||
<string name="update">更新</string>
|
||||
<string name="update_plain">バージョン:%1$s\nサイズ:%2$s\n\n%3$s</string>
|
||||
<string name="update_to_date">EhViewerはもう最新バージョン</string>
|
||||
<string name="update_to_date">EhViewerは既に最新バージョンです。</string>
|
||||
|
||||
<!-- Gallery List -->
|
||||
<string name="gallery_list_search_bar_hint_exhentai">ExHentaiを検索</string>
|
||||
<string name="gallery_list_search_bar_hint_e_hentai">E-Hentaiを検索</string>
|
||||
<string name="gallery_list_empty_hit">何も見つからない</string>
|
||||
<string name="gallery_list_empty_hit">何も見つかりませんでした。</string>
|
||||
|
||||
<string name="search">検索</string>
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<string name="search_specify_gallery">指定ギャラリー</string>
|
||||
<string name="search_enable_advance">詳細オプションを有効にする</string>
|
||||
|
||||
<string name="search_tip">一般検索:搜索です。\n\n指定アップローダー:このアップローダーによってアップロードされたギャラリーを一覧表示します。他のオプションは無視されます。\n\n指定タグ:このタッグを含むギャラリーを一覧表示します。他のオプションは無視されます。\n\n指定画廊:このギャラリーにジャンプします。キーワードは「gid token」のはずです。</string>
|
||||
<string name="search_tip">一般検索:検索です。\n\n指定アップローダー:このアップローダーによってアップロードされたギャラリーを一覧表示します。他のオプションは無視されます。\n\n指定タグ:このタッグを含むギャラリーを一覧表示します。他のオプションは無視されます。\n\n指定画廊:このギャラリーにジャンプします。キーワードは「gid token」のはずです。</string>
|
||||
|
||||
<string name="search_sname">ギャラリーを検索</string>
|
||||
<string name="search_stags">ギャラリータグを検索</string>
|
||||
@@ -151,21 +151,21 @@
|
||||
<string name="search_se">削除されたギャラリーを表示</string>
|
||||
<string name="select_image_first">まずは画像を選択してください</string>
|
||||
|
||||
<string name="add_to_favourites">気に入り</string>
|
||||
<string name="add_to_favourites">お気に入り</string>
|
||||
|
||||
<string name="quick_search">クイック検索</string>
|
||||
<string name="quick_search_tip">「+」をクリックしてクイック検索を追加</string>
|
||||
<string name="add_quick_search_dialog_title">クイック検索を追加</string>
|
||||
<string name="name_is_empty">ネームが空</string>
|
||||
<string name="name_is_empty">タイトルが空</string>
|
||||
<string name="delete">削除</string>
|
||||
<string name="delete_quick_search_title">クイック検索を削除</string>
|
||||
<string name="delete_quick_search_message">「%s」を削除?</string>
|
||||
<string name="no_quick_search">ここがクイック検索</string>
|
||||
<string name="add_quick_search_tip">ギャラリーリストのステータスはクイック検索として保存されます。検索パネルのステータスを保存する場合は、まず検索を実行してください。</string>
|
||||
<string name="readme">私を読んで</string>
|
||||
<string name="image_search_not_quick_search">画像検索をクイック検索として追加できません</string>
|
||||
<string name="readme">README</string>
|
||||
<string name="image_search_not_quick_search">画像検索をクイック検索として追加できませんでした。</string>
|
||||
<string name="duplicate_quick_search">同じクイック検索がすでに名前が「%s」として存在しています。</string>
|
||||
<string name="duplicate_name">同じ名前が既に存在</string>
|
||||
<string name="duplicate_name">同じ名前が既に存在します。</string>
|
||||
|
||||
<string name="go_to_hint">ページ%1$d、合計%2$dページ</string>
|
||||
|
||||
@@ -176,44 +176,44 @@
|
||||
<string name="star_5">星5</string>
|
||||
|
||||
<!-- Gallery detail -->
|
||||
<string name="error_cannot_find_gallery">ギャラリーを見つけない</string>
|
||||
<string name="error_cannot_find_gallery">ギャラリーを見つけることが出来ませんでした。</string>
|
||||
<string name="download">ダウンロード</string>
|
||||
<string name="read">閲覧</string>
|
||||
<string name="more_information">詳しい情報を見る</string>
|
||||
<string name="more_information">詳細情報を見る</string>
|
||||
<plurals name="page_count">
|
||||
<item quantity="other">%dページ</item>
|
||||
</plurals>
|
||||
<string name="favored_times">\u2665 %d</string>
|
||||
<string name="rating_text">%1$s (%2$.2f, %3$d)</string>
|
||||
<string name="favorites">気に入り</string>
|
||||
<string name="favorites">お気に入り</string>
|
||||
<string name="torrent_count">トレント (%d)</string>
|
||||
<string name="share">シェア</string>
|
||||
<string name="rate">採点</string>
|
||||
<string name="rate">評価</string>
|
||||
<string name="similar_gallery">類似のギャラリー</string>
|
||||
<string name="search_cover">カバーを検索</string>
|
||||
<string name="no_tags">タグなし</string>
|
||||
<string name="no_comments">コメントなし</string>
|
||||
<string name="no_more_comments">すべてのコメントが表示された</string>
|
||||
<string name="no_more_comments">すべてのコメントが表示されました。</string>
|
||||
<string name="more_comment">他のコメントを見る</string>
|
||||
<string name="no_previews">プレビューなし</string>
|
||||
<string name="no_more_previews">すべてのプレビューが表示された</string>
|
||||
<string name="no_more_previews">すべてのプレビューが表示されました。</string>
|
||||
<string name="more_previews">他のプレビューを見る</string>
|
||||
<string name="refresh">リフレッシュ</string>
|
||||
<string name="open_in_other_app">他のアプリケーションで開く</string>
|
||||
<string name="rate_successfully">採点成功</string>
|
||||
<string name="rate_failed">採点失敗</string>
|
||||
<string name="rate_successfully">評価成功</string>
|
||||
<string name="rate_failed">評価失敗</string>
|
||||
<string name="no_torrents">トレントなし</string>
|
||||
<string name="torrents">トレント</string>
|
||||
<string name="favorited">気に入った</string>
|
||||
<string name="not_favorited">気に入りに追加してない</string>
|
||||
<string name="add_favorites_dialog_title">気に入りに追加</string>
|
||||
<string name="remember_favorite_collection">気に入りを覚える</string>
|
||||
<string name="add_to_favorite_success">気に入りに追加した</string>
|
||||
<string name="remove_from_favorite_success">気に入りから削除</string>
|
||||
<string name="add_to_favorite_failure">気に入りに追加失敗</string>
|
||||
<string name="remove_from_favorite_failure">気に入りから削除失敗</string>
|
||||
<string name="favorited">追加済み</string>
|
||||
<string name="not_favorited">未追加</string>
|
||||
<string name="add_favorites_dialog_title">お気に入りに追加しました。</string>
|
||||
<string name="remember_favorite_collection">お気に入りを記憶します。</string>
|
||||
<string name="add_to_favorite_success">お気に入りに追加しました。</string>
|
||||
<string name="remove_from_favorite_success">お気に入りから削除しました。</string>
|
||||
<string name="add_to_favorite_failure">お気に入りに追加失敗しました。</string>
|
||||
<string name="remove_from_favorite_failure">お気に入りからの削除に失敗しました。</string>
|
||||
<string name="block_the_uploader">アップローダフィルター「%s」を追加?</string>
|
||||
<string name="filter_added">フィルターが追加された</string>
|
||||
<string name="filter_added">フィルターが追加されました。</string>
|
||||
|
||||
<!-- Rating -->
|
||||
<string name="rating10">良すぎてたまらない</string>
|
||||
@@ -230,7 +230,7 @@
|
||||
|
||||
<!-- Gallery Info -->
|
||||
<string name="gallery_info">ギャラリー詳細</string>
|
||||
<string name="copied_to_clipboard">クリップボードにコピーされた</string>
|
||||
<string name="copied_to_clipboard">クリップボードにコピーされました。</string>
|
||||
<string name="header_key">キー</string>
|
||||
<string name="header_value">値</string>
|
||||
<string name="key_gid">Gid</string>
|
||||
@@ -241,33 +241,33 @@
|
||||
<string name="key_thumb">サムネイル</string>
|
||||
<string name="key_category">カテゴリー</string>
|
||||
<string name="key_uploader">アップローダー</string>
|
||||
<string name="key_posted">アップロード時間</string>
|
||||
<string name="key_posted">アップロード日時</string>
|
||||
<string name="key_parent">親ギャラリー</string>
|
||||
<string name="key_visible">可視性</string>
|
||||
<string name="key_language">言語</string>
|
||||
<string name="key_pages">ページ数</string>
|
||||
<string name="key_size">サイズ</string>
|
||||
<string name="key_favorite_count">気に入り回数</string>
|
||||
<string name="key_favorited">気に入った</string>
|
||||
<string name="key_rating_count">採点回数</string>
|
||||
<string name="key_rating">採点</string>
|
||||
<string name="key_favorite_count">お気に入り回数</string>
|
||||
<string name="key_favorited">お気に入り追加済み</string>
|
||||
<string name="key_rating_count">評価回数</string>
|
||||
<string name="key_rating">評価</string>
|
||||
<string name="key_torrents">トレント数</string>
|
||||
<string name="key_torrent_url">トレント</string>
|
||||
|
||||
<!-- Gallery Comments -->
|
||||
<string name="gallery_comments">ギャラリーコメント</string>
|
||||
<string name="no_one_comments_gallery">コメントはまだない</string>
|
||||
<string name="comment_successfully">コメント成功</string>
|
||||
<string name="comment_failed">コメント失敗</string>
|
||||
<string name="copy_comment_text">コメントテキストをコピー</string>
|
||||
<string name="no_one_comments_gallery">コメントはまだありません。</string>
|
||||
<string name="comment_successfully">コメントに成功しました。</string>
|
||||
<string name="comment_failed">コメントに失敗しました。</string>
|
||||
<string name="copy_comment_text">コメントをコピーしました。</string>
|
||||
<string name="vote_up">賛成</string>
|
||||
<string name="cancel_vote_up">もう賛成しない</string>
|
||||
<string name="vote_down">ゴミコメント</string>
|
||||
<string name="cancel_vote_down">ゴミコメントではない</string>
|
||||
<string name="vote_up_successfully">もう賛成した</string>
|
||||
<string name="cancel_vote_up_successfully">もう賛成しなかった</string>
|
||||
<string name="vote_down_successfully">ゴミコメントと指定した</string>
|
||||
<string name="cancel_vote_down_successfully">もうゴミコメントと指定しない</string>
|
||||
<string name="cancel_vote_up">賛成を取り消す</string>
|
||||
<string name="vote_down">反対</string>
|
||||
<string name="cancel_vote_down">反対を取り消す</string>
|
||||
<string name="vote_up_successfully">賛成しました。</string>
|
||||
<string name="cancel_vote_up_successfully">賛成を取り消しました。</string>
|
||||
<string name="vote_down_successfully">反対しました。</string>
|
||||
<string name="cancel_vote_down_successfully">反対を取り消しました。</string>
|
||||
<string name="vote_failed">投票失敗</string>
|
||||
<string name="check_vote_status">投票状況を見る</string>
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
<!-- History -->
|
||||
<string name="no_history">ここが閲覧履歴</string>
|
||||
<string name="clear_all">全部クリア</string>
|
||||
<string name="clear_all_history">すべて閲覧履歴をクリア?</string>
|
||||
<string name="clear_all_history">すべての閲覧履歴をクリアしますか?</string>
|
||||
|
||||
<!-- Filter -->
|
||||
<string name="filter">フィルター</string>
|
||||
@@ -360,7 +360,7 @@
|
||||
<string name="page_menu_refresh">@string/refresh</string>
|
||||
<string name="page_menu_share">@string/share</string>
|
||||
<string name="page_menu_save">保存</string>
|
||||
<string name="page_menu_add_bookmark">ブックマークを追加</string>
|
||||
<string name="page_menu_add_bookmark">ブックマークに追加</string>
|
||||
<string name="gallery_menu_title">メニュー</string>
|
||||
<string name="share_image">画像をシェア</string>
|
||||
<string name="image_saved">画像は%sに保存された</string>
|
||||
@@ -368,10 +368,10 @@
|
||||
<!-- Settings -->
|
||||
<string name="settings_eh">EH</string>
|
||||
<string name="settings_eh_sign_out">ログアウト</string>
|
||||
<string name="settings_eh_sign_out_summary">ログアウト後はアプリを再起動して、再度ログインします。</string>
|
||||
<string name="settings_eh_sign_out_warning">おう、マイディア、君は本当にログアウトしたい?本当にログアウトしますか?</string>
|
||||
<string name="settings_eh_sign_out_yes">イエス、オレはログアウトします</string>
|
||||
<string name="settings_eh_sign_out_tip">ログアウトした。アプリを再起動することで再度ログインします。</string>
|
||||
<string name="settings_eh_sign_out_summary">ログアウト後にアプリを再起動して、再度ログインします。</string>
|
||||
<string name="settings_eh_sign_out_warning">本当にログアウトしますか?</string>
|
||||
<string name="settings_eh_sign_out_yes">ログアウトします</string>
|
||||
<string name="settings_eh_sign_out_tip">ログアウトしました。アプリを再起動することで再度ログインします。</string>
|
||||
<string name="settings_u_config">EHentai設定</string>
|
||||
<string name="settings_u_config_summary">EHentaiサイト上の設定</string>
|
||||
<string name="settings_eh_gallery_site">ギャラリーサイト</string>
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<string name="content_layout_restore_tip">다시 시도하려면 누르기</string>
|
||||
<string name="write_rationale">앱이 갤러리를 다운로드하려면 WRITE_EXTERNAL_STORAGE 권한이 필요합니다. 권한을 허용하시겠습니까?</string>
|
||||
<string name="you_rejected_me">안돼요</string>
|
||||
<string name="analytics_explain">앱 개발자에게 기기 및 사용 정보를 보내시겠습니까? 앱 개발에 굉장한 도움이 됩니다. <br><br>데이터 분석 서비스는 Google Analytics를 사용하며, 개인 정보 보호 정책은 <a href="https://www.google.com/policies/privacy/">https://www.google.com/policies/privacy/</a> 에서 확인하실 수 있습니다.<br><br>데이터 분석을 허용하면 사용자의 기기 및 앱 사용 정보가 수집됩니다. 전화번호나 이메일 주소, IMEI와 같은 개인 정보는 수집하지 않습니다.<br><br>데이터 분석을 허용하기 전까지는 정보가 수집되지 않습니다.<br><br>수집된 정보는 Google Analytics에 의해 분석됩니다. 분석된 정보는 이 애플리케이션의 개발자만 볼 수 있습니다.</string>
|
||||
<string name="analytics_explain">앱 개발자에게 기기 및 사용 정보를 보내시겠습니까? 앱 개발에 굉장한 도움이 됩니다. <br><br>데이터 분석 서비스는 Google Analytics를 사용하며, 개인 정보 보호 정책은 <a href="https://www.google.com/policies/privacy/">https://www.google.com/policies/privacy/</a> 에서 확인하실 수 있습니다.<br><br>데이터 분석을 허용하면 사용자의 기기 및 앱 사용 정보가 수집됩니다. 전화번호나 이메일 주소, IMEI와 같은 개인 정보는 수집하지 않습니다.<br><br>데이터 분석을 허용하기 전까지는 정보를 수집하지 않습니다.<br><br>수집한 정보는 Google Analytics에 의해 분석됩니다. 분석된 정보는 이 애플리케이션의 개발자만 볼 수 있습니다.</string>
|
||||
<string name="get_it">알겠습니다</string>
|
||||
<string name="accept">동의</string>
|
||||
<string name="reject">거부</string>
|
||||
@@ -164,7 +164,7 @@
|
||||
<string name="add_quick_search_tip">갤러리 목록의 상태가 빠른 검색으로 저장됩니다. 검색 패널의 상태를 저장하려면 먼저 검색 옵션을 지정하세요.</string>
|
||||
<string name="readme">README</string>
|
||||
<string name="image_search_not_quick_search">이미지 검색은 빠른 검색에 추가할 수 없습니다.</string>
|
||||
<string name="duplicate_quick_search">중복되는 빠른 검색 항목이 있습니다. 이름은 \"%s\"입니다.</string>
|
||||
<string name="duplicate_quick_search">이미 같은 내용의 빠른 검색 항목이 있습니다. 이름은 \"%s\"입니다.</string>
|
||||
<string name="duplicate_name">같은 이름의 항목이 이미 있습니다.</string>
|
||||
|
||||
<string name="go_to_hint">페이지 %1$d, 총 %2$d 페이지</string>
|
||||
@@ -206,8 +206,8 @@
|
||||
<string name="not_favorited">즐겨찾기에 없음</string>
|
||||
<string name="add_favorites_dialog_title">즐겨찾기에 추가</string>
|
||||
<string name="remember_favorite_collection">즐겨찾기 저장 위치 기억</string>
|
||||
<string name="add_to_favorite_success">즐겨찾기에 추가되었습니다.</string>
|
||||
<string name="remove_from_favorite_success">즐겨찾기에서 제거되었습니다.</string>
|
||||
<string name="add_to_favorite_success">즐겨찾기에 추가했습니다.</string>
|
||||
<string name="remove_from_favorite_success">즐겨찾기에서 제거했습니다.</string>
|
||||
<string name="add_to_favorite_failure">즐겨찾기에 추가하지 못했습니다.</string>
|
||||
<string name="remove_from_favorite_failure">즐겨찾기에서 제거하지 못했습니다.</string>
|
||||
<string name="block_the_uploader">필터 목록에 \"%s\" 업로더를 추가하시겠습니까?</string>
|
||||
@@ -215,7 +215,7 @@
|
||||
|
||||
<!-- Gallery Info -->
|
||||
<string name="gallery_info">갤러리 정보</string>
|
||||
<string name="copied_to_clipboard">클립보드에 복사되었습니다.</string>
|
||||
<string name="copied_to_clipboard">클립보드에 복사했습니다.</string>
|
||||
<string name="header_key">키</string>
|
||||
<string name="header_value">값</string>
|
||||
<string name="key_gid">GID</string>
|
||||
@@ -340,13 +340,27 @@
|
||||
<string name="apply">적용</string>
|
||||
<string name="apply_tip">설정을 저장하려면 체크 표시를 누르세요.</string>
|
||||
|
||||
<!-- Hosts Activity -->
|
||||
<string name="hosts">사용자 지정 hosts.txt</string>
|
||||
<string name="hosts_tip">hosts.txt</string>
|
||||
<string name="hosts_host">호스트</string>
|
||||
<string name="hosts_ip">IP</string>
|
||||
<string name="add_host">호스트 추가</string>
|
||||
<string name="add_host_add">추가</string>
|
||||
<string name="edit_host">호스트 편집</string>
|
||||
<string name="edit_host_confirm">확인</string>
|
||||
<string name="edit_host_delete">삭제</string>
|
||||
<string name="invalid_host">잘못된 호스트</string>
|
||||
<string name="invalid_ip">잘못된 IP</string>
|
||||
|
||||
<!-- Gallery Activity -->
|
||||
<string name="page_menu_title">페이지 %d</string>
|
||||
<string name="page_menu_save">저장</string>
|
||||
<string name="page_menu_save_to">다른 이름으로 저장</string>
|
||||
<string name="page_menu_add_bookmark">북마크에 추가</string>
|
||||
<string name="gallery_menu_title">메뉴</string>
|
||||
<string name="share_image">이미지 공유</string>
|
||||
<string name="image_saved">이미지가 %s 경로에 저장됨</string>
|
||||
<string name="image_saved">이미지를 %s 경로에 저장함</string>
|
||||
|
||||
<string name="settings_eh">EH</string>
|
||||
<string name="settings_eh_sign_out">로그아웃</string>
|
||||
@@ -354,7 +368,7 @@
|
||||
<string name="settings_u_config">E-Hentai 설정</string>
|
||||
<string name="settings_u_config_summary">E-Hentai 사이트의 설정 페이지를 엽니다.</string>
|
||||
<string name="settings_eh_sign_out_warning">정말 로그아웃하시겠습니까?</string>
|
||||
<string name="settings_eh_sign_out_tip">로그아웃되었습니다. 로그인하려면 앱을 다시 시작하세요.</string>
|
||||
<string name="settings_eh_sign_out_tip">로그아웃했습니다. 로그인하려면 앱을 다시 시작하세요.</string>
|
||||
<string name="settings_eh_gallery_site">갤러리 사이트</string>
|
||||
<string name="settings_eh_list_mode">목록 모드</string>
|
||||
<string name="settings_eh_list_mode_detail">자세히</string>
|
||||
@@ -454,13 +468,18 @@
|
||||
<string name="settings_advanced_dump_logcat">로그캣 덤프</string>
|
||||
<string name="settings_advanced_dump_logcat_summary">외부 저장소에 로그캣 저장</string>
|
||||
<string name="settings_advanced_dump_logcat_failed">로그캣을 덤프하지 못했습니다.</string>
|
||||
<string name="settings_advanced_dump_logcat_to">%s 경로에 로그캣이 저장되었습니다.</string>
|
||||
<string name="settings_advanced_dump_logcat_to">%s 경로에 로그캣을 저장했습니다.</string>
|
||||
<string name="settings_advanced_clear_download_path_cache">다운로드 경로 캐시 삭제</string>
|
||||
<string name="settings_advanced_clear_download_path_cache_summary">갤러리 다운로드 경로가 잘못되었을 때 다운로드 경로 캐시를 삭제하면 문제가 해결될 수 있습니다.</string>
|
||||
<string name="settings_advanced_clear_download_path_cache_summary">갤러리 다운로드 경로가 잘못되었을 때 다운로드 경로 캐시를 삭제하면 문제를 해결할 수 있습니다.</string>
|
||||
<string name="settings_advanced_clear_download_path_cache_message">다운로드 경로 캐시를 지우시겠습니까?</string>
|
||||
<string name="settings_advanced_clear_memory_cache">메모리 캐시 삭제</string>
|
||||
<string name="settings_advanced_clear_memory_cache_summary">섬네일, 갤러리 정보 메모리 캐시 삭제</string>
|
||||
<string name="settings_advanced_read_cache_size">읽기 캐시 크기</string>
|
||||
<string name="settings_advanced_app_language_title">앱 언어 (Language)</string>
|
||||
<string name="settings_advanced_built_in_hosts_title">앱 내장 hosts.txt</string>
|
||||
<string name="settings_advanced_built_in_hosts_summary">앱에 내장된 호스트-IP 지정 규칙을 사용합니다.\n대신 사용자 지정 hosts.txt 파일을 사용할 수도 있습니다.</string>
|
||||
<string name="settings_advanced_custom_hosts_title">사용자 지정 hosts.txt</string>
|
||||
<string name="settings_advanced_custom_hosts_summary">호스트 이름을 IP 주소에 지정합니다.\n앱에 내장된 규칙은 무시됩니다.</string>
|
||||
<string name="settings_privacy_pattern_protection_title">패턴 보호</string>
|
||||
<string name="settings_privacy_pattern_protection_not_set">패턴 보호가 설정되어 있지 않음</string>
|
||||
<string name="settings_privacy_pattern_protection_set">패턴 보호가 설정됨</string>
|
||||
@@ -487,6 +506,7 @@
|
||||
<string name="settings_privacy_about_analytics">데이터 분석 정보</string>
|
||||
<string name="settings_about_version">빌드 버전</string>
|
||||
<string name="settings_about_check_for_updates">업데이트 확인</string>
|
||||
<string name="settings_about_auto_check_for_updates">업데이트 자동 확인</string>
|
||||
<string name="settings_about_beta_update_channel">베타 업데이트 채널</string>
|
||||
<string name="settings_about_beta_update_channel_summary">베타 버전은 사용자의 기기에서 정상적으로 작동하지 않을 수 있습니다.</string>
|
||||
|
||||
@@ -503,6 +523,8 @@
|
||||
<string name="cant_find_any_data">데이터를 가져올 수 없습니다.</string>
|
||||
<string name="cant_read_the_file">파일을 읽을 수 없습니다.</string>
|
||||
|
||||
<string name="app_language_system">시스템 언어 (기본값)</string>
|
||||
|
||||
<!-- ExcludedLanguagesScene -->
|
||||
<string name="excluded_languages">제외할 언어</string>
|
||||
<string name="select_all">모두 선택</string>
|
||||
@@ -609,4 +631,5 @@
|
||||
<string name="settings_privacy_secure">화면 캡처 허용 안 함</string>
|
||||
<string name="settings_privacy_secure_summary">이 옵션을 켜면 이 앱에서 스크린샷을 찍을 수 없고, 멀티태스킹 화면에서 앱의 내용을 볼 수 없습니다.\n\n이 옵션을 변경하면 앱을 다시 시작해야 합니다.</string>
|
||||
|
||||
<string name="download_service">다운로드 서비스</string>
|
||||
</resources>
|
||||
@@ -373,6 +373,7 @@
|
||||
<string name="page_menu_refresh">@string/refresh</string>
|
||||
<string name="page_menu_share">@string/share</string>
|
||||
<string name="page_menu_save">保存</string>
|
||||
<string name="page_menu_save_to">保存到...</string>
|
||||
<string name="page_menu_add_bookmark">添加书签</string>
|
||||
<string name="gallery_menu_title">菜单</string>
|
||||
<string name="share_image">分享图片</string>
|
||||
@@ -493,6 +494,7 @@
|
||||
<string name="settings_advanced_clear_memory_cache">清理内存缓存</string>
|
||||
<string name="settings_advanced_clear_memory_cache_summary">清理缩略图、画廊信息的内存缓存</string>
|
||||
<string name="settings_advanced_read_cache_size">阅读缓存大小</string>
|
||||
<string name="settings_advanced_app_language_title">App 界面语言</string>
|
||||
<string name="settings_advanced_built_in_hosts_title">内置 hosts.txt</string>
|
||||
<string name="settings_advanced_built_in_hosts_summary">应用提供的主机到IP的映射\n可被自定义 hosts.txt 覆盖</string>
|
||||
<string name="settings_advanced_custom_hosts_title">自定义 hosts.txt</string>
|
||||
@@ -525,6 +527,7 @@
|
||||
<string name="settings_privacy_about_analytics">关于数据统计</string>
|
||||
<string name="settings_about_version">版本号</string>
|
||||
<string name="settings_about_check_for_updates">检查更新</string>
|
||||
<string name="settings_about_auto_check_for_updates">自动检查更新</string>
|
||||
<string name="settings_about_beta_update_channel">更新测试版</string>
|
||||
<string name="settings_about_beta_update_channel_summary">测试版可能在你的设备上出现不可预知的错误</string>
|
||||
|
||||
@@ -570,6 +573,8 @@
|
||||
<string name="cant_find_any_data">找不到任何数据</string>
|
||||
<string name="cant_read_the_file">无法读取文件</string>
|
||||
|
||||
<string name="app_language_system">系统语言(默认)</string>
|
||||
|
||||
<!-- License -->
|
||||
<string name="license">开源许可</string>
|
||||
|
||||
|
||||
@@ -493,6 +493,7 @@
|
||||
<string name="settings_advanced_clear_memory_cache">清理內存緩存</string>
|
||||
<string name="settings_advanced_clear_memory_cache_summary">清理縮略圖、畫廊信息的內存緩存</string>
|
||||
<string name="settings_advanced_read_cache_size">閲讀緩存大小</string>
|
||||
<string name="settings_advanced_app_language_title">App 界面語言</string>
|
||||
<string name="settings_advanced_built_in_hosts_title">內置 hosts.txt</string>
|
||||
<string name="settings_advanced_built_in_hosts_summary">應用提供的主機到IP的映射\n可被自定義 hosts.txt 覆蓋</string>
|
||||
<string name="settings_advanced_custom_hosts_title">自定義 hosts.txt</string>
|
||||
@@ -570,6 +571,8 @@
|
||||
<string name="cant_find_any_data">找不到任何數據</string>
|
||||
<string name="cant_read_the_file">無法讀取文件</string>
|
||||
|
||||
<string name="app_language_system">系統語言(默認)</string>
|
||||
|
||||
<!-- License -->
|
||||
<string name="license">開源許可</string>
|
||||
|
||||
|
||||
@@ -493,6 +493,7 @@
|
||||
<string name="settings_advanced_clear_memory_cache">清除記憶體快取</string>
|
||||
<string name="settings_advanced_clear_memory_cache_summary">清除縮圖、圖庫詳細資料的記憶體快取</string>
|
||||
<string name="settings_advanced_read_cache_size">閱讀快取大小</string>
|
||||
<string name="settings_advanced_app_language_title">App 介面語言</string>
|
||||
<string name="settings_advanced_built_in_hosts_title">內建 hosts.txt</string>
|
||||
<string name="settings_advanced_built_in_hosts_summary">應用提供的主機到IP的對映\n可被自定義 hosts.txt 覆蓋</string>
|
||||
<string name="settings_advanced_custom_hosts_title">自定義 hosts.txt</string>
|
||||
@@ -570,6 +571,8 @@
|
||||
<string name="cant_find_any_data">找不到任何資料</string>
|
||||
<string name="cant_read_the_file">無法讀取檔案</string>
|
||||
|
||||
<string name="app_language_system">系統語言(預設)</string>
|
||||
|
||||
<!-- License -->
|
||||
<string name="license">授權</string>
|
||||
|
||||
|
||||
@@ -200,12 +200,6 @@
|
||||
<item>640</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="page_menu_entries">
|
||||
<item>@string/page_menu_refresh</item>
|
||||
<item>@string/page_menu_share</item>
|
||||
<item>@string/page_menu_save</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="gallery_list_menu_entries">
|
||||
<item>@string/download</item>
|
||||
<item>@string/add_to_favourites</item>
|
||||
@@ -223,4 +217,26 @@
|
||||
<item>@string/add_filter</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="app_language_entries">
|
||||
<item>@string/app_language_system</item>
|
||||
<item>@string/app_language_en</item>
|
||||
<item>@string/app_language_es</item>
|
||||
<item>@string/app_language_ja</item>
|
||||
<item>@string/app_language_ko</item>
|
||||
<item>@string/app_language_zh_cn</item>
|
||||
<item>@string/app_language_zh_hk</item>
|
||||
<item>@string/app_language_zh_tw</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="app_language_entry_values">
|
||||
<item>system</item>
|
||||
<item>en</item>
|
||||
<item>es</item>
|
||||
<item>ja</item>
|
||||
<item>ko</item>
|
||||
<item>zh-CN</item>
|
||||
<item>zh-HK</item>
|
||||
<item>zh-TW</item>
|
||||
</string-array>
|
||||
|
||||
</resources>
|
||||
@@ -19,5 +19,5 @@
|
||||
|
||||
<bool name="beta">false</bool>
|
||||
<bool name="dad_spin_bars">true</bool>
|
||||
|
||||
<bool name="auto_check_update">true</bool>
|
||||
</resources>
|
||||
@@ -114,4 +114,6 @@
|
||||
<color name="lock_pattern_view_success_color">@color/colorPrimary</color>
|
||||
<color name="lock_pattern_view_error_color">@color/red_500</color>
|
||||
|
||||
<!--Shortcut background-->
|
||||
<color name="shortcut_bg">#F5F5F5</color>
|
||||
</resources>
|
||||
@@ -417,6 +417,7 @@
|
||||
<string name="page_menu_refresh">@string/refresh</string>
|
||||
<string name="page_menu_share">@string/share</string>
|
||||
<string name="page_menu_save">Save</string>
|
||||
<string name="page_menu_save_to">Save to...</string>
|
||||
<string name="page_menu_add_bookmark">Add a bookmark</string>
|
||||
<string name="gallery_menu_title">Menu</string>
|
||||
<string name="share_image">Share image</string>
|
||||
@@ -536,6 +537,7 @@
|
||||
<string name="settings_advanced_clear_memory_cache">Clear memory cache</string>
|
||||
<string name="settings_advanced_clear_memory_cache_summary">Clear thumb, gallery info memory cache</string>
|
||||
<string name="settings_advanced_read_cache_size">Read cache size</string>
|
||||
<string name="settings_advanced_app_language_title">App language</string>
|
||||
<string name="settings_advanced_built_in_hosts_title">Built-in hosts.txt</string>
|
||||
<string name="settings_advanced_built_in_hosts_summary">The host-to-IP mapping provided by the app\nIt can be overrode by custom hosts.txt</string>
|
||||
<string name="settings_advanced_custom_hosts_title">Custom hosts.txt</string>
|
||||
@@ -570,6 +572,7 @@
|
||||
<string name="settings_privacy_about_analytics">About analytics</string>
|
||||
<string name="settings_about_version">Build version</string>
|
||||
<string name="settings_about_check_for_updates">Check for updates</string>
|
||||
<string name="settings_about_auto_check_for_updates">Auto check for updates</string>
|
||||
<string name="settings_about_beta_update_channel">Beta update channel</string>
|
||||
<string name="settings_about_beta_update_channel_summary">Beta release might be broken on your devices</string>
|
||||
|
||||
@@ -586,6 +589,15 @@
|
||||
<string name="cant_find_any_data">Can\'t find any data</string>
|
||||
<string name="cant_read_the_file">Can\'t read the file</string>
|
||||
|
||||
<string name="app_language_system">System Language (Default)</string>
|
||||
<string name="app_language_en" translatable="false">English</string>
|
||||
<string name="app_language_es" translatable="false">Español</string>
|
||||
<string name="app_language_ja" translatable="false">日本語</string>
|
||||
<string name="app_language_ko" translatable="false">한국어</string>
|
||||
<string name="app_language_zh_cn" translatable="false">中文(大陆)</string>
|
||||
<string name="app_language_zh_hk" translatable="false">中文(香港)</string>
|
||||
<string name="app_language_zh_tw" translatable="false">國文(臺灣)</string>
|
||||
|
||||
<!-- ExcludedLanguagesScene -->
|
||||
<string name="excluded_languages">Excluded languages</string>
|
||||
<string name="select_all">All</string>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shortcuts xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<shortcut
|
||||
android:shortcutId="start_all"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/ic_shortcut_start"
|
||||
android:shortcutShortLabel="@string/download_start_all"
|
||||
android:shortcutLongLabel="@string/download_start_all"
|
||||
android:shortcutDisabledMessage="@string/download_start_all">
|
||||
<intent
|
||||
android:action="start_all"
|
||||
android:targetPackage="com.hippo.ehviewer"
|
||||
android:targetClass="com.hippo.ehviewer.shortcuts.ShortcutsActivity"/>
|
||||
<categories android:name="android.shortcut.conversation" />
|
||||
</shortcut>
|
||||
|
||||
<shortcut
|
||||
android:shortcutId="stop_all"
|
||||
android:enabled="true"
|
||||
android:icon="@drawable/ic_shortcut_stop"
|
||||
android:shortcutShortLabel="@string/download_stop_all"
|
||||
android:shortcutLongLabel="@string/download_stop_all"
|
||||
android:shortcutDisabledMessage="@string/download_stop_all">
|
||||
<intent
|
||||
android:action="stop_all"
|
||||
android:targetPackage="com.hippo.ehviewer"
|
||||
android:targetClass="com.hippo.ehviewer.shortcuts.ShortcutsActivity" />
|
||||
<categories android:name="android.shortcut.conversation" />
|
||||
</shortcut>
|
||||
|
||||
</shortcuts>
|
||||
@@ -72,6 +72,11 @@
|
||||
android:summary="@string/settings_about_beta_update_channel_summary"
|
||||
android:defaultValue="@bool/beta"/>
|
||||
|
||||
<com.hippo.preference.SwitchPreference
|
||||
android:key="auto_check_for_updates"
|
||||
android:title="@string/settings_about_auto_check_for_updates"
|
||||
android:defaultValue="@bool/auto_check_update"/>
|
||||
|
||||
<Preference
|
||||
android:key="donate"
|
||||
android:title="@string/settings_about_donate"/>
|
||||
|
||||
@@ -48,6 +48,15 @@
|
||||
app:entryValues="@array/read_cache_size_entry_values"
|
||||
android:defaultValue="160"/>
|
||||
|
||||
<com.hippo.preference.ListPreference
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:key="app_language"
|
||||
android:title="@string/settings_advanced_app_language_title"
|
||||
android:summary="%s"
|
||||
app:entries="@array/app_language_entries"
|
||||
app:entryValues="@array/app_language_entry_values"
|
||||
android:defaultValue="system"/>
|
||||
|
||||
<com.hippo.preference.SwitchPreference
|
||||
android:key="built_in_hosts"
|
||||
android:title="@string/settings_advanced_built_in_hosts_title"
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
|
||||
<path xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<external-path name="image" path="EhViewer/image"/>
|
||||
<external-path name="temp" path="EhViewer/temp"/>
|
||||
|
||||
</path>
|
||||
+2
-2
@@ -7,7 +7,7 @@ buildscript {
|
||||
maven { url "https://jitpack.io" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
classpath 'com.android.tools.build:gradle:3.1.2'
|
||||
classpath 'com.github.seven332:android-chinese-string-gradle-plugin:0.1.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
@@ -28,7 +28,7 @@ task clean(type: Delete) {
|
||||
}
|
||||
|
||||
ext {
|
||||
supportLibrary = '27.1.0'
|
||||
supportLibrary = '27.1.1'
|
||||
}
|
||||
|
||||
subprojects {
|
||||
|
||||
@@ -498,7 +498,12 @@ public class EhDaoGenerator {
|
||||
javaClass.getField("mode").setPublic();
|
||||
javaClass.getField("text").setPublic();
|
||||
javaClass.getField("enable").setPublic();
|
||||
// Add equals method
|
||||
// Add hashCode method and equals method
|
||||
javaClass.addImport("com.hippo.util.HashCodeUtils");
|
||||
javaClass.addMethod("\t@Override\n" +
|
||||
"\tpublic int hashCode() {\n" +
|
||||
"\t\treturn HashCodeUtils.hashCode(mode, text);\n" +
|
||||
"\t}");
|
||||
javaClass.addImport("com.hippo.yorozuya.ObjectUtils");
|
||||
javaClass.addMethod("\t@Override\n" +
|
||||
"\tpublic boolean equals(Object o) {\n" +
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#Sun Feb 25 19:25:50 CST 2018
|
||||
#Tue Mar 27 10:11:31 CST 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||
Reference in new issue
Block a user