Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1be24053b | ||
|
|
5ddf2b0d8f | ||
|
|
0802b0b4c6 | ||
|
|
2a709e6190 | ||
|
|
156e4f990d | ||
|
|
07c1737597 | ||
|
|
a3f61ab4ef | ||
|
|
7aa3eff23f | ||
|
|
a79375843b | ||
|
|
1b50ce31f5 |
No files matched your search
@@ -1,6 +1,6 @@
|
||||
name: EhViewer
|
||||
|
||||
on: push
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
|
||||
+3
-4
@@ -34,8 +34,8 @@ android {
|
||||
applicationId "moe.tarsin.ehviewer"
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 33
|
||||
versionCode 114528
|
||||
versionName "1.7.28.1"
|
||||
versionCode 114529
|
||||
versionName "1.7.28.2"
|
||||
resConfigs 'zh', 'zh-rCN', 'zh-rHK', 'zh-rTW', 'es', 'ja', 'ko', 'fr', 'de', 'th'
|
||||
}
|
||||
|
||||
@@ -103,11 +103,10 @@ dependencies {
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01'
|
||||
implementation 'androidx.webkit:webkit:1.4.0'
|
||||
implementation 'com.drakeet.drawer:drawer:1.0.3'
|
||||
implementation 'com.google.android.material:material:1.7.0-alpha02'
|
||||
implementation 'com.google.android.material:material:1.7.0-alpha03'
|
||||
implementation 'com.getkeepsafe.taptargetview:taptargetview:1.13.3'
|
||||
implementation 'com.h6ah4i.android.widget.advrecyclerview:advrecyclerview:1.0.0'
|
||||
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.10'
|
||||
implementation 'com.takisoft.preferencex:preferencex:1.1.0'
|
||||
implementation 'dev.rikka.rikkax.core:core-ktx:1.4.1'
|
||||
implementation 'dev.rikka.rikkax.insets:insets:1.3.0'
|
||||
implementation 'dev.rikka.rikkax.layoutinflater:layoutinflater:1.2.0'
|
||||
|
||||
@@ -21,6 +21,7 @@ import android.view.MenuItem;
|
||||
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.hippo.ehviewer.R;
|
||||
@@ -41,6 +42,7 @@ public final class SettingsActivity extends EhActivity {
|
||||
if (savedInstanceState == null) {
|
||||
getSupportFragmentManager()
|
||||
.beginTransaction()
|
||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_MATCH_ACTIVITY_OPEN)
|
||||
.replace(R.id.fragment, new SettingsFragment())
|
||||
.commitAllowingStateLoss();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class AboutFragment extends BasePreferenceFragment {
|
||||
private static final String KEY_CHECK_FOR_UPDATES = "check_for_updates";
|
||||
|
||||
@Override
|
||||
public void onCreatePreferencesFix(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
public void onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
addPreferencesFromResource(R.xml.about_settings);
|
||||
Preference author = findPreference(KEY_AUTHOR);
|
||||
author.setSummary(Html.fromHtml(getString(R.string.settings_about_author_summary).replace('$', '@')));
|
||||
|
||||
@@ -223,7 +223,7 @@ public class AdvancedFragment extends BasePreferenceFragment {
|
||||
});
|
||||
|
||||
@Override
|
||||
public void onCreatePreferencesFix(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
public void onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
addPreferencesFromResource(R.xml.advanced_settings);
|
||||
|
||||
Preference dumpLogcat = findPreference(KEY_DUMP_LOGCAT);
|
||||
|
||||
@@ -22,10 +22,13 @@ import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceFragmentCompat;
|
||||
|
||||
import com.hippo.ehviewer.R;
|
||||
import com.hippo.ehviewer.ui.SettingsActivity;
|
||||
import com.takisoft.preferencex.PreferenceFragmentCompat;
|
||||
|
||||
|
||||
public class BasePreferenceFragment extends PreferenceFragmentCompat
|
||||
@@ -52,10 +55,26 @@ public class BasePreferenceFragment extends PreferenceFragmentCompat
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreatePreferencesFix(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
public void onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPreferenceTreeClick(Preference preference) {
|
||||
String key = preference.getKey();
|
||||
try {
|
||||
Fragment classObj = (Fragment)Class.forName(key).newInstance();
|
||||
requireActivity().getSupportFragmentManager()
|
||||
.beginTransaction()
|
||||
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
|
||||
.replace(R.id.fragment, classObj)
|
||||
.addToBackStack(null)
|
||||
.commitAllowingStateLoss();
|
||||
} catch (ClassNotFoundException | IllegalAccessException | java.lang.InstantiationException ignored) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void setTitle(@StringRes int string) {
|
||||
requireActivity().setTitle(string);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class DownloadFragment extends BasePreferenceFragment {
|
||||
});
|
||||
|
||||
@Override
|
||||
public void onCreatePreferencesFix(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
public void onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
addPreferencesFromResource(R.xml.download_settings);
|
||||
|
||||
Preference mediaScan = findPreference(Settings.KEY_MEDIA_SCAN);
|
||||
|
||||
@@ -31,7 +31,7 @@ import com.hippo.ehviewer.client.EhTagDatabase;
|
||||
public class EhFragment extends BasePreferenceFragment {
|
||||
|
||||
@Override
|
||||
public void onCreatePreferencesFix(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
public void onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
addPreferencesFromResource(R.xml.eh_settings);
|
||||
|
||||
Preference theme = findPreference(Settings.KEY_THEME);
|
||||
|
||||
@@ -28,7 +28,7 @@ import com.hippo.ehviewer.ui.scene.SecurityScene.Companion.isAuthenticationSuppo
|
||||
* Created by Mo10 on 2018/2/10.
|
||||
*/
|
||||
class PrivacyFragment : BasePreferenceFragment() {
|
||||
override fun onCreatePreferencesFix(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
|
||||
addPreferencesFromResource(R.xml.privacy_settings)
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import com.hippo.ehviewer.R;
|
||||
public class ReadFragment extends BasePreferenceFragment {
|
||||
|
||||
@Override
|
||||
public void onCreatePreferencesFix(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
public void onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
addPreferencesFromResource(R.xml.read_settings);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,12 +21,15 @@ package com.hippo.ehviewer.ui.fragment;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.hippo.ehviewer.R;
|
||||
|
||||
public class SettingsFragment extends BasePreferenceFragment {
|
||||
@Override
|
||||
public void onCreatePreferencesFix(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
public void onCreatePreferences(@Nullable Bundle savedInstanceState, String rootKey) {
|
||||
addPreferencesFromResource(R.xml.settings_headers);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,33 +62,33 @@
|
||||
app:fitsSystemWindowsInsets="bottom">
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_check_all_dark_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_play_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_pause_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_delete_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_folder_move_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
|
||||
@@ -44,42 +44,42 @@
|
||||
app:fitsSystemWindowsInsets="top|bottom">
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_heart_box_dark_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_go_to_dark_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_refresh_dark_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_download_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_delete_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_folder_move_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
|
||||
@@ -51,21 +51,21 @@
|
||||
app:fitsSystemWindowsInsets="top|bottom">
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_magnify_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_go_to_dark_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
style="@style/Widget.Material3.FloatingActionButton.Small.Primary"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:fabSize="mini"
|
||||
app:srcCompat="@drawable/v_refresh_dark_x24" />
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
|
||||
@@ -620,7 +620,7 @@
|
||||
<string name="settings_about_declaration" translatable="false">EhViewer</string>
|
||||
<string name="settings_about_declaration_summary">EhViewer is not affiliated with E-Hentai.org in any way</string>
|
||||
<string name="settings_about_author">Author</string>
|
||||
<string name="settings_about_author_summary" translatable="false"><del>Hippo &lt;ehviewersu$gmail.com&gt;</del><br>NekoInverter &lt;nekoworkshop$protonmail.com&gt; <br>飛鳥澪</string>
|
||||
<string name="settings_about_author_summary" translatable="false"><del>Hippo &lt;ehviewersu$gmail.com&gt;</del><br>NekoInverter<br>飛鳥澪</string>
|
||||
<string name="settings_about_telegram">Telegram</string>
|
||||
<string name="settings_about_latest_release">Latest release</string>
|
||||
<string name="settings_about_website">Website</string>
|
||||
|
||||
@@ -30,9 +30,6 @@
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
<item name="materialSwitchStyle">@style/Widget.Material3.CompoundButton.MaterialSwitch
|
||||
</item>
|
||||
<item name="switchStyle">@style/Widget.Material3.CompoundButton.MaterialSwitch</item>
|
||||
<item name="filterChipStyle">@style/Widget.Material3.Chip.Filter</item>
|
||||
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Rikka.Material3</item>
|
||||
</style>
|
||||
|
||||
@@ -80,8 +80,7 @@
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.hippo.ehviewer.ui.fragment.HostsFragment"
|
||||
android:key="custom_hosts_2"
|
||||
android:key="com.hippo.ehviewer.ui.fragment.HostsFragment"
|
||||
android:summary="@string/settings_advanced_custom_hosts_summary"
|
||||
android:title="@string/settings_advanced_custom_hosts_title"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
@@ -39,15 +39,13 @@
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<com.hippo.ehviewer.preference.SignInRequiredPreference
|
||||
android:fragment="com.hippo.ehviewer.ui.fragment.UConfigFragment"
|
||||
android:key="u_config"
|
||||
android:key="com.hippo.ehviewer.ui.fragment.UConfigFragment"
|
||||
android:summary="@string/settings_u_config_summary"
|
||||
android:title="@string/settings_u_config"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<com.hippo.ehviewer.preference.SignInRequiredPreference
|
||||
android:fragment="com.hippo.ehviewer.ui.fragment.MyTagsFragment"
|
||||
android:key="my_tags"
|
||||
android:key="com.hippo.ehviewer.ui.fragment.MyTagsFragment"
|
||||
android:summary="@string/settings_my_tags_summary"
|
||||
android:title="@string/settings_my_tags"
|
||||
app:iconSpaceReserved="false" />
|
||||
@@ -145,8 +143,7 @@
|
||||
app:url="@string/settings_eh_tag_translations_source_url" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.hippo.ehviewer.ui.fragment.FilterFragment"
|
||||
android:key="filter"
|
||||
android:key="com.hippo.ehviewer.ui.fragment.FilterFragment"
|
||||
android:summary="@string/settings_eh_filter_summary"
|
||||
android:title="@string/settings_eh_filter"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
@@ -17,32 +17,32 @@
|
||||
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<Preference
|
||||
android:fragment="com.hippo.ehviewer.ui.fragment.EhFragment"
|
||||
android:key="com.hippo.ehviewer.ui.fragment.EhFragment"
|
||||
android:icon="@drawable/v_sad_panda_primary_x24"
|
||||
android:title="@string/settings_eh" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.hippo.ehviewer.ui.fragment.ReadFragment"
|
||||
android:key="com.hippo.ehviewer.ui.fragment.ReadFragment"
|
||||
android:icon="@drawable/v_book_open_primary_x24"
|
||||
android:title="@string/settings_read" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.hippo.ehviewer.ui.fragment.DownloadFragment"
|
||||
android:key="com.hippo.ehviewer.ui.fragment.DownloadFragment"
|
||||
android:icon="@drawable/v_download_primary_x24"
|
||||
android:title="@string/settings_download" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.hippo.ehviewer.ui.fragment.PrivacyFragment"
|
||||
android:key="com.hippo.ehviewer.ui.fragment.PrivacyFragment"
|
||||
android:icon="@drawable/v_sec_primary_x24"
|
||||
android:title="@string/settings_privacy" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.hippo.ehviewer.ui.fragment.AdvancedFragment"
|
||||
android:key="com.hippo.ehviewer.ui.fragment.AdvancedFragment"
|
||||
android:icon="@drawable/v_adb_primary_x24"
|
||||
android:title="@string/settings_advanced" />
|
||||
|
||||
<Preference
|
||||
android:fragment="com.hippo.ehviewer.ui.fragment.AboutFragment"
|
||||
android:key="com.hippo.ehviewer.ui.fragment.AboutFragment"
|
||||
android:icon="@drawable/v_info_primary_x24"
|
||||
android:title="@string/settings_about" />
|
||||
</PreferenceScreen>
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
Reference in new issue
Block a user