From e256189b0606abcc22124e76fdc2bc188c879a8a Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 8 Mar 2020 20:17:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/about/DonateFragment.kt | 18 ------------ .../main/res/layout/dialog_read_padding.xml | 29 +++++++++++++++---- app/src/main/res/xml/donate.xml | 6 ---- 3 files changed, 24 insertions(+), 29 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/about/DonateFragment.kt b/app/src/main/java/io/legado/app/ui/about/DonateFragment.kt index 0270b3f77..f82fa1b64 100644 --- a/app/src/main/java/io/legado/app/ui/about/DonateFragment.kt +++ b/app/src/main/java/io/legado/app/ui/about/DonateFragment.kt @@ -2,7 +2,6 @@ package io.legado.app.ui.about import android.content.Context import android.content.Intent -import android.net.Uri import android.os.Bundle import android.view.View import androidx.preference.Preference @@ -12,7 +11,6 @@ import io.legado.app.utils.ACache import io.legado.app.utils.openUrl import io.legado.app.utils.sendToClip import org.jetbrains.anko.longToast -import java.net.URLEncoder class DonateFragment : PreferenceFragmentCompat() { @@ -36,7 +34,6 @@ class DonateFragment : PreferenceFragmentCompat() { "zfbHbRwm" -> requireContext().openUrl(zfbHbRwmUrl) "zfbSkRwm" -> requireContext().openUrl(zfbSkRwmUrl) "qqSkRwm" -> requireContext().openUrl(qqSkRwmUrl) - "zfbSk" -> aliDonate(requireContext()) "zfbHbSsm" -> getZfbHb(requireContext()) "gzGzh" -> requireContext().sendToClip("开源阅读软件") } @@ -59,19 +56,4 @@ class DonateFragment : PreferenceFragmentCompat() { } } - private fun aliDonate(context: Context) { - try { - val qrCode = URLEncoder.encode( - "https://qr.alipay.com/tsx06677nwdk3javroq4ef0?_s=Dweb-other", - "utf-8" - ) - val aliPayQr = - "alipayqr://platformapi/startapp?saId=10000007&qrcode=$qrCode&_t=${System.currentTimeMillis()}" - val intent = Intent(Intent.ACTION_VIEW, Uri.parse(aliPayQr)) - context.startActivity(intent) - } catch (e: Exception) { - e.printStackTrace() - } - } - } \ No newline at end of file diff --git a/app/src/main/res/layout/dialog_read_padding.xml b/app/src/main/res/layout/dialog_read_padding.xml index 83bb14c71..79b89ec40 100644 --- a/app/src/main/res/layout/dialog_read_padding.xml +++ b/app/src/main/res/layout/dialog_read_padding.xml @@ -11,15 +11,34 @@ android:id="@+id/ll_header_padding" android:layout_width="match_parent" android:layout_height="wrap_content" + android:gravity="center_vertical" android:orientation="vertical"> - + android:orientation="horizontal"> + + + + + + + + - -