diff --git a/app/build.gradle b/app/build.gradle index 1389537ab..82a57df5e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -65,6 +65,7 @@ dependencies { def androidXVersion = "1.0.0" implementation 'androidx.core:core:1.0.1' + fullImplementation 'androidx.constraintlayout:constraintlayout:1.1.3' fullImplementation 'androidx.appcompat:appcompat:1.0.2' fullImplementation "androidx.preference:preference:${androidXVersion}" fullImplementation "androidx.recyclerview:recyclerview:${androidXVersion}" diff --git a/app/src/full/AndroidManifest.xml b/app/src/full/AndroidManifest.xml index 20dd8c3fd..27b0e4314 100644 --- a/app/src/full/AndroidManifest.xml +++ b/app/src/full/AndroidManifest.xml @@ -9,7 +9,7 @@ @@ -33,9 +33,6 @@ - AppUtils.openLink(this, Uri.parse(Const.Url.SOURCE_CODE_URL))); supportThread.setOnClickListener(v -> AppUtils.openLink(this, Uri.parse(Const.Url.XDA_THREAD))); twitter.setOnClickListener(v -> AppUtils.openLink(this, Uri.parse(Const.Url.TWITTER_URL))); + paypal.setOnClickListener(v -> AppUtils.openLink(this, Uri.parse(Const.Url.PAYPAL_URL))); + patreon.setOnClickListener(v -> AppUtils.openLink(this, Uri.parse(Const.Url.PATREON_URL))); setFloating(); } diff --git a/app/src/full/java/com/topjohnwu/magisk/ClassMap.java b/app/src/full/java/com/topjohnwu/magisk/ClassMap.java index 8b60e002a..4acaaa4d9 100644 --- a/app/src/full/java/com/topjohnwu/magisk/ClassMap.java +++ b/app/src/full/java/com/topjohnwu/magisk/ClassMap.java @@ -14,11 +14,10 @@ public class ClassMap { private static Map classMap = new HashMap<>(); static { - classMap.put(App.class, a.q.class); + classMap.put(App.class, a.e.class); classMap.put(MainActivity.class, a.b.class); classMap.put(SplashActivity.class, a.c.class); classMap.put(AboutActivity.class, a.d.class); - classMap.put(DonationActivity.class, a.e.class); classMap.put(FlashActivity.class, a.f.class); classMap.put(UpdateCheckService.class, a.g.class); classMap.put(GeneralReceiver.class, a.h.class); diff --git a/app/src/full/java/com/topjohnwu/magisk/DonationActivity.java b/app/src/full/java/com/topjohnwu/magisk/DonationActivity.java deleted file mode 100644 index 600e0144a..000000000 --- a/app/src/full/java/com/topjohnwu/magisk/DonationActivity.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.topjohnwu.magisk; - -import android.net.Uri; -import android.os.Bundle; - -import com.topjohnwu.core.Const; -import com.topjohnwu.magisk.components.AboutCardRow; -import com.topjohnwu.magisk.components.BaseActivity; -import com.topjohnwu.magisk.utils.AppUtils; - -import androidx.annotation.Nullable; -import androidx.appcompat.app.ActionBar; -import androidx.appcompat.widget.Toolbar; -import butterknife.BindView; - -public class DonationActivity extends BaseActivity { - - @BindView(R.id.toolbar) Toolbar toolbar; - @BindView(R.id.paypal) AboutCardRow paypal; - @BindView(R.id.patreon) AboutCardRow patreon; - - @Override - public int getDarkTheme() { - return R.style.AppTheme_NoDrawer_Dark; - } - - @Override - protected void onCreate(@Nullable Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_donation); - new DonationActivity_ViewBinding(this); - - setSupportActionBar(toolbar); - toolbar.setNavigationOnClickListener(view -> finish()); - - ActionBar ab = getSupportActionBar(); - if (ab != null) { - ab.setTitle(R.string.donation); - ab.setDisplayHomeAsUpEnabled(true); - } - - paypal.setOnClickListener(v -> AppUtils.openLink(this, Uri.parse(Const.Url.PAYPAL_URL))); - patreon.setOnClickListener(v -> AppUtils.openLink(this, Uri.parse(Const.Url.PATREON_URL))); - } -} diff --git a/app/src/full/java/com/topjohnwu/magisk/MainActivity.java b/app/src/full/java/com/topjohnwu/magisk/MainActivity.java index ac92cec97..44fc7b589 100644 --- a/app/src/full/java/com/topjohnwu/magisk/MainActivity.java +++ b/app/src/full/java/com/topjohnwu/magisk/MainActivity.java @@ -158,9 +158,6 @@ public class MainActivity extends BaseActivity case "about": itemId = R.id.app_about; break; - case "donation": - itemId = R.id.donation; - break; } } navigate(itemId); @@ -197,10 +194,6 @@ public class MainActivity extends BaseActivity startActivity(new Intent(this, ClassMap.get(AboutActivity.class))); mDrawerItem = bak; break; - case R.id.donation: - startActivity(new Intent(this, ClassMap.get(DonationActivity.class))); - mDrawerItem = bak; - break; } } diff --git a/app/src/full/res/layout/activity_about.xml b/app/src/full/res/layout/activity_about.xml index aeba3daf3..a1f3e0222 100644 --- a/app/src/full/res/layout/activity_about.xml +++ b/app/src/full/res/layout/activity_about.xml @@ -1,14 +1,14 @@ + + + + + + + + + + + + + + + + - - - - - - - - -