From 25de1e213ec49e290684e2edc72317a59ddeb924 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 19 Sep 2021 20:00:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/widget/{ => image}/ArcView.kt | 9 +++++++-- app/src/main/res/layout-land/activity_book_info.xml | 2 +- app/src/main/res/layout/activity_book_info.xml | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) rename app/src/main/java/io/legado/app/ui/widget/{ => image}/ArcView.kt (94%) diff --git a/app/src/main/java/io/legado/app/ui/widget/ArcView.kt b/app/src/main/java/io/legado/app/ui/widget/image/ArcView.kt similarity index 94% rename from app/src/main/java/io/legado/app/ui/widget/ArcView.kt rename to app/src/main/java/io/legado/app/ui/widget/image/ArcView.kt index b92d552af..b2bfc241a 100644 --- a/app/src/main/java/io/legado/app/ui/widget/ArcView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/image/ArcView.kt @@ -1,4 +1,4 @@ -package io.legado.app.ui.widget +package io.legado.app.ui.widget.image import android.content.Context import android.graphics.* @@ -6,6 +6,9 @@ import android.util.AttributeSet import android.view.View import io.legado.app.R +/** + * 弧形View + */ class ArcView @JvmOverloads constructor( context: Context, attrs: AttributeSet? = null @@ -18,7 +21,9 @@ class ArcView @JvmOverloads constructor( //背景颜色 private var mBgColor: Int - private val mPaint: Paint = Paint() + private val mPaint: Paint = Paint().apply { + isAntiAlias = true + } private val mDirectionTop: Boolean val rect = Rect() val path = Path() diff --git a/app/src/main/res/layout-land/activity_book_info.xml b/app/src/main/res/layout-land/activity_book_info.xml index 036cdd05e..47503f120 100644 --- a/app/src/main/res/layout-land/activity_book_info.xml +++ b/app/src/main/res/layout-land/activity_book_info.xml @@ -44,7 +44,7 @@ android:layout_height="wrap_content" android:layout_marginTop="68dp"> - -