Update icon & ui adjustments

This commit is contained in:
NekoInverter 2020-02-03 21:38:59 +08:00
parent 7efacfceb3
commit 6476aa1f46
73 changed files with 692 additions and 754 deletions

View File

@ -1,5 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitSharedSettings">
<option name="FORCE_PUSH_PROHIBITED_PATTERNS">
<list />
</option>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>

View File

@ -37,5 +37,5 @@ dependencies {
implementation "androidx.recyclerview:recyclerview:1.2.0-alpha01"
implementation 'com.annimon:stream:1.2.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'de.psdev.licensesdialog:licensesdialog:1.8.3'
implementation 'de.psdev.licensesdialog:licensesdialog:2.1.0'
}

View File

@ -21,46 +21,45 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".CompatListActivity"
android:label="@string/nav_title_compat_list"
android:parentActivityName=".SettingsActivity" />
<activity
android:name=".AboutActivity"
android:label="@string/About"
android:parentActivityName=".MainActivity" />
android:label="@string/About" />
<activity
android:name=".LogsActivity"
android:label="@string/Logs"
android:parentActivityName=".MainActivity" />
android:label="@string/Logs" />
<activity
android:name=".EdDownloadActivity"
android:label="@string/Install"
android:parentActivityName=".MainActivity" />
android:label="@string/Install" />
<activity android:name=".BlackListActivity" />
<activity android:name=".DownloadDetailsActivity" />
<activity
android:name=".DownloadActivity"
android:label="@string/Downloads"
android:parentActivityName=".MainActivity" />
android:label="@string/Downloads" />
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:launchMode="singleTop">
android:launchMode="singleTop"
android:theme="@style/AppThemeMain">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
<activity
android:name=".ModulesActivity"
android:label="@string/Modules"
android:parentActivityName=".MainActivity" />
android:label="@string/Modules" />
<activity
android:name=".SettingsActivity"
android:label="@string/Settings"
android:parentActivityName=".MainActivity" />
android:label="@string/Settings"/>
<receiver
android:name=".receivers.PackageChangeReceiver"
@ -73,7 +72,6 @@
<data android:scheme="package" />
</intent-filter>
</receiver>
<receiver
android:name=".receivers.DownloadReceiver"
android:exported="true"
@ -82,15 +80,12 @@
<action android:name="android.intent.action.DOWNLOAD_COMPLETE" />
</intent-filter>
</receiver>
<receiver
android:name=".util.NotificationUtil$RebootReceiver"
android:exported="false" />
<receiver
android:name=".util.NotificationUtil$ApkReceiver"
android:exported="false" />
<receiver
android:name=".receivers.BootReceiver"
android:enabled="true"
@ -106,7 +101,6 @@
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
</application>
</manifest>

View File

@ -8,6 +8,7 @@ import android.view.View;
import android.widget.TextView;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
@ -15,7 +16,6 @@ import org.meowcat.edxposed.manager.util.NavUtil;
import de.psdev.licensesdialog.LicensesDialog;
import de.psdev.licensesdialog.licenses.ApacheSoftwareLicense20;
import de.psdev.licensesdialog.licenses.MITLicense;
import de.psdev.licensesdialog.model.Notice;
import de.psdev.licensesdialog.model.Notices;
@ -25,11 +25,14 @@ public class AboutActivity extends BaseActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);
setSupportActionBar(findViewById(R.id.toolbar));
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
toolbar.setNavigationOnClickListener(view -> finish());
ActionBar bar = getSupportActionBar();
if (bar != null) {
bar.setDisplayHomeAsUpEnabled(true);
}
setupWindowInsets();
View changelogView = findViewById(R.id.changelogView);
View licensesView = findViewById(R.id.licensesView);
View translatorsView = findViewById(R.id.translatorsView);
@ -88,11 +91,8 @@ public class AboutActivity extends BaseActivity {
private void createLicenseDialog() {
Notices notices = new Notices();
notices.addNotice(new Notice("material-dialogs", "https://github.com/afollestad/material-dialogs", "Copyright (c) 2014-2016 Aidan Michael Follestad", new MITLicense()));
notices.addNotice(new Notice("StickyListHeaders", "https://github.com/emilsjolander/StickyListHeaders", "Emil Sjölander", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("PreferenceFragment-Compat", "https://github.com/Machinarius/PreferenceFragment-Compat", "machinarius", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("libsuperuser", "https://github.com/Chainfire/libsuperuser", "Copyright (C) 2012-2015 Jorrit \"Chainfire\" Jongma", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("picasso", "https://github.com/square/picasso", "Copyright 2013 Square, Inc.", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("sticky-headers-recyclerview", "https://github.com/timehop/sticky-headers-recyclerview", "timehop", new ApacheSoftwareLicense20()));
notices.addNotice(new Notice("libsu", "https://github.com/topjohnwu/libsu", "John Wu", new ApacheSoftwareLicense20()));
new LicensesDialog.Builder(this)
.setNotices(notices)

View File

@ -1,14 +1,18 @@
package org.meowcat.edxposed.manager;
import android.Manifest;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Build;
import android.os.Bundle;
import android.os.Looper;
import android.text.TextUtils;
import android.view.MenuItem;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
@ -18,6 +22,8 @@ import androidx.annotation.StyleRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.core.app.ActivityCompat;
import androidx.core.view.ViewCompat;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.topjohnwu.superuser.Shell;
@ -62,6 +68,15 @@ public class BaseActivity extends AppCompatActivity {
return (configuration.uiMode & Configuration.UI_MODE_NIGHT_YES) > 0;
}
protected void setupWindowInsets() {
View rootView = findViewById(R.id.snackbar);
rootView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
ViewCompat.setOnApplyWindowInsetsListener(rootView, (v, insets) -> {
rootView.setPadding(insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight(), insets.getSystemWindowInsetBottom());
return insets;
});
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@ -142,6 +157,16 @@ public class BaseActivity extends AppCompatActivity {
}
}
public boolean checkPermissions() {
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, XposedApp.WRITE_EXTERNAL_PERMISSION);
}
return true;
}
return false;
}
void reboot(String mode) {
if (startShell())
return;

View File

@ -35,13 +35,6 @@ import java.util.Objects;
import static org.meowcat.edxposed.manager.XposedApp.WRITE_EXTERNAL_PERMISSION;
public class BaseAdvancedInstaller extends Fragment {
// private static final String JAR_PATH = XposedApp.BASE_DIR + "bin/XposedBridge.jar";
// private static final int INSTALL_MODE_NORMAL = 0;
// private static final int INSTALL_MODE_RECOVERY_AUTO = 1;
// private static final int INSTALL_MODE_RECOVERY_MANUAL = 2;
// private static String APP_PROCESS_NAME = null;
//private List<String> messages = new ArrayList<>();
private View mClickedButton;
static BaseAdvancedInstaller newInstance(XposedTab tab) {
@ -69,16 +62,6 @@ public class BaseAdvancedInstaller extends Fragment {
return Objects.requireNonNull(tab).notice;
}
// private String compatibility() {
// XposedTab tab = Objects.requireNonNull(getArguments()).getParcelable("tab");
// return Objects.requireNonNull(tab).getCompatibility();
// }
// private String incompatibility() {
// XposedTab tab = Objects.requireNonNull(getArguments()).getParcelable("tab");
// return Objects.requireNonNull(tab).getIncompatibility();
// }
protected String author() {
XposedTab tab = Objects.requireNonNull(getArguments()).getParcelable("tab");
return Objects.requireNonNull(tab).author;

View File

@ -1,5 +1,6 @@
package org.meowcat.edxposed.manager;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.os.Bundle;
import android.view.Menu;
@ -9,11 +10,14 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import org.meowcat.edxposed.manager.adapters.AppAdapter;
import org.meowcat.edxposed.manager.adapters.AppHelper;
import org.meowcat.edxposed.manager.adapters.BlackListAdapter;
@ -29,13 +33,17 @@ public class BlackListActivity extends BaseActivity implements AppAdapter.Callba
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_black_list);
setSupportActionBar(findViewById(R.id.toolbar));
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
toolbar.setNavigationOnClickListener(view -> finish());
ActionBar bar = getSupportActionBar();
if (bar != null) {
bar.setDisplayHomeAsUpEnabled(true);
}
setupWindowInsets();
mSwipeRefreshLayout = findViewById(R.id.swipeRefreshLayout);
RecyclerView mRecyclerView = findViewById(R.id.recyclerView);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
final boolean isWhiteListMode = isWhiteListMode();
mAppAdapter = new BlackListAdapter(this, isWhiteListMode);
@ -72,6 +80,17 @@ public class BlackListActivity extends BaseActivity implements AppAdapter.Callba
@Override
public void onResume() {
super.onResume();
if (!AppHelper.isBlackListMode()) {
new MaterialAlertDialogBuilder(this)
.setMessage(R.string.warning_list_not_enabled)
.setPositiveButton(R.string.Settings, (dialog, which) -> {
Intent intent = new Intent();
intent.setClass(BlackListActivity.this, SettingsActivity.class);
startActivity(intent);
})
.setCancelable(false)
.show();
}
changeTitle(isBlackListMode(), isWhiteListMode());
}
@ -99,7 +118,6 @@ public class BlackListActivity extends BaseActivity implements AppAdapter.Callba
mAppAdapter.filter(queryStr);
}
@SuppressWarnings("deprecation")
@Override
public void onItemClick(View v, ApplicationInfo info) {
getSupportFragmentManager();

View File

@ -0,0 +1,109 @@
package org.meowcat.edxposed.manager;
import android.content.pm.ApplicationInfo;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import org.meowcat.edxposed.manager.adapters.AppAdapter;
import org.meowcat.edxposed.manager.adapters.AppHelper;
import org.meowcat.edxposed.manager.adapters.CompatListAdapter;
public class CompatListActivity extends BaseActivity implements AppAdapter.Callback {
private SwipeRefreshLayout mSwipeRefreshLayout;
private SearchView mSearchView;
private CompatListAdapter mAppAdapter;
private SearchView.OnQueryTextListener mSearchListener;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_black_list);
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
toolbar.setNavigationOnClickListener(view -> finish());
ActionBar bar = getSupportActionBar();
if (bar != null) {
bar.setDisplayHomeAsUpEnabled(true);
}
setupWindowInsets();
mSwipeRefreshLayout = findViewById(R.id.swipeRefreshLayout);
RecyclerView mRecyclerView = findViewById(R.id.recyclerView);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mAppAdapter = new CompatListAdapter(this);
mRecyclerView.setAdapter(mAppAdapter);
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(),
DividerItemDecoration.VERTICAL);
mRecyclerView.addItemDecoration(dividerItemDecoration);
mAppAdapter.setCallback(this);
mSwipeRefreshLayout.setRefreshing(true);
mSwipeRefreshLayout.setOnRefreshListener(mAppAdapter::refresh);
mSearchListener = new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
mAppAdapter.filter(query);
return false;
}
@Override
public boolean onQueryTextChange(String newText) {
mAppAdapter.filter(newText);
return false;
}
};
}
@Override
public void onResume() {
super.onResume();
}
@Override
public boolean onCreateOptionsMenu(@NonNull Menu menu) {
getMenuInflater().inflate(R.menu.menu_app_list, menu);
mSearchView = (SearchView) menu.findItem(R.id.menu_search).getActionView();
mSearchView.setOnQueryTextListener(mSearchListener);
return super.onCreateOptionsMenu(menu);
}
@Override
public void onDataReady() {
mSwipeRefreshLayout.setRefreshing(false);
String queryStr = mSearchView != null ? mSearchView.getQuery().toString() : "";
mAppAdapter.filter(queryStr);
}
@Override
public void onItemClick(View v, ApplicationInfo info) {
AppHelper.showMenu(this, getSupportFragmentManager(), v, info);
}
@Override
public void onBackPressed() {
if (mSearchView.isIconified()) {
super.onBackPressed();
} else {
mSearchView.setIconified(true);
}
}
@Override
public void onPointerCaptureChanged(boolean hasCapture) {
}
}

View File

@ -8,11 +8,9 @@ import android.content.SharedPreferences;
import android.content.res.Resources;
import android.database.Cursor;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
@ -23,7 +21,7 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.SearchView;
import androidx.core.view.MenuItemCompat;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@ -55,18 +53,7 @@ public class DownloadActivity extends BaseActivity implements RepoLoader.RepoLis
private BroadcastReceiver connectionListener = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = cm.getActiveNetworkInfo();
if (mRepoLoader != null) {
/*if (networkInfo == null) {
((TextView) backgroundList.findViewById(R.id.list_status)).setText(R.string.no_connection_available);
backgroundList.findViewById(R.id.progress).setVisibility(View.GONE);
} else {
((TextView) backgroundList.findViewById(R.id.list_status)).setText(R.string.update_download_list);
backgroundList.findViewById(R.id.progress).setVisibility(View.VISIBLE);
}
*/
mRepoLoader.triggerReload(true);
}
}
@ -77,12 +64,15 @@ public class DownloadActivity extends BaseActivity implements RepoLoader.RepoLis
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_download);
setSupportActionBar(findViewById(R.id.toolbar));
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
toolbar.setNavigationOnClickListener(view -> finish());
ActionBar bar = getSupportActionBar();
if (bar != null) {
bar.setDisplayHomeAsUpEnabled(true);
}
setupWindowInsets();
mPref = XposedApp.getPreferences();
mRepoLoader = RepoLoader.getInstance();
mModuleUtil = ModuleUtil.getInstance();
@ -116,44 +106,6 @@ public class DownloadActivity extends BaseActivity implements RepoLoader.RepoLis
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mListView.getContext(),
DividerItemDecoration.VERTICAL);
mListView.addItemDecoration(dividerItemDecoration);
/*mListView.setOnScrollListener(new AbsListView.OnScrollListener() {
@Override
public void onScrollStateChanged(AbsListView view, int scrollState) {
}
@Override
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
if (mListView.getChildAt(0) != null) {
refreshLayout.setEnabled(mListView.getFirstVisiblePosition() == 0 && mListView.getChildAt(0).getTop() == 0);
}
}
});*/
/*mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Cursor cursor = (Cursor) mAdapter.getItem(position);
String packageName = cursor.getString(OverviewColumnsIndexes.PKGNAME);
Intent detailsIntent = new Intent(getActivity(), DownloadDetailsActivity.class);
detailsIntent.setData(Uri.fromParts("package", packageName, null));
startActivity(detailsIntent);
}
});*/
mListView.setOnKeyListener(new View.OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
// Expand the search view when the SEARCH key is triggered
if (keyCode == KeyEvent.KEYCODE_SEARCH && event.getAction() == KeyEvent.ACTION_UP && (event.getFlags() & KeyEvent.FLAG_CANCELED) == 0) {
if (mSearchView != null)
mSearchView.setIconified(false);
return true;
}
return false;
}
});
}
@ -208,18 +160,6 @@ public class DownloadActivity extends BaseActivity implements RepoLoader.RepoLis
return true;
}
});
MenuItemCompat.setOnActionExpandListener(searchItem, new MenuItemCompat.OnActionExpandListener() {
@Override
public boolean onMenuItemActionCollapse(MenuItem item) {
setFilter(null);
return true; // Return true to collapse action view
}
@Override
public boolean onMenuItemActionExpand(MenuItem item) {
return true; // Return true to expand action view
}
});
return super.onCreateOptionsMenu(menu);
}
@ -236,18 +176,17 @@ public class DownloadActivity extends BaseActivity implements RepoLoader.RepoLis
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_sort:
new MaterialAlertDialogBuilder(this)
.setTitle(R.string.download_sorting_title)
.setSingleChoiceItems(R.array.download_sort_order, mSortingOrder, (dialog, which) -> {
mSortingOrder = which;
mPref.edit().putInt("download_sorting_order", mSortingOrder).apply();
reloadItems();
dialog.dismiss();
})
.show();
return true;
if (item.getItemId() == R.id.menu_sort) {
new MaterialAlertDialogBuilder(this)
.setTitle(R.string.download_sorting_title)
.setSingleChoiceItems(R.array.download_sort_order, mSortingOrder, (dialog, which) -> {
mSortingOrder = which;
mPref.edit().putInt("download_sorting_order", mSortingOrder).apply();
reloadItems();
dialog.dismiss();
})
.show();
return true;
}
return super.onOptionsItemSelected(item);
}

View File

@ -21,7 +21,6 @@ import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.tabs.TabLayout;
import org.meowcat.edxposed.manager.repo.Module;
@ -40,7 +39,6 @@ public class DownloadDetailsActivity extends BaseActivity implements RepoLoader.
static final String PLAY_STORE_PACKAGE = "com.android.vending";
static final String PLAY_STORE_LINK = "https://play.google.com/store/apps/details?id=%s";
private static final String TAG = "DownloadDetailsActivity";
private static final String NOT_ACTIVE_NOTE_TAG = "NOT_ACTIVE_NOTE";
private static RepoLoader sRepoLoader = RepoLoader.getInstance();
private static ModuleUtil sModuleUtil = ModuleUtil.getInstance();
private ViewPager mPager;
@ -71,7 +69,6 @@ public class DownloadDetailsActivity extends BaseActivity implements RepoLoader.
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
toolbar.setNavigationOnClickListener(view -> finish());
ActionBar ab = getSupportActionBar();
@ -99,6 +96,7 @@ public class DownloadDetailsActivity extends BaseActivity implements RepoLoader.
sRepoLoader.triggerReload(true);
});
}
setupWindowInsets();
}
private void setupTabs() {
@ -106,7 +104,6 @@ public class DownloadDetailsActivity extends BaseActivity implements RepoLoader.
mPager.setAdapter(new SwipeFragmentPagerAdapter(getSupportFragmentManager()));
TabLayout mTabLayout = findViewById(R.id.sliding_tabs);
mTabLayout.setupWithViewPager(mPager);
mTabLayout.setBackgroundColor(XposedApp.getColor(this));
}
private String getModulePackageName() {
@ -183,28 +180,9 @@ public class DownloadDetailsActivity extends BaseActivity implements RepoLoader.
} else {
menu.removeItem(R.id.ignoreUpdate);
}
setupBookmark(false);
return true;
}
private void setupBookmark(boolean clicked) {
SharedPreferences myPref = getSharedPreferences("bookmarks", MODE_PRIVATE);
boolean saved = myPref.getBoolean(mModule.packageName, false);
boolean newValue;
if (clicked) {
newValue = !saved;
myPref.edit().putBoolean(mModule.packageName, newValue).apply();
int msg = newValue ? R.string.bookmark_added : R.string.bookmark_removed;
Snackbar.make(findViewById(android.R.id.content), msg, Snackbar.LENGTH_SHORT).show();
}
saved = myPref.getBoolean(mModule.packageName, false);
}
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
@ -265,7 +243,7 @@ public class DownloadDetailsActivity extends BaseActivity implements RepoLoader.
private String[] tabTitles = new String[]{getString(R.string.download_details_page_description), getString(R.string.download_details_page_versions), getString(R.string.download_details_page_settings),};
SwipeFragmentPagerAdapter(FragmentManager fm) {
super(fm);
super(fm, FragmentPagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
}
@Override

View File

@ -1,6 +1,5 @@
package org.meowcat.edxposed.manager;
import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
@ -10,6 +9,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;
import org.meowcat.edxposed.manager.repo.Module;
@ -18,20 +18,17 @@ import org.meowcat.edxposed.manager.util.NavUtil;
import org.meowcat.edxposed.manager.util.chrome.LinkTransformationMethod;
public class DownloadDetailsFragment extends Fragment {
private DownloadDetailsActivity mActivity;
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
mActivity = (DownloadDetailsActivity) activity;
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final Module module = mActivity.getModule();
if (module == null)
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
DownloadDetailsActivity mActivity = (DownloadDetailsActivity) getActivity();
if (mActivity == null) {
return null;
}
final Module module = mActivity.getModule();
if (module == null) {
return null;
}
final View view = inflater.inflate(R.layout.download_details, container, false);
TextView title = view.findViewById(R.id.download_title);
@ -70,12 +67,7 @@ public class DownloadDetailsFragment extends Fragment {
final Uri link = NavUtil.parseURL(moreInfoEntry.second);
if (link != null) {
txtValue.setTextColor(txtValue.getLinkTextColors());
moreInfoView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
NavUtil.startURL(getActivity(), link);
}
});
moreInfoView.setOnClickListener(v -> NavUtil.startURL(getActivity(), link));
}
moreInfoContainer.addView(moreInfoView);

View File

@ -1,6 +1,5 @@
package org.meowcat.edxposed.manager;
import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
@ -16,19 +15,18 @@ import org.meowcat.edxposed.manager.util.RepoLoader;
import java.util.Map;
public class DownloadDetailsSettingsFragment extends PreferenceFragmentCompat {
private DownloadDetailsActivity mActivity;
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
mActivity = (DownloadDetailsActivity) activity;
}
@Override
public void onCreatePreferencesFix(Bundle savedInstanceState, String rootKey) {
final Module module = mActivity.getModule();
if (module == null)
DownloadDetailsActivity mActivity = (DownloadDetailsActivity) getActivity();
if (mActivity == null) {
return;
}
final Module module = mActivity.getModule();
if (module == null) {
return;
}
final String packageName = module.packageName;

View File

@ -1,6 +1,6 @@
package org.meowcat.edxposed.manager;
import android.app.Activity;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
@ -12,9 +12,11 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.FrameLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.ListFragment;
@ -37,21 +39,16 @@ import java.util.Date;
import static org.meowcat.edxposed.manager.XposedApp.WRITE_EXTERNAL_PERMISSION;
public class DownloadDetailsVersionsFragment extends ListFragment {
private static VersionsAdapter sAdapter;
private DownloadDetailsActivity mActivity;
private Module module;
@Override
public void onAttach(Activity activity) {
super.onAttach(activity);
mActivity = (DownloadDetailsActivity) activity;
}
@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
module = mActivity.getModule();
mActivity = (DownloadDetailsActivity) getActivity();
if (mActivity == null) {
return;
}
Module module = mActivity.getModule();
if (module == null)
return;
@ -64,23 +61,24 @@ public class DownloadDetailsVersionsFragment extends ListFragment {
TextView txtHeader = new TextView(getActivity());
txtHeader.setText(R.string.download_test_version_not_shown);
txtHeader.setTextColor(getResources().getColor(R.color.warning));
txtHeader.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mActivity.gotoPage(DownloadDetailsActivity.DOWNLOAD_SETTINGS);
}
});
txtHeader.setOnClickListener(v -> mActivity.gotoPage(DownloadDetailsActivity.DOWNLOAD_SETTINGS));
getListView().addHeaderView(txtHeader);
}
sAdapter = new VersionsAdapter(mActivity, mActivity.getInstalledModule());
VersionsAdapter sAdapter = new VersionsAdapter(mActivity, mActivity.getInstalledModule());
for (ModuleVersion version : module.versions) {
if (repoLoader.isVersionShown(version))
sAdapter.add(version);
}
setListAdapter(sAdapter);
}
if (getView() != null) {
((FrameLayout) getView()).setClipChildren(false);
((FrameLayout) getView()).setClipToPadding(false);
}
((FrameLayout) getListView().getParent()).setClipChildren(false);
((FrameLayout) getListView().getParent()).setClipToPadding(false);
getListView().setClipToPadding(false);
getListView().setClipToPadding(false);
}
@ -91,7 +89,7 @@ public class DownloadDetailsVersionsFragment extends ListFragment {
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == WRITE_EXTERNAL_PERMISSION) {
if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
@ -171,7 +169,7 @@ public class DownloadDetailsVersionsFragment extends ListFragment {
private final String mTextUpdateAvailable;
private final long mInstalledVersionCode;
public VersionsAdapter(Context context, InstalledModule installed) {
VersionsAdapter(Context context, InstalledModule installed) {
super(context, R.layout.item_version);
TypedValue typedValue = new TypedValue();
Resources.Theme theme = context.getTheme();
@ -186,8 +184,10 @@ public class DownloadDetailsVersionsFragment extends ListFragment {
mInstalledVersionCode = (installed != null) ? installed.versionCode : -1;
}
@SuppressLint("InflateParams")
@Override
public View getView(int position, View convertView, ViewGroup parent) {
@NonNull
public View getView(int position, View convertView, @NonNull ViewGroup parent) {
View view = convertView;
if (view == null) {
LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
@ -206,7 +206,9 @@ public class DownloadDetailsVersionsFragment extends ListFragment {
ViewHolder holder = (ViewHolder) view.getTag();
ModuleVersion item = getItem(position);
if (item == null) {
return view;
}
holder.txtVersion.setText(item.name);
holder.txtRelType.setText(item.relType.getTitleId());
holder.txtRelType.setTextColor(item.relType == ReleaseType.STABLE

View File

@ -12,6 +12,7 @@ import android.widget.CheckBox;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
@ -36,7 +37,9 @@ public class EdDownloadActivity extends BaseActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ed_download);
setSupportActionBar(findViewById(R.id.toolbar));
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
toolbar.setNavigationOnClickListener(view -> finish());
ActionBar bar = getSupportActionBar();
if (bar != null) {
bar.setDisplayHomeAsUpEnabled(true);

View File

@ -22,6 +22,7 @@ import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.widget.Toolbar;
import androidx.core.app.ActivityCompat;
import androidx.core.content.FileProvider;
@ -52,11 +53,14 @@ public class LogsActivity extends BaseActivity {
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_logs);
setSupportActionBar(findViewById(R.id.toolbar));
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
toolbar.setNavigationOnClickListener(view -> finish());
ActionBar bar = getSupportActionBar();
if (bar != null) {
bar.setDisplayHomeAsUpEnabled(true);
}
setupWindowInsets();
mTxtLog = findViewById(R.id.txtLog);
mTxtLog.setTextIsSelectable(true);
mSVLog = findViewById(R.id.svLog);
@ -163,7 +167,7 @@ public class LogsActivity extends BaseActivity {
}
private void send() {
Uri uri = FileProvider.getUriForFile(Objects.requireNonNull(this), "org.meowcat.edxposed.manager.fileprovider", errorLog ? mFileErrorLogError : mFileErrorLog);
Uri uri = FileProvider.getUriForFile(this, "org.meowcat.edxposed.manager.fileprovider", errorLog ? mFileErrorLogError : mFileErrorLog);
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_STREAM, uri);

View File

@ -9,6 +9,9 @@ import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.view.menu.MenuBuilder;
import androidx.appcompat.view.menu.MenuPopupHelper;
import androidx.appcompat.widget.PopupMenu;
import com.google.android.material.card.MaterialCardView;
@ -62,6 +65,15 @@ public class MainActivity extends BaseActivity implements RepoLoader.RepoListene
intent.setClass(getApplicationContext(), AboutActivity.class);
startActivity(intent);
});
ImageView menu = findViewById(R.id.menu_more);
menu.setOnClickListener(v -> {
PopupMenu appMenu = new PopupMenu(MainActivity.this, menu);
appMenu.inflate(R.menu.menu_installer);
appMenu.setOnMenuItemClickListener(this::onOptionsItemSelected);
MenuPopupHelper menuHelper = new MenuPopupHelper(MainActivity.this, (MenuBuilder) appMenu.getMenu(), menu);
menuHelper.setForceShowIcon(true);
menuHelper.show();
});
String installedXposedVersion;
try {
installedXposedVersion = XposedApp.getXposedProp().getVersion();
@ -131,24 +143,21 @@ public class MainActivity extends BaseActivity implements RepoLoader.RepoListene
@SuppressLint("SetTextI18n")
private void notifyDataSetChanged() {
runOnUiThread(new Runnable() {
@Override
public void run() {
String frameworkUpdateVersion = mRepoLoader.getFrameworkUpdateVersion();
boolean moduleUpdateAvailable = mRepoLoader.hasModuleUpdates();
ModuleUtil.getInstance().getEnabledModules().size();
TextView description = findViewById(R.id.activity_main_modules_summary);
description.setText(String.format(getString(R.string.ModulesDetail), ModuleUtil.getInstance().getEnabledModules().size()));
if (frameworkUpdateVersion != null) {
description = findViewById(R.id.activity_main_status_summary);
description.setText(String.format(getString(R.string.welcome_framework_update_available), frameworkUpdateVersion));
}
description = findViewById(R.id.activity_main_download_summary);
if (moduleUpdateAvailable) {
description.setText(R.string.modules_updates_available);
} else {
description.setText(R.string.ModuleUptodate);
}
runOnUiThread(() -> {
String frameworkUpdateVersion = mRepoLoader.getFrameworkUpdateVersion();
boolean moduleUpdateAvailable = mRepoLoader.hasModuleUpdates();
ModuleUtil.getInstance().getEnabledModules().size();
TextView description = findViewById(R.id.activity_main_modules_summary);
description.setText(String.format(getString(R.string.ModulesDetail), ModuleUtil.getInstance().getEnabledModules().size()));
if (frameworkUpdateVersion != null) {
description = findViewById(R.id.activity_main_status_summary);
description.setText(String.format(getString(R.string.welcome_framework_update_available), frameworkUpdateVersion));
}
description = findViewById(R.id.activity_main_download_summary);
if (moduleUpdateAvailable) {
description.setText(R.string.modules_updates_available);
} else {
description.setText(R.string.ModuleUptodate);
}
});
}

View File

@ -1,6 +1,5 @@
package org.meowcat.edxposed.manager;
import android.Manifest;
import android.annotation.SuppressLint;
import android.content.ActivityNotFoundException;
import android.content.Context;
@ -33,7 +32,7 @@ import androidx.appcompat.view.menu.MenuBuilder;
import androidx.appcompat.view.menu.MenuPopupHelper;
import androidx.appcompat.widget.PopupMenu;
import androidx.appcompat.widget.SearchView;
import androidx.core.app.ActivityCompat;
import androidx.appcompat.widget.Toolbar;
import androidx.recyclerview.widget.DividerItemDecoration;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
@ -119,11 +118,14 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_modules);
setSupportActionBar(findViewById(R.id.toolbar));
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
toolbar.setNavigationOnClickListener(view -> finish());
ActionBar bar = getSupportActionBar();
if (bar != null) {
bar.setDisplayHomeAsUpEnabled(true);
}
setupWindowInsets();
filter = new ApplicationFilter();
mModuleUtil = ModuleUtil.getInstance();
mPm = getPackageManager();
@ -276,15 +278,6 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
return super.onOptionsItemSelected(item);
}
private boolean checkPermissions() {
if (ActivityCompat.checkSelfPermission(Objects.requireNonNull(this), Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
requestPermissions(new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, XposedApp.WRITE_EXTERNAL_PERMISSION);
}
return true;
}
return false;
}
private boolean importModules(File path) {
if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
@ -551,9 +544,9 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
holder.appIcon.setImageDrawable(item.getIcon());
TextView descriptionText = holder.appDescription;
descriptionText.setVisibility(View.VISIBLE);
if (!item.getDescription().isEmpty()) {
descriptionText.setText(item.getDescription());
//descriptionText.setTextColor(ThemeUtil.getThemeColor(this, android.R.attr.textColorSecondary));
} else {
descriptionText.setText(getString(R.string.module_empty_description));
descriptionText.setTextColor(getResources().getColor(R.color.warning));
@ -634,8 +627,8 @@ public class ModulesActivity extends BaseActivity implements ModuleUtil.ModuleLi
ViewHolder(View itemView) {
super(itemView);
appIcon = itemView.findViewById(R.id.icon);
appName = itemView.findViewById(R.id.title);
appIcon = itemView.findViewById(R.id.app_icon);
appName = itemView.findViewById(R.id.app_name);
appDescription = itemView.findViewById(R.id.description);
appPackage = itemView.findViewById(R.id.package_name);
appVersion = itemView.findViewById(R.id.version_name);

View File

@ -2,13 +2,20 @@ package org.meowcat.edxposed.manager;
import android.annotation.SuppressLint;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.FileUtils;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.appcompat.widget.Toolbar;
import androidx.preference.Preference;
import androidx.preference.SwitchPreference;
@ -30,27 +37,28 @@ public class SettingsActivity extends BaseActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
setSupportActionBar(findViewById(R.id.toolbar));
Toolbar toolbar = findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
toolbar.setNavigationOnClickListener(view -> finish());
ActionBar bar = getSupportActionBar();
if (bar != null) {
bar.setDisplayHomeAsUpEnabled(true);
}
setupWindowInsets();
if (savedInstanceState == null) {
getSupportFragmentManager().beginTransaction()
.add(R.id.container, new SettingsFragment()).commit();
.add(R.id.container, SettingsFragment.newInstance(findViewById(R.id.snackbar))).commit();
}
}
@SuppressWarnings({"ResultOfMethodCallIgnored", "deprecation"})
public static class SettingsFragment extends PreferenceFragmentCompat implements Preference.OnPreferenceClickListener, SharedPreferences.OnSharedPreferenceChangeListener {
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 mDeoptBootFlag = new File(XposedApp.BASE_DIR + "conf/deoptbootimage");
static final File mWhiteListModeFlag = new File(XposedApp.BASE_DIR + "conf/usewhitelist");
static final File mBlackWhiteListModeFlag = new File(XposedApp.BASE_DIR + "conf/blackwhitelist");
static final File mDeoptBootFlag = new File(XposedApp.BASE_DIR + "conf/deoptbootimage");
static final File mDisableVerboseLogsFlag = new File(XposedApp.BASE_DIR + "conf/disable_verbose_log");
static final File mDisableModulesLogsFlag = new File(XposedApp.BASE_DIR + "conf/disable_modules_log");
static final File mVerboseLogProcessID = new File(XposedApp.BASE_DIR + "log/all.pid");
@ -59,7 +67,12 @@ public class SettingsActivity extends BaseActivity {
private Preference stopVerboseLog;
private Preference stopLog;
public SettingsFragment() {
private View rootView;
static SettingsFragment newInstance(View rootView) {
SettingsFragment fragment = new SettingsFragment();
fragment.setRootView(rootView);
return fragment;
}
@SuppressWarnings("SameParameterValue")
@ -76,6 +89,10 @@ public class SettingsActivity extends BaseActivity {
FileUtils.setPermissions(name, perms, -1, -1);
}
void setRootView(View rootView) {
this.rootView = rootView;
}
@SuppressLint({"ObsoleteSdkInt", "WorldReadableFiles"})
@Override
public void onCreatePreferencesFix(Bundle savedInstanceState, String rootKey) {
@ -307,6 +324,16 @@ public class SettingsActivity extends BaseActivity {
return (enabled == mDisableResourcesFlag.exists());
});
Preference compat_mode = findPreference("compat_mode");
if (compat_mode != null) {
compat_mode.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent();
intent.setClass(Objects.requireNonNull(getContext()), CompatListActivity.class);
Objects.requireNonNull(getActivity()).startActivity(intent);
return true;
});
}
}
@Override
@ -367,5 +394,16 @@ public class SettingsActivity extends BaseActivity {
.show();
}
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
if (rootView == null) {
return;
}
((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

@ -4,7 +4,6 @@ import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
@ -90,13 +89,6 @@ public class XposedApp extends de.robv.android.xposed.installer.XposedApp implem
return mInstance.mPref;
}
public static int getColor(Context context) {
SharedPreferences prefs = context.getSharedPreferences(context.getPackageName() + "_preferences", MODE_PRIVATE);
int defaultColor = context.getResources().getColor(R.color.colorPrimary);
return prefs.getInt("colors", defaultColor);
}
public static String getDownloadPath() {
return getPreferences().getString("download_location", Environment.getExternalStorageDirectory() + "/Download/EdXposedManager/");
}

View File

@ -34,7 +34,7 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> {
protected final Context context;
private final ApplicationInfo.DisplayNameComparator displayNameComparator;
public Callback callback;
private Callback callback;
private List<ApplicationInfo> fullList, showList;
private DateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault());
private List<String> checkedList;
@ -60,7 +60,7 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> {
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View v = LayoutInflater.from(context).inflate(R.layout.item_app, parent, false);
View v = LayoutInflater.from(context).inflate(R.layout.item_module, parent, false);
return new ViewHolder(v);
}
@ -186,7 +186,7 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> {
holder.mSwitch.setChecked(checkedList.contains(info.packageName));
holder.mSwitch.setOnCheckedChangeListener((v, isChecked) ->
onCheckedChange(v, isChecked, info));
holder.infoLayout.setOnClickListener(v -> {
holder.itemView.setOnClickListener(v -> {
if (callback != null) {
callback.onItemClick(v, info);
}
@ -218,7 +218,6 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> {
static class ViewHolder extends RecyclerView.ViewHolder {
View infoLayout;
ImageView appIcon;
TextView appName;
TextView appPackage;
@ -229,7 +228,6 @@ public class AppAdapter extends RecyclerView.Adapter<AppAdapter.ViewHolder> {
ViewHolder(View itemView) {
super(itemView);
infoLayout = itemView.findViewById(R.id.info_layout);
appIcon = itemView.findViewById(R.id.app_icon);
appName = itemView.findViewById(R.id.app_name);
appPackage = itemView.findViewById(R.id.package_name);

View File

@ -23,10 +23,6 @@ public class BlackListAdapter extends AppAdapter {
this.isWhiteListMode = isWhiteListMode;
}
// public void setWhiteListMode(boolean isWhiteListMode) {
// this.isWhiteListMode = isWhiteListMode;
// }
@Override
protected List<String> generateCheckedList() {
if (XposedApp.getPreferences().getBoolean("hook_modules", true)) {

View File

@ -0,0 +1,41 @@
package org.meowcat.edxposed.manager.adapters;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.widget.CompoundButton;
import org.meowcat.edxposed.manager.R;
import org.meowcat.edxposed.manager.util.ToastUtil;
import java.util.List;
public class CompatListAdapter extends AppAdapter {
private List<String> checkedList;
public CompatListAdapter(Context context) {
super(context);
}
@Override
protected List<String> generateCheckedList() {
AppHelper.makeSurePath();
return checkedList = AppHelper.getCompatList();
}
@Override
protected void onCheckedChange(CompoundButton view, boolean isChecked, ApplicationInfo info) {
boolean success = isChecked ?
AppHelper.addCompatList(info.packageName) : AppHelper.removeCompatList(info.packageName);
if (success) {
if (isChecked) {
checkedList.add(info.packageName);
} else {
checkedList.remove(info.packageName);
}
} else {
ToastUtil.showShortToast(context, R.string.add_package_failed);
view.setChecked(!isChecked);
}
}
}

View File

@ -115,8 +115,6 @@ public class InstallApkUtil extends AsyncTask<Void, Void, Integer> {
out.append(o);
out.append("\n");
}
// Pattern failurePattern = Pattern.compile("(?m)^Failure\\s+\\[(.*?)]$");
// Matcher failureMatcher = failurePattern.matcher(out);
if (result.equals(0)) {
NotificationUtil.showModuleInstallNotification(R.string.installation_successful, R.string.installation_successful_message, info.localFilename, info.title);

View File

@ -1,16 +0,0 @@
package org.meowcat.edxposed.manager.util;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import java.util.Locale;
public class LocaleUtil {
public static void setLocale(Context context, Locale locale) {
Resources resources = context.getResources();
Configuration configuration = resources.getConfiguration();
configuration.setLocale(locale);
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
}
}

View File

@ -212,8 +212,7 @@ public final class ModuleUtil {
try {
Log.i(XposedApp.TAG, "ModuleUtil -> updating modules.list");
int installedXposedVersion = XposedApp.getXposedVersion();
boolean disabled = false;//StatusInstallerFragment.DISABLE_FILE.exists();
if (!XposedApp.getPreferences().getBoolean("skip_xposedminversion_check", false) && !disabled && installedXposedVersion <= 0 && showToast) {
if (!XposedApp.getPreferences().getBoolean("skip_xposedminversion_check", false) && installedXposedVersion <= 0 && showToast) {
Toast.makeText(mApp, R.string.notinstalled, Toast.LENGTH_SHORT).show();
return;
}
@ -223,7 +222,7 @@ public final class ModuleUtil {
List<InstalledModule> enabledModules = getEnabledModules();
for (InstalledModule module : enabledModules) {
if (!XposedApp.getPreferences().getBoolean("skip_xposedminversion_check", false) && (!disabled && (module.minVersion > installedXposedVersion || module.minVersion < MIN_MODULE_VERSION)) && showToast) {
if (!XposedApp.getPreferences().getBoolean("skip_xposedminversion_check", false) && (module.minVersion > installedXposedVersion || module.minVersion < MIN_MODULE_VERSION) && showToast) {
Toast.makeText(mApp, R.string.notinstalled, Toast.LENGTH_SHORT).show();
continue;
}
@ -305,7 +304,6 @@ public final class ModuleUtil {
this.isFramework = isFramework;
this.versionName = pkg.versionName;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
//noinspection deprecation
this.versionCode = pkg.versionCode;
} else {
this.versionCode = pkg.getLongVersionCode();
@ -337,12 +335,6 @@ public final class ModuleUtil {
return (app.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0;
}
/**
* @hide
*/
// public boolean isForwardLocked() {
// return (app.flags & FLAG_FORWARD_LOCK) != 0;
// }
public String getAppName() {
if (appName == null)
appName = app.loadLabel(mPm).toString();

View File

@ -3,9 +3,7 @@ package org.meowcat.edxposed.manager.util;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.provider.Browser;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.URLSpan;
@ -14,7 +12,9 @@ import android.text.util.Linkify;
import androidx.annotation.AnyThread;
import androidx.annotation.NonNull;
import androidx.browser.customtabs.CustomTabsIntent;
import androidx.core.content.ContextCompat;
import org.meowcat.edxposed.manager.R;
import org.meowcat.edxposed.manager.XposedApp;
public final class NavUtil {
@ -31,16 +31,9 @@ public final class NavUtil {
}
public static void startURL(Activity activity, Uri uri) {
if (!XposedApp.getPreferences().getBoolean("chrome_tabs", true)) {
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
intent.putExtra(Browser.EXTRA_APPLICATION_ID, activity.getPackageName());
activity.startActivity(intent);
return;
}
CustomTabsIntent.Builder customTabsIntent = new CustomTabsIntent.Builder();
customTabsIntent.setShowTitle(true);
customTabsIntent.setToolbarColor(XposedApp.getColor(activity));
customTabsIntent.setToolbarColor(ContextCompat.getColor(activity, R.color.colorPrimary));
customTabsIntent.build().launchUrl(activity, uri);
}

View File

@ -13,6 +13,7 @@ import android.widget.Toast;
import androidx.annotation.StringRes;
import androidx.core.app.NotificationCompat;
import androidx.core.content.ContextCompat;
import com.topjohnwu.superuser.Shell;
@ -88,10 +89,7 @@ public final class NotificationUtil {
if (prefs.getBoolean(HEADS_UP, true) && Build.VERSION.SDK_INT >= 21)
builder.setPriority(2);
if (prefs.getBoolean(COLORED_NOTIFICATION, false))
builder.setColor(XposedApp.getColor(sContext));
builder.setColor(ContextCompat.getColor(sContext, R.color.colorPrimary));
Intent iActivateAndReboot = new Intent(sContext, RebootReceiver.class);
iActivateAndReboot.putExtra(RebootReceiver.EXTRA_ACTIVATE_MODULE, packageName);
PendingIntent pActivateAndReboot = PendingIntent.getBroadcast(sContext, PENDING_INTENT_ACTIVATE_MODULE_AND_REBOOT,
@ -138,10 +136,7 @@ public final class NotificationUtil {
if (prefs.getBoolean(HEADS_UP, true) && Build.VERSION.SDK_INT >= 21)
builder.setPriority(2);
if (prefs.getBoolean(COLORED_NOTIFICATION, false))
builder.setColor(XposedApp.getColor(sContext));
builder.setColor(ContextCompat.getColor(sContext, R.color.colorPrimary));
Intent iSoftReboot = new Intent(sContext, RebootReceiver.class);
iSoftReboot.putExtra(RebootReceiver.EXTRA_SOFT_REBOOT, true);
PendingIntent pSoftReboot = PendingIntent.getBroadcast(sContext, PENDING_INTENT_SOFT_REBOOT,
@ -178,10 +173,7 @@ public final class NotificationUtil {
if (prefs.getBoolean(HEADS_UP, true) && Build.VERSION.SDK_INT >= 21)
builder.setPriority(2);
if (prefs.getBoolean(COLORED_NOTIFICATION, false))
builder.setColor(XposedApp.getColor(sContext));
builder.setColor(ContextCompat.getColor(sContext, R.color.colorPrimary));
NotificationCompat.BigTextStyle notiStyle = new NotificationCompat.BigTextStyle();
notiStyle.setBigContentTitle(title);
notiStyle.bigText(message);
@ -203,10 +195,7 @@ public final class NotificationUtil {
NotificationCompat.Builder builder = new NotificationCompat.Builder(sContext).setContentTitle(title).setContentText(message)
.setVibrate(new long[]{0}).setProgress(0, 0, true)
.setSmallIcon(R.drawable.ic_notification).setOngoing(true);
if (prefs.getBoolean(COLORED_NOTIFICATION, false))
builder.setColor(XposedApp.getColor(sContext));
builder.setColor(ContextCompat.getColor(sContext, R.color.colorPrimary));
NotificationCompat.BigTextStyle notiStyle = new NotificationCompat.BigTextStyle();
notiStyle.setBigContentTitle(title);
notiStyle.bigText(message);
@ -232,10 +221,7 @@ public final class NotificationUtil {
if (prefs.getBoolean(HEADS_UP, true) && Build.VERSION.SDK_INT >= 21)
builder.setPriority(2);
if (prefs.getBoolean(COLORED_NOTIFICATION, false))
builder.setColor(XposedApp.getColor(sContext));
builder.setColor(ContextCompat.getColor(sContext, R.color.colorPrimary));
NotificationCompat.BigTextStyle notiStyle = new NotificationCompat.BigTextStyle();
notiStyle.setBigContentTitle(title);
notiStyle.bigText(message);

View File

@ -15,7 +15,7 @@ public class PrefixedSharedPreferences implements SharedPreferences {
private final SharedPreferences mBase;
private final String mPrefix;
public PrefixedSharedPreferences(SharedPreferences base, String prefix) {
private PrefixedSharedPreferences(SharedPreferences base, String prefix) {
mBase = base;
mPrefix = prefix + "_";
}

View File

@ -1,6 +1,9 @@
package org.meowcat.edxposed.manager.util;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.sqlite.SQLiteException;
import android.net.ConnectivityManager;
@ -11,6 +14,9 @@ import android.widget.Toast;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import org.meowcat.edxposed.manager.DownloadActivity;
import org.meowcat.edxposed.manager.R;
import org.meowcat.edxposed.manager.XposedApp;
import org.meowcat.edxposed.manager.repo.Module;
@ -43,7 +49,7 @@ public class RepoLoader {
private static RepoLoader mInstance = null;
private final List<RepoListener> mListeners = new CopyOnWriteArrayList<>();
private final Map<String, ReleaseType> mLocalReleaseTypesCache = new HashMap<>();
private XposedApp mApp = null;
private XposedApp mApp;
private SharedPreferences mPref;
private SharedPreferences mModulePref;
private ConnectivityManager mConMgr;
@ -206,11 +212,9 @@ public class RepoLoader {
mPref.edit().putLong("last_update_check", System.currentTimeMillis()).apply();
if (!messages.isEmpty()) {
XposedApp.runOnUiThread(new Runnable() {
public void run() {
for (String message : messages) {
Toast.makeText(mApp, message, Toast.LENGTH_LONG).show();
}
XposedApp.runOnUiThread(() -> {
for (String message : messages) {
Toast.makeText(mApp, message, Toast.LENGTH_LONG).show();
}
});
}
@ -250,7 +254,7 @@ public class RepoLoader {
return;
RepoDb.deleteRepositories();
mRepositories = new LinkedHashMap<Long, Repository>(0);
mRepositories = new LinkedHashMap<>(0);
DownloadsUtil.clearCache(null);
resetLastUpdateCheck();
}
@ -363,30 +367,18 @@ public class RepoLoader {
RepoDb.setTransactionSuccessful();
} catch (SQLiteException e) {
XposedApp.runOnUiThread(new Runnable() {
@Override
public void run() {
/*new MaterialDialog.Builder(DownloadFragment.sActivity)
.title(R.string.restart_needed)
.content(R.string.cache_cleaned)
.onPositive(new MaterialDialog.SingleButtonCallback() {
@Override
public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
Intent i = new Intent(DownloadFragment.sActivity, WelcomeActivity.class);
i.putExtra("fragment", 2);
PendingIntent pi = PendingIntent.getActivity(DownloadFragment.sActivity, 0, i, PendingIntent.FLAG_CANCEL_CURRENT);
AlarmManager mgr = (AlarmManager) mApp.getSystemService(Context.ALARM_SERVICE);
mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 100, pi);
System.exit(0);
}
})
.positiveText(R.string.ok)
.canceledOnTouchOutside(false)
.show();*/
}
});
XposedApp.runOnUiThread(() -> new MaterialAlertDialogBuilder(mApp)
.setTitle(R.string.restart_needed)
.setMessage(R.string.cache_cleaned)
.setPositiveButton(android.R.string.ok, (dialog, which) -> {
Intent i = new Intent(mApp, DownloadActivity.class);
PendingIntent pi = PendingIntent.getActivity(mApp, 0, i, PendingIntent.FLAG_CANCEL_CURRENT);
AlarmManager mgr = (AlarmManager) mApp.getSystemService(Context.ALARM_SERVICE);
mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 100, pi);
System.exit(0);
})
.setCancelable(false)
.show());
DownloadsUtil.clearCache(url);
} catch (Throwable t) {

View File

@ -1,22 +0,0 @@
package org.meowcat.edxposed.manager.widget;
import android.content.Context;
import android.util.AttributeSet;
import androidx.preference.ListPreference;
public class ListPreferenceSummaryFix extends ListPreference {
public ListPreferenceSummaryFix(Context context) {
super(context);
}
public ListPreferenceSummaryFix(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public void setValue(String value) {
super.setValue(value);
notifyChanged();
}
}

View File

@ -1,34 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeWidth="1"
android:strokeColor="#00000000">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>

View File

@ -1,170 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
</vector>

View File

@ -0,0 +1,40 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="315"
android:viewportHeight="315">
<group
android:translateX="64.166664"
android:translateY="65.875">
<path
android:fillColor="#34bfc9"
android:pathData="M94,94m-94,0a94,94 0,1 1,188 0a94,94 0,1 1,-188 0" />
<path
android:fillColor="#272727"
android:pathData="M91,41L144,41A6,6 0,0 1,150 47L150,139A6,6 0,0 1,144 145L91,145A6,6 0,0 1,85 139L85,47A6,6 0,0 1,91 41z" />
<path
android:fillColor="#34bfc9"
android:pathData="M84,72h37v42h-37z" />
<path
android:fillColor="#272727"
android:pathData="M31,72h36v42h-36z" />
<path
android:fillColor="#34bfc9"
android:pathData="M130,93m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0" />
<path
android:fillColor="#34bfc9"
android:pathData="M49,81m-10,0a10,10 0,1 1,20 0a10,10 0,1 1,-20 0" />
<path
android:fillColor="#272727"
android:pathData="M99,71h4v8h-4z" />
<path
android:fillColor="#272727"
android:pathData="M101,84m-7,0a7,7 0,1 1,14 0a7,7 0,1 1,-14 0" />
<path
android:fillColor="#272727"
android:pathData="M66,91h8v4h-8z" />
<path
android:fillColor="#272727"
android:pathData="M79,93m-7,0a7,7 0,1 1,14 0a7,7 0,1 1,-14 0" />
</group>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:tint="?attr/colorControlNormal"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@android:color/white"
android:pathData="M12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM12,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z" />
</vector>

View File

@ -2,13 +2,16 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false">
<include layout="@layout/appbar_layout" />
<ScrollView
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
tools:ignore="UseCompoundDrawables,ContentDescription">
@ -20,22 +23,25 @@
android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="72dp"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
android:layout_width="48dp"
android:layout_width="32dp"
android:layout_height="48dp"
android:layout_gravity="center_vertical"
android:src="@mipmap/ic_launcher" />
android:adjustViewBounds="true"
android:contentDescription="@string/app_name"
android:scaleType="centerCrop"
android:src="@drawable/ic_launcher_foreground" />
<TextView
android:layout_width="wrap_content"
@ -48,7 +54,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -65,7 +71,7 @@
android:src="@drawable/ic_info" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -91,7 +97,7 @@
<LinearLayout
android:id="@+id/changelogView"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -121,7 +127,7 @@
<LinearLayout
android:id="@+id/licensesView"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -151,7 +157,7 @@
<LinearLayout
android:id="@+id/translatorsView"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -168,7 +174,7 @@
android:src="@drawable/ic_language" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -194,7 +200,7 @@
<LinearLayout
android:id="@+id/tgChannelView"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -211,7 +217,7 @@
android:src="@drawable/ic_modules" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -232,7 +238,7 @@
<LinearLayout
android:id="@+id/qqGroupView"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -249,7 +255,7 @@
android:src="@drawable/ic_help" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -270,7 +276,7 @@
<LinearLayout
android:id="@+id/tgGroupView"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -287,7 +293,7 @@
android:src="@drawable/ic_help" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -309,7 +315,7 @@
<LinearLayout
android:id="@+id/sourceCodeView"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -326,7 +332,7 @@
android:src="@drawable/ic_github" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -347,7 +353,7 @@
<LinearLayout
android:id="@+id/donateView"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -364,7 +370,7 @@
android:src="@drawable/ic_donate" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -391,7 +397,7 @@
<LinearLayout
android:id="@+id/faqView"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -408,7 +414,7 @@
android:src="@drawable/ic_bug" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -428,7 +434,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -445,7 +451,7 @@
android:src="@drawable/ic_info" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -473,7 +479,7 @@
<LinearLayout
android:id="@+id/installerSupportView"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -490,7 +496,7 @@
android:src="@drawable/ic_help" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"

View File

@ -1,23 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false">
<include layout="@layout/appbar_layout" />
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false" />
android:layout_height="match_parent" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

View File

@ -1,15 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false">
<include layout="@layout/appbar_layout" />
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView

View File

@ -1,8 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false">
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
@ -13,17 +16,16 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?colorBackground"
android:background="?colorActionBar"
app:popupTheme="@style/AppTheme.PopupOverlay" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/sliding_tabs"
style="@style/Widget.MaterialComponents.TabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabBackground="?colorBackground"
app:tabIndicatorColor="?android:textColorPrimary"
app:tabMode="fixed"
app:tabTextColor="?android:textColorPrimary" />
android:background="?colorActionBar"
app:tabMode="fixed" />
</com.google.android.material.appbar.AppBarLayout>
@ -31,7 +33,8 @@
android:id="@+id/download_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="?attr/actionBarSize"
android:clipChildren="false"
android:clipToPadding="false"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -13,17 +13,16 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?colorBackground"
android:background="?colorActionBar"
app:popupTheme="@style/AppTheme.PopupOverlay" />
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_layout"
style="@style/Widget.MaterialComponents.TabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabBackground="?colorBackground"
app:tabIndicatorColor="?android:textColorPrimary"
app:tabMode="scrollable"
app:tabTextColor="?android:textColorPrimary" />
android:background="?colorActionBar"
app:tabMode="scrollable" />
</com.google.android.material.appbar.AppBarLayout>

View File

@ -2,8 +2,11 @@
<androidx.constraintlayout.widget.ConstraintLayout 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"
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false"
tools:context=".LogsActivity">
<include layout="@layout/appbar_layout" />
@ -13,6 +16,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:clipChildren="false"
android:clipToPadding="false"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<ScrollView

View File

@ -7,30 +7,47 @@
android:orientation="vertical"
tools:context=".MainActivity">
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="72dp"
android:gravity="center_vertical">
android:layout_marginStart="32dp"
android:layout_marginEnd="32dp"
android:clipChildren="false"
android:clipToPadding="false">
<ImageView
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_marginStart="32dp"
android:id="@+id/app_icon"
android:layout_width="42dp"
android:layout_height="64dp"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:adjustViewBounds="true"
android:contentDescription="@string/app_name"
android:src="@mipmap/ic_launcher" />
android:scaleType="centerCrop"
android:src="@drawable/ic_launcher_foreground" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginStart="25dp"
android:layout_toEndOf="@id/app_icon"
android:text="@string/app_name"
android:textAppearance="@style/TextAppearance.AppCompat.Title"
android:textSize="20sp" />
<View
<ImageView
android:id="@+id/menu_more"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:focusable="true"
android:padding="5dp"
app:srcCompat="@drawable/ic_more" />
</RelativeLayout>
<com.google.android.material.card.MaterialCardView
android:id="@+id/activity_main_status"

View File

@ -1,15 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false">
<include layout="@layout/appbar_layout" />
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:clipChildren="false"
android:clipToPadding="false"
android:orientation="vertical">
<androidx.recyclerview.widget.RecyclerView

View File

@ -1,8 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/snackbar"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false">
<include layout="@layout/appbar_layout" />
@ -10,6 +13,8 @@
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
android:clipToPadding="false"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -8,7 +8,7 @@
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?colorBackground"
android:background="?colorActionBar"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</com.google.android.material.appbar.AppBarLayout>

View File

@ -1,6 +1,6 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="8dp">

View File

@ -1,18 +1,17 @@
<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"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="?selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:minHeight="?android:attr/listPreferredItemHeight">
<LinearLayout
android:id="@+id/info_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal"
android:padding="8dp">
@ -21,10 +20,6 @@
android:id="@+id/app_icon"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:gravity="end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/app_name"
@ -37,7 +32,6 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="4dip"
android:layout_marginEnd="4dip"
android:layout_weight="1"
android:orientation="vertical">
@ -88,7 +82,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginTop="2dp"
android:text="@string/install_time" />
<TextView
@ -111,7 +105,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginTop="2dp"
android:text="@string/update_time" />
<TextView
@ -142,8 +136,7 @@
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:layout_marginEnd="5dp"
android:layout_marginStart="4dp"
android:checked="false"
android:focusable="false"
app:layout_constraintBottom_toBottomOf="parent"
@ -153,6 +146,4 @@
</LinearLayout>
</FrameLayout>
</FrameLayout>

View File

@ -1,10 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<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"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="?selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:minHeight="?android:attr/listPreferredItemHeight">
<LinearLayout
@ -15,17 +17,21 @@
android:padding="8dp">
<ImageView
android:id="@+id/icon"
android:layout_width="48dip"
android:layout_height="48dip"
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="4dip"
android:layout_marginEnd="4dip"
android:layout_marginStart="4dp"
android:layout_weight="1"
android:orientation="vertical">
@ -34,7 +40,7 @@
android:layout_height="wrap_content">
<TextView
android:id="@+id/title"
android:id="@+id/app_name"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_marginEnd="4dip"
@ -76,7 +82,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" />
android:layout_marginTop="2dp"
android:text="@string/install_time" />
<TextView
android:id="@+id/tvInstallTime"
@ -98,7 +105,8 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="4dp" />
android:layout_marginTop="2dp"
android:text="@string/update_time" />
<TextView
android:id="@+id/tvUpdateTime"
@ -119,7 +127,8 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textIsSelectable="false" />
android:textIsSelectable="false"
android:visibility="gone" />
<TextView
android:id="@+id/warning"
@ -135,10 +144,14 @@
<Switch
android:id="@+id/checkbox"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:checked="false"
android:focusable="false"
android:gravity="top"
android:padding="3dp" />
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/app_name"
app:layout_constraintTop_toTopOf="parent" />
</LinearLayout>
</FrameLayout>

View File

@ -18,7 +18,9 @@
android:id="@+id/container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="6dp">
android:padding="6dp"
android:paddingStart="16dp"
android:paddingEnd="16dp">
<Spinner
android:id="@+id/chooserInstallers"
@ -41,11 +43,14 @@
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_gravity="center"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:focusable="true"
android:padding="5dp"
android:src="@drawable/ic_info"
tools:ignore="ContentDescription,RtlHardcoded" />
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
android:id="@+id/warning_unstable"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -54,23 +59,25 @@
android:visibility="gone"
app:cardBackgroundColor="@color/amber_500">
<LinearLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:orientation="horizontal"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/warning"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_margin="8dp"
android:src="@drawable/ic_warning"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toEndOf="@+id/warning"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:text="@string/unstable_build"
@ -78,11 +85,11 @@
android:textAllCaps="true"
android:textStyle="bold" />
</LinearLayout>
</RelativeLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>
<androidx.cardview.widget.CardView
<com.google.android.material.card.MaterialCardView
android:id="@+id/warning_unofficial"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -117,7 +124,7 @@
</LinearLayout>
</androidx.cardview.widget.CardView>
</com.google.android.material.card.MaterialCardView>
<Button
android:id="@+id/btnInstall"
@ -153,6 +160,9 @@
android:layout_alignParentRight="true"
android:layout_gravity="center|end"
android:layout_marginTop="5dp"
android:background="?selectableItemBackgroundBorderless"
android:clickable="true"
android:focusable="true"
android:padding="5dp"
android:src="@drawable/ic_info"
tools:ignore="ContentDescription,RtlHardcoded" />
@ -171,7 +181,7 @@
<LinearLayout
android:id="@+id/author_view"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/container"
android:layout_marginTop="4dp"
@ -191,7 +201,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -213,7 +223,7 @@
<LinearLayout
android:id="@+id/show_on_xda"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/author_view"
android:background="?android:attr/selectableItemBackground"
@ -232,7 +242,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -253,7 +263,7 @@
<LinearLayout
android:id="@+id/updateDescription"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/show_on_xda"
android:background="?android:attr/selectableItemBackground"
@ -272,7 +282,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -292,7 +302,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/updateDescription"
android:background="?android:attr/selectableItemBackground"
@ -311,7 +321,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"

View File

@ -23,7 +23,7 @@
android:orientation="vertical">
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -41,7 +41,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -62,7 +62,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -80,7 +80,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -101,7 +101,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -119,7 +119,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginLeft="32dp"
@ -139,7 +139,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -157,7 +157,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:orientation="vertical"
@ -176,7 +176,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -194,7 +194,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:orientation="vertical"
@ -212,7 +212,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -230,7 +230,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:orientation="vertical"
@ -248,7 +248,7 @@
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -265,7 +265,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:orientation="vertical"
@ -309,7 +309,7 @@
<LinearLayout
android:id="@+id/click_to_update"
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
@ -327,7 +327,7 @@
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:orientation="vertical"

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<background android:drawable="@color/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="navigationBarColor">@android:color/transparent</color>
</resources>

View File

@ -1,12 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#2196f3</color>
<color name="colorBackground">#303030</color>
<color name="colorBackground">#424242</color>
<color name="colorAccent">#448aff</color>
<color name="colorPrimaryDark">#2E2E2E</color>
<color name="colorActionBar">#383838</color>
<color name="red_500">#F44336</color>
<color name="warning">@color/red_500</color>
<color name="download_status_update_available">#4CAF50</color>
<color name="amber_500">#FFC107</color>
<color name="navigationBarColor">#303030</color>
<color name="colorStickyHeader">#ea000000</color>
<color name="navigationBarColor">#B3000000</color>
<color name="colorStickyHeader">#EA424242</color>
</resources>

View File

@ -1,2 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources></resources>
<resources>
<color name="colorPrimaryDark">#dddddd</color>
</resources>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="navigationBarColor">#fff</color>
<color name="navigationBarColor">#B3FFFFFF</color>
</resources>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="navigationBarColor">@android:color/transparent</color>
</resources>

View File

@ -19,6 +19,8 @@
<string name="menuSend">发送</string>
<string name="menuSaveToSd">保存到 SD 卡</string>
<string name="restart_needed">需要重启</string>
<string name="cache_cleaned">应用缓存已清除, 需要重新启动</string>
<!-- Welcome screen / main sections -->
<string name="tabInstall">我的设备</string>
<string name="welcome_framework_update_available">EdXposed 框架有更新可用(%s)</string>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="colorBackground" format="color" />
<attr name="colorActionBar" format="color" />
</resources>

View File

@ -1,12 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#2196f3</color>
<color name="colorBackground">#fff</color>
<color name="colorBackground">#fafafa</color>
<color name="colorPrimaryDark">#2196f3</color>
<color name="colorAccent">#448aff</color>
<color name="colorActionBar">#F0F0F0</color>
<color name="red_500">#F44336</color>
<color name="warning">@color/red_500</color>
<color name="download_status_update_available">#4CAF50</color>
<color name="amber_500">#FFC107</color>
<color name="navigationBarColor">@color/colorPrimary</color>
<color name="colorStickyHeader">#eaffffff</color>
<color name="colorStickyHeader">#eafafafa</color>
<color name="ic_launcher_background">#35C0CA</color>
</resources>

View File

@ -16,6 +16,8 @@
<string name="Settings">Settings</string>
<string name="About">About</string>
<string name="restart_needed">Restart needed</string>
<string name="cache_cleaned">App\'s cache has been cleaned. Restart is needed</string>
<!-- General/various strings -->
<string name="menuSend">Send</string>
<string name="menuSaveToSd">Save to SD card</string>
@ -347,4 +349,6 @@
<string name="pref_disable_modules_log_summary">Exception stack thrown by the module will still be catched normally</string>
<string name="pure_black_dark_theme">Use the pure black dark theme</string>
<string name="follow_system">Follow system</string>
<string name="pref_compat_mode_title">Compat List</string>
<string name="pref_compat_mode_summary">Compat mode app list</string>
</resources>

View File

@ -4,17 +4,21 @@
<style name="AppTheme" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorBackground</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="colorActionBar">@color/colorActionBar</item>
<item name="android:colorBackground">@color/colorBackground</item>
<item name="android:windowBackground">@color/colorBackground</item>
<item name="colorBackground">@color/colorBackground</item>
<item name="android:windowLightStatusBar" tools:targetApi="m">@bool/lightSystemUI</item>
<item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">@bool/lightSystemUI
</item>
<item name="android:navigationBarColor">@color/navigationBarColor</item>
</style>
<style name="AppThemeMain" parent="AppTheme">
<item name="colorPrimaryDark">@color/colorBackground</item>
</style>
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.MaterialComponents.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.MaterialComponents" />
@ -23,9 +27,9 @@
<style name="ThemeOverlay.Black">
<item name="colorPrimaryDark">@android:color/black</item>
<item name="colorActionBar">@android:color/black</item>
<item name="android:navigationBarColor">@android:color/black</item>
<item name="android:colorBackground">@android:color/black</item>
<item name="android:windowBackground">@android:color/black</item>
<item name="colorBackground">@android:color/black</item>
</style>
</resources>

View File

@ -6,12 +6,6 @@
android:title="@string/settings_group_app"
app:iconSpaceReserved="false">
<SwitchPreference
android:defaultValue="false"
android:key="colored_notification"
android:title="@string/notification_coloration"
app:iconSpaceReserved="false" />
<org.meowcat.edxposed.manager.widget.IntegerListPreference
android:defaultValue="-1"
android:entries="@array/theme_texts"
@ -25,37 +19,12 @@
android:title="@string/pure_black_dark_theme"
app:iconSpaceReserved="false" />
<org.meowcat.edxposed.manager.widget.IntegerListPreference
android:defaultValue="0"
android:entries="@array/default_view_texts"
android:entryValues="@array/default_view_values"
android:key="default_view"
android:summary="%s"
android:title="@string/settings_default_view"
app:iconSpaceReserved="false" />
<SwitchPreference
android:defaultValue="true"
android:key="chrome_tabs"
android:summary="@string/chrome_custom_tabs_summ"
android:title="@string/chrome_custom_tabs"
app:iconSpaceReserved="false" />
<SwitchPreference
android:defaultValue="true"
android:key="confirm_reboots"
android:title="@string/confirm_reboots"
app:iconSpaceReserved="false" />
<org.meowcat.edxposed.manager.widget.IntegerListPreference
android:defaultValue="0"
android:entries="@array/list_sort_texts"
android:entryValues="@array/list_sort_values"
android:key="list_sort"
android:summary="%s"
android:title="@string/list_sort"
app:iconSpaceReserved="false" />
<SwitchPreference
android:defaultValue="false"
android:key="skip_xposedminversion_check"
@ -77,12 +46,6 @@
android:title="@string/settings_group_download"
app:iconSpaceReserved="false">
<Preference
android:key="download_location"
android:summary="@string/download_location_summ"
android:title="@string/download_location"
app:iconSpaceReserved="false" />
<SwitchPreference
android:defaultValue="false"
android:key="install_with_su"
@ -145,7 +108,11 @@
android:key="group_framework"
android:title="@string/settings_group_framework"
app:iconSpaceReserved="false">
<Preference
android:key="compat_mode"
android:summary="@string/pref_compat_mode_summary"
android:title="@string/pref_compat_mode_title"
app:iconSpaceReserved="false" />
<SwitchPreference
android:defaultValue="false"
android:key="black_white_list_switch"

View File

@ -11,8 +11,7 @@
<intent
android:action="android.intent.action.MAIN"
android:targetClass="org.meowcat.edxposed.manager.ModulesActivity"
android:targetPackage="org.meowcat.edxposed.manager">
</intent>
android:targetPackage="org.meowcat.edxposed.manager"></intent>
</shortcut>
<shortcut
@ -25,8 +24,7 @@
<intent
android:action="android.intent.action.MAIN"
android:targetClass="org.meowcat.edxposed.manager.DownloadActivity"
android:targetPackage="org.meowcat.edxposed.manager">
</intent>
android:targetPackage="org.meowcat.edxposed.manager"></intent>
</shortcut>
</shortcuts>