\ Rikka /

This commit is contained in:
NekoInverter 2020-02-04 14:39:28 +08:00
parent f27bb1fbef
commit 03f6ecac0e
12 changed files with 94 additions and 161 deletions

View File

@ -32,8 +32,8 @@ dependencies {
implementation "com.github.topjohnwu.libsu:core:2.5.0" implementation "com.github.topjohnwu.libsu:core:2.5.0"
implementation 'androidx.browser:browser:1.2.0' implementation 'androidx.browser:browser:1.2.0'
implementation 'com.timehop.stickyheadersrecyclerview:library:0.4.3@aar' implementation 'com.timehop.stickyheadersrecyclerview:library:0.4.3@aar'
implementation 'com.takisoft.preferencex:preferencex:1.1.0' implementation 'moe.shizuku.preference:preference-appcompat:4.1.0-alpha02'
implementation 'com.takisoft.preferencex:preferencex-simplemenu:1.1.0' implementation 'moe.shizuku.preference:preference-simplemenu-appcompat:4.1.0-alpha02'
implementation "androidx.recyclerview:recyclerview:1.2.0-alpha01" implementation "androidx.recyclerview:recyclerview:1.2.0-alpha01"
implementation 'com.annimon:stream:1.2.0' implementation 'com.annimon:stream:1.2.0'
implementation 'com.google.code.gson:gson:2.8.6' implementation 'com.google.code.gson:gson:2.8.6'

View File

@ -4,21 +4,20 @@ import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.os.Bundle; import android.os.Bundle;
import androidx.preference.PreferenceManager;
import com.takisoft.preferencex.PreferenceFragmentCompat;
import org.meowcat.edxposed.manager.repo.Module; import org.meowcat.edxposed.manager.repo.Module;
import org.meowcat.edxposed.manager.util.PrefixedSharedPreferences; import org.meowcat.edxposed.manager.util.PrefixedSharedPreferences;
import org.meowcat.edxposed.manager.util.RepoLoader; import org.meowcat.edxposed.manager.util.RepoLoader;
import java.util.Map; import java.util.Map;
public class DownloadDetailsSettingsFragment extends PreferenceFragmentCompat { import moe.shizuku.preference.PreferenceFragment;
import moe.shizuku.preference.PreferenceManager;
public class DownloadDetailsSettingsFragment extends PreferenceFragment {
@Override @Override
public void onCreatePreferencesFix(Bundle savedInstanceState, String rootKey) { public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
DownloadDetailsActivity mActivity = (DownloadDetailsActivity) getActivity(); DownloadDetailsActivity mActivity = (DownloadDetailsActivity) getActivity();
if (mActivity == null) { if (mActivity == null) {
return; return;

View File

@ -60,12 +60,10 @@ import java.io.InputStream;
import java.io.InputStreamReader; import java.io.InputStreamReader;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Locale;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
@ -80,7 +78,7 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
private SearchView mSearchView; private SearchView mSearchView;
private SearchView.OnQueryTextListener mSearchListener; private SearchView.OnQueryTextListener mSearchListener;
private PackageManager mPm; private PackageManager mPm;
private DateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()); private DateFormat dateformat = DateFormat.getDateInstance(DateFormat.SHORT);
private ModuleUtil mModuleUtil; private ModuleUtil mModuleUtil;
private ModuleAdapter mAdapter = null; private ModuleAdapter mAdapter = null;
private MenuItem mClickedMenuItem = null; private MenuItem mClickedMenuItem = null;
@ -533,13 +531,9 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
packageTv.setText(item.packageName); packageTv.setText(item.packageName);
packageTv.setSelected(true); packageTv.setSelected(true);
TextView installTimeTv = holder.appInstallTime; String creationDate = dateformat.format(new Date(item.installTime));
installTimeTv.setText(dateformat.format(new Date(item.installTime))); String updateDate = dateformat.format(new Date(item.updateTime));
installTimeTv.setSelected(true); holder.timestamps.setText(getString(R.string.install_timestamps, creationDate, updateDate));
TextView updateTv = holder.appUpdateTime;
updateTv.setText(dateformat.format(new Date(item.updateTime)));
updateTv.setSelected(true);
holder.appIcon.setImageDrawable(item.getIcon()); holder.appIcon.setImageDrawable(item.getIcon());
@ -620,8 +614,7 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
TextView appPackage; TextView appPackage;
TextView appDescription; TextView appDescription;
TextView appVersion; TextView appVersion;
TextView appInstallTime; TextView timestamps;
TextView appUpdateTime;
TextView warningText; TextView warningText;
Switch mSwitch; Switch mSwitch;
@ -632,8 +625,7 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
appDescription = itemView.findViewById(R.id.description); appDescription = itemView.findViewById(R.id.description);
appPackage = itemView.findViewById(R.id.package_name); appPackage = itemView.findViewById(R.id.package_name);
appVersion = itemView.findViewById(R.id.version_name); appVersion = itemView.findViewById(R.id.version_name);
appInstallTime = itemView.findViewById(R.id.tvInstallTime); timestamps = itemView.findViewById(R.id.timestamps);
appUpdateTime = itemView.findViewById(R.id.tvUpdateTime);
warningText = itemView.findViewById(R.id.warning); warningText = itemView.findViewById(R.id.warning);
mSwitch = itemView.findViewById(R.id.checkbox); mSwitch = itemView.findViewById(R.id.checkbox);
} }

View File

@ -8,7 +8,6 @@ import android.os.Bundle;
import android.os.FileUtils; import android.os.FileUtils;
import android.view.View; import android.view.View;
import android.widget.FrameLayout; import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.Toast; import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -16,11 +15,8 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import androidx.preference.Preference;
import androidx.preference.SwitchPreference;
import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.takisoft.preferencex.PreferenceFragmentCompat;
import com.topjohnwu.superuser.Shell; import com.topjohnwu.superuser.Shell;
import org.meowcat.edxposed.manager.util.RepoLoader; import org.meowcat.edxposed.manager.util.RepoLoader;
@ -31,6 +27,10 @@ import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.util.Objects; import java.util.Objects;
import moe.shizuku.preference.Preference;
import moe.shizuku.preference.PreferenceFragment;
import moe.shizuku.preference.SwitchPreference;
public class SettingsActivity extends BaseActivity { public class SettingsActivity extends BaseActivity {
@Override @Override
@ -47,13 +47,13 @@ public class SettingsActivity extends BaseActivity {
setupWindowInsets(); setupWindowInsets();
if (savedInstanceState == null) { if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction() getSupportFragmentManager().beginTransaction()
.add(R.id.container, SettingsFragment.newInstance(findViewById(R.id.snackbar))).commit(); .add(R.id.container, new SettingsFragment()).commit();
} }
} }
@SuppressWarnings({"ResultOfMethodCallIgnored", "deprecation"}) @SuppressWarnings({"ResultOfMethodCallIgnored", "deprecation"})
public static class SettingsFragment extends PreferenceFragmentCompat implements Preference.OnPreferenceClickListener, SharedPreferences.OnSharedPreferenceChangeListener { public static class SettingsFragment extends PreferenceFragment implements Preference.OnPreferenceClickListener, SharedPreferences.OnSharedPreferenceChangeListener {
static final File mDisableResourcesFlag = new File(XposedApp.BASE_DIR + "conf/disable_resources"); static final File mDisableResourcesFlag = new File(XposedApp.BASE_DIR + "conf/disable_resources");
static final File mDynamicModulesFlag = new File(XposedApp.BASE_DIR + "conf/dynamicmodules"); static final File mDynamicModulesFlag = new File(XposedApp.BASE_DIR + "conf/dynamicmodules");
static final File mDeoptBootFlag = new File(XposedApp.BASE_DIR + "conf/deoptbootimage"); static final File mDeoptBootFlag = new File(XposedApp.BASE_DIR + "conf/deoptbootimage");
@ -67,14 +67,6 @@ public class SettingsActivity extends BaseActivity {
private Preference stopVerboseLog; private Preference stopVerboseLog;
private Preference stopLog; private Preference stopLog;
private View rootView;
static SettingsFragment newInstance(View rootView) {
SettingsFragment fragment = new SettingsFragment();
fragment.setRootView(rootView);
return fragment;
}
@SuppressWarnings("SameParameterValue") @SuppressWarnings("SameParameterValue")
@SuppressLint({"WorldReadableFiles", "WorldWriteableFiles"}) @SuppressLint({"WorldReadableFiles", "WorldWriteableFiles"})
static void setFilePermissionsFromMode(String name, int mode) { static void setFilePermissionsFromMode(String name, int mode) {
@ -89,25 +81,20 @@ public class SettingsActivity extends BaseActivity {
FileUtils.setPermissions(name, perms, -1, -1); FileUtils.setPermissions(name, perms, -1, -1);
} }
void setRootView(View rootView) {
this.rootView = rootView;
}
@SuppressLint({"ObsoleteSdkInt", "WorldReadableFiles"}) @SuppressLint({"ObsoleteSdkInt", "WorldReadableFiles"})
@Override @Override
public void onCreatePreferencesFix(Bundle savedInstanceState, String rootKey) { public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
addPreferencesFromResource(R.xml.prefs); addPreferencesFromResource(R.xml.prefs);
stopVerboseLog = findPreference("stop_verbose_log"); stopVerboseLog = findPreference("stop_verbose_log");
stopLog = findPreference("stop_log"); stopLog = findPreference("stop_log");
//noinspection ConstantConditions
findPreference("release_type_global").setOnPreferenceChangeListener((preference, newValue) -> { findPreference("release_type_global").setOnPreferenceChangeListener((preference, newValue) -> {
RepoLoader.getInstance().setReleaseTypeGlobal((String) newValue); RepoLoader.getInstance().setReleaseTypeGlobal((String) newValue);
return true; return true;
}); });
SwitchPreference prefWhiteListMode = findPreference("white_list_switch"); SwitchPreference prefWhiteListMode = (SwitchPreference) findPreference("white_list_switch");
Objects.requireNonNull(prefWhiteListMode).setChecked(mWhiteListModeFlag.exists()); Objects.requireNonNull(prefWhiteListMode).setChecked(mWhiteListModeFlag.exists());
prefWhiteListMode.setOnPreferenceChangeListener((preference, newValue) -> { prefWhiteListMode.setOnPreferenceChangeListener((preference, newValue) -> {
boolean enabled = (Boolean) newValue; boolean enabled = (Boolean) newValue;
@ -138,7 +125,7 @@ public class SettingsActivity extends BaseActivity {
return (enabled == mWhiteListModeFlag.exists()); return (enabled == mWhiteListModeFlag.exists());
}); });
SwitchPreference prefVerboseLogs = findPreference("disable_verbose_log"); SwitchPreference prefVerboseLogs = (SwitchPreference) findPreference("disable_verbose_log");
Objects.requireNonNull(prefVerboseLogs).setChecked(mDisableVerboseLogsFlag.exists()); Objects.requireNonNull(prefVerboseLogs).setChecked(mDisableVerboseLogsFlag.exists());
prefVerboseLogs.setOnPreferenceChangeListener((preference, newValue) -> { prefVerboseLogs.setOnPreferenceChangeListener((preference, newValue) -> {
boolean enabled = (Boolean) newValue; boolean enabled = (Boolean) newValue;
@ -169,7 +156,7 @@ public class SettingsActivity extends BaseActivity {
return (enabled == mDisableVerboseLogsFlag.exists()); return (enabled == mDisableVerboseLogsFlag.exists());
}); });
SwitchPreference prefModulesLogs = findPreference("disable_modules_log"); SwitchPreference prefModulesLogs = (SwitchPreference) findPreference("disable_modules_log");
Objects.requireNonNull(prefModulesLogs).setChecked(mDisableModulesLogsFlag.exists()); Objects.requireNonNull(prefModulesLogs).setChecked(mDisableModulesLogsFlag.exists());
prefModulesLogs.setOnPreferenceChangeListener((preference, newValue) -> { prefModulesLogs.setOnPreferenceChangeListener((preference, newValue) -> {
boolean enabled = (Boolean) newValue; boolean enabled = (Boolean) newValue;
@ -200,7 +187,7 @@ public class SettingsActivity extends BaseActivity {
return (enabled == mDisableModulesLogsFlag.exists()); return (enabled == mDisableModulesLogsFlag.exists());
}); });
SwitchPreference prefBlackWhiteListMode = findPreference("black_white_list_switch"); SwitchPreference prefBlackWhiteListMode = (SwitchPreference) findPreference("black_white_list_switch");
Objects.requireNonNull(prefBlackWhiteListMode).setChecked(mBlackWhiteListModeFlag.exists()); Objects.requireNonNull(prefBlackWhiteListMode).setChecked(mBlackWhiteListModeFlag.exists());
prefBlackWhiteListMode.setOnPreferenceChangeListener((preference, newValue) -> { prefBlackWhiteListMode.setOnPreferenceChangeListener((preference, newValue) -> {
boolean enabled = (Boolean) newValue; boolean enabled = (Boolean) newValue;
@ -231,7 +218,7 @@ public class SettingsActivity extends BaseActivity {
return (enabled == mBlackWhiteListModeFlag.exists()); return (enabled == mBlackWhiteListModeFlag.exists());
}); });
SwitchPreference prefEnableDeopt = findPreference("enable_boot_image_deopt"); SwitchPreference prefEnableDeopt = (SwitchPreference) findPreference("enable_boot_image_deopt");
Objects.requireNonNull(prefEnableDeopt).setChecked(mDeoptBootFlag.exists()); Objects.requireNonNull(prefEnableDeopt).setChecked(mDeoptBootFlag.exists());
prefEnableDeopt.setOnPreferenceChangeListener((preference, newValue) -> { prefEnableDeopt.setOnPreferenceChangeListener((preference, newValue) -> {
boolean enabled = (Boolean) newValue; boolean enabled = (Boolean) newValue;
@ -262,7 +249,7 @@ public class SettingsActivity extends BaseActivity {
return (enabled == mDeoptBootFlag.exists()); return (enabled == mDeoptBootFlag.exists());
}); });
SwitchPreference prefDynamicResources = findPreference("is_dynamic_modules"); SwitchPreference prefDynamicResources = (SwitchPreference) findPreference("is_dynamic_modules");
Objects.requireNonNull(prefDynamicResources).setChecked(mDynamicModulesFlag.exists()); Objects.requireNonNull(prefDynamicResources).setChecked(mDynamicModulesFlag.exists());
prefDynamicResources.setOnPreferenceChangeListener((preference, newValue) -> { prefDynamicResources.setOnPreferenceChangeListener((preference, newValue) -> {
boolean enabled = (Boolean) newValue; boolean enabled = (Boolean) newValue;
@ -293,7 +280,7 @@ public class SettingsActivity extends BaseActivity {
return (enabled == mDynamicModulesFlag.exists()); return (enabled == mDynamicModulesFlag.exists());
}); });
SwitchPreference prefDisableResources = findPreference("disable_resources"); SwitchPreference prefDisableResources = (SwitchPreference) findPreference("disable_resources");
Objects.requireNonNull(prefDisableResources).setChecked(mDisableResourcesFlag.exists()); Objects.requireNonNull(prefDisableResources).setChecked(mDisableResourcesFlag.exists());
prefDisableResources.setOnPreferenceChangeListener((preference, newValue) -> { prefDisableResources.setOnPreferenceChangeListener((preference, newValue) -> {
boolean enabled = (Boolean) newValue; boolean enabled = (Boolean) newValue;
@ -350,6 +337,12 @@ public class SettingsActivity extends BaseActivity {
getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this); getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
} }
@Override
public DividerDecoration onCreateItemDecoration() {
return new CategoryDivideDividerDecoration();
//return new DefaultDividerDecoration();
}
@Override @Override
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
if (key.contains("theme") || key.equals("ignore_chinese")) { if (key.contains("theme") || key.equals("ignore_chinese")) {
@ -368,11 +361,7 @@ public class SettingsActivity extends BaseActivity {
new Runnable() { new Runnable() {
@Override @Override
public void run() { public void run() {
areYouSure(R.string.stop_verbose_log_summary, (dialog, which) -> { areYouSure(R.string.stop_verbose_log_summary, (dialog, which) -> Shell.su("kill $(cat " + mVerboseLogProcessID.getAbsolutePath() + ")").exec());
Shell.su("kill $(cat " + mVerboseLogProcessID.getAbsolutePath() + ")").exec();
});
} }
}; };
} else if (preference.getKey().equals(stopLog.getKey())) { } else if (preference.getKey().equals(stopLog.getKey())) {
@ -397,13 +386,8 @@ public class SettingsActivity extends BaseActivity {
@Override @Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
if (rootView == null) { ((FrameLayout) view).setClipChildren(false);
return; ((FrameLayout) view).setClipToPadding(false);
}
((LinearLayout) ((FrameLayout) rootView.findViewById(R.id.container)).getChildAt(0)).setClipToPadding(false);
((LinearLayout) ((FrameLayout) rootView.findViewById(R.id.container)).getChildAt(0)).setClipChildren(false);
((FrameLayout) ((LinearLayout) view).getChildAt(0)).setClipChildren(false);
((FrameLayout) ((LinearLayout) view).getChildAt(0)).setClipToPadding(false);
} }
} }
} }

View File

@ -22,13 +22,11 @@ import org.meowcat.edxposed.manager.XposedApp;
import org.meowcat.edxposed.manager.util.InstallApkUtil; import org.meowcat.edxposed.manager.util.InstallApkUtil;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Locale;
public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> { public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> {
@ -36,7 +34,7 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> {
private final ApplicationInfo.DisplayNameComparator displayNameComparator; private final ApplicationInfo.DisplayNameComparator displayNameComparator;
private Callback callback; private Callback callback;
private List<ApplicationInfo> fullList, showList; private List<ApplicationInfo> fullList, showList;
private DateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()); private DateFormat dateformat = DateFormat.getDateInstance(DateFormat.SHORT);
private List<String> checkedList; private List<String> checkedList;
private PackageManager pm; private PackageManager pm;
private ApplicationFilter filter; private ApplicationFilter filter;
@ -174,8 +172,9 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> {
holder.appName.setText(InstallApkUtil.getAppLabel(info, pm)); holder.appName.setText(InstallApkUtil.getAppLabel(info, pm));
try { try {
holder.appVersion.setText(pm.getPackageInfo(info.packageName, 0).versionName); holder.appVersion.setText(pm.getPackageInfo(info.packageName, 0).versionName);
holder.appInstallTime.setText(dateformat.format(new Date(pm.getPackageInfo(info.packageName, 0).firstInstallTime))); String creationDate = dateformat.format(new Date(pm.getPackageInfo(info.packageName, 0).firstInstallTime));
holder.appUpdateTime.setText(dateformat.format(new Date(pm.getPackageInfo(info.packageName, 0).lastUpdateTime))); String updateDate = dateformat.format(new Date(pm.getPackageInfo(info.packageName, 0).lastUpdateTime));
holder.timestamps.setText(holder.itemView.getContext().getString(R.string.install_timestamps, creationDate, updateDate));
} catch (PackageManager.NameNotFoundException e) { } catch (PackageManager.NameNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
} }
@ -222,8 +221,7 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> {
TextView appName; TextView appName;
TextView appPackage; TextView appPackage;
TextView appVersion; TextView appVersion;
TextView appInstallTime; TextView timestamps;
TextView appUpdateTime;
Switch mSwitch; Switch mSwitch;
ViewHolder(View itemView) { ViewHolder(View itemView) {
@ -232,8 +230,7 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> {
appName = itemView.findViewById(R.id.app_name); appName = itemView.findViewById(R.id.app_name);
appPackage = itemView.findViewById(R.id.package_name); appPackage = itemView.findViewById(R.id.package_name);
appVersion = itemView.findViewById(R.id.version_name); appVersion = itemView.findViewById(R.id.version_name);
appInstallTime = itemView.findViewById(R.id.tvInstallTime); timestamps = itemView.findViewById(R.id.timestamps);
appUpdateTime = itemView.findViewById(R.id.tvUpdateTime);
mSwitch = itemView.findViewById(R.id.checkbox); mSwitch = itemView.findViewById(R.id.checkbox);
} }
} }

View File

@ -3,14 +3,14 @@ package org.meowcat.edxposed.manager.util;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import androidx.preference.PreferenceManager;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Set; import java.util.Set;
import moe.shizuku.preference.PreferenceManager;
public class PrefixedSharedPreferences implements SharedPreferences { public class PrefixedSharedPreferences implements SharedPreferences {
private final SharedPreferences mBase; private final SharedPreferences mBase;
private final String mPrefix; private final String mPrefix;

View File

@ -4,7 +4,9 @@ import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.util.AttributeSet; import android.util.AttributeSet;
public class IntegerListPreference extends com.takisoft.preferencex.SimpleMenuPreference { import moe.shizuku.preference.SimpleMenuPreference;
public class IntegerListPreference extends SimpleMenuPreference {
public IntegerListPreference(Context context) { public IntegerListPreference(Context context) {
super(context); super(context);
} }

View File

@ -1,5 +1,4 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -9,42 +8,39 @@
android:focusable="true" android:focusable="true"
android:minHeight="?android:attr/listPreferredItemHeight"> android:minHeight="?android:attr/listPreferredItemHeight">
<LinearLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight" android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal" android:orientation="horizontal"
android:padding="8dp"> android:padding="8dp"
android:paddingStart="18dp"
<ImageView android:paddingEnd="12dp">
android:id="@+id/app_icon"
android:layout_width="50dp"
android:layout_height="50dp"
android:gravity="end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/app_name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="4dp"
android:layout_weight="1"
android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_toStartOf="@id/checkbox"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="48dp">
<ImageView
android:id="@+id/app_icon"
android:layout_width="48dp"
android:layout_height="48dp"
tools:ignore="ContentDescription" />
<TextView <TextView
android:id="@+id/app_name" android:id="@+id/app_name"
android:layout_width="0dip" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="4dip" android:layout_alignTop="@id/app_icon"
android:layout_weight="1" android:layout_marginStart="8dp"
android:layout_toEndOf="@id/app_icon"
android:singleLine="false" android:singleLine="false"
android:textAppearance="?android:attr/textAppearanceMedium" android:textAppearance="?android:attr/textAppearanceMedium"
android:textIsSelectable="false" /> android:textIsSelectable="false" />
@ -53,10 +49,10 @@
android:id="@+id/version_name" android:id="@+id/version_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignBaseline="@id/app_name"
android:layout_marginStart="4dip" android:layout_marginStart="4dip"
android:layout_toEndOf="@id/app_name"
android:ellipsize="marquee" android:ellipsize="marquee"
android:gravity="end"
android:marqueeRepeatLimit="marquee_forever"
android:maxWidth="100dp" android:maxWidth="100dp"
android:singleLine="true" android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
@ -64,62 +60,26 @@
android:textIsSelectable="false" android:textIsSelectable="false"
tools:ignore="RtlHardcoded" /> tools:ignore="RtlHardcoded" />
</LinearLayout>
<TextView <TextView
android:id="@+id/package_name" android:id="@+id/package_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/app_name"
android:layout_alignBottom="@id/app_icon"
android:layout_marginStart="8dp"
android:layout_toEndOf="@id/app_icon"
android:ellipsize="end" android:ellipsize="end"
android:singleLine="true" android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:textIsSelectable="false" /> android:textIsSelectable="false" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView <TextView
android:id="@+id/timestamps"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="2dp" android:layout_gravity="center_vertical"
android:text="@string/install_time" /> android:textAppearance="?android:attr/textAppearanceSmall" />
<TextView
android:id="@+id/tvInstallTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:layout_marginStart="4dip"
android:ellipsize="marquee"
android:gravity="end"
android:marqueeRepeatLimit="marquee_forever"
tools:ignore="RtlHardcoded" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
android:text="@string/update_time" />
<TextView
android:id="@+id/tvUpdateTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:layout_marginStart="4dip"
android:ellipsize="marquee"
android:gravity="end"
android:marqueeRepeatLimit="marquee_forever"
tools:ignore="RtlHardcoded" />
</LinearLayout>
<TextView <TextView
android:id="@+id/description" android:id="@+id/description"
@ -127,7 +87,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceSmall" android:textAppearance="?android:attr/textAppearanceSmall"
android:textIsSelectable="false"
android:visibility="gone" /> android:visibility="gone" />
<TextView <TextView
@ -145,13 +104,11 @@
android:id="@+id/checkbox" android:id="@+id/checkbox"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginStart="4dp" android:layout_marginStart="4dp"
android:checked="false" android:checked="false"
android:focusable="false" android:focusable="false" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/app_name"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout> </RelativeLayout>
</FrameLayout> </FrameLayout>

View File

@ -275,8 +275,6 @@
<string name="app_stop">停止</string> <string name="app_stop">停止</string>
<string name="update_description">更新日志</string> <string name="update_description">更新日志</string>
<string name="edxp_installer_installed">你必须先卸载 EdXposed Installer 才能继续使用 EdXposed Manager</string> <string name="edxp_installer_installed">你必须先卸载 EdXposed Installer 才能继续使用 EdXposed Manager</string>
<string name="install_time">安装日期: </string>
<string name="update_time">更新日期: </string>
<string name="show_modules">显示模块和管理器</string> <string name="show_modules">显示模块和管理器</string>
<string name="show_modules_summary">在应用列表内显示模块和管理器\n此选项并不会移除已勾选的应用标识</string> <string name="show_modules_summary">在应用列表内显示模块和管理器\n此选项并不会移除已勾选的应用标识</string>
<string name="compile_failed">优化失败或返回值为空</string> <string name="compile_failed">优化失败或返回值为空</string>
@ -296,5 +294,6 @@
<string name="pref_title_disable_modules_log">禁用模块日志</string> <string name="pref_title_disable_modules_log">禁用模块日志</string>
<string name="pref_disable_modules_log_summary">模块抛出的的异常堆栈仍将正常抓取</string> <string name="pref_disable_modules_log_summary">模块抛出的的异常堆栈仍将正常抓取</string>
<string name="follow_system">跟随系统</string> <string name="follow_system">跟随系统</string>
<string name="pure_black_dark_theme">使用纯黑深色主题</string> <string name="pure_black_dark_theme">使用纯黑深色主题</string>>
<string name="install_timestamps">安装于 %1$s \u00b7 更新于 %2$s</string>
</resources> </resources>

View File

@ -88,6 +88,7 @@
<string name="download_status_installed">Installed (version %s)</string> <string name="download_status_installed">Installed (version %s)</string>
<string name="download_status_update_available">Update available (version %1$s \u2192 %2$s)</string> <string name="download_status_update_available">Update available (version %1$s \u2192 %2$s)</string>
<string name="download_timestamps">Added on %1$s \u00b7 Updated on %2$s</string> <string name="download_timestamps">Added on %1$s \u00b7 Updated on %2$s</string>
<string name="install_timestamps">Installed on %1$s \nUpdated on %2$s</string>
<string name="download_sorting_title">Sorting order</string> <string name="download_sorting_title">Sorting order</string>
<string name="download_sorting_status">Sort by status</string> <string name="download_sorting_status">Sort by status</string>
<string name="download_sorting_updated">Sort by last update</string> <string name="download_sorting_updated">Sort by last update</string>
@ -311,8 +312,6 @@
<string name="app_stop">Stop it</string> <string name="app_stop">Stop it</string>
<string name="update_description">Update Changelog</string> <string name="update_description">Update Changelog</string>
<string name="edxp_installer_installed">You must to uninstall EdXposed Installer to use EdXposed Manager</string> <string name="edxp_installer_installed">You must to uninstall EdXposed Installer to use EdXposed Manager</string>
<string name="install_time">Install time: </string>
<string name="update_time">Update time: </string>
<string name="show_modules">Show modules and manager</string> <string name="show_modules">Show modules and manager</string>
<string name="show_modules_summary">Show modules and manager in application list\nThis option does not remove checked application flag</string> <string name="show_modules_summary">Show modules and manager in application list\nThis option does not remove checked application flag</string>
<string name="compile_failed">Optimization failed or return value is empty</string> <string name="compile_failed">Optimization failed or return value is empty</string>

View File

@ -13,6 +13,7 @@
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">@bool/lightSystemUI <item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">@bool/lightSystemUI
</item> </item>
<item name="android:navigationBarColor">@color/navigationBarColor</item> <item name="android:navigationBarColor">@color/navigationBarColor</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
</style> </style>
<style name="AppThemeMain" parent="AppTheme"> <style name="AppThemeMain" parent="AppTheme">

View File

@ -19,6 +19,9 @@ allprojects {
google() google()
jcenter() jcenter()
maven { url 'https://jitpack.io' } maven { url 'https://jitpack.io' }
maven {
url "https://dl.bintray.com/rikkaw/MaterialPreference"
}
} }
} }