From ed96e3addd0e9e25415c11c9c52268a689b048c7 Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 20 Mar 2020 19:04:52 +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 --- .../app/ui/book/info/BookInfoActivity.kt | 3 +-- .../java/io/legado/app/ui/widget/TitleBar.kt | 6 +++++ .../res/layout-land/activity_book_info.xml | 26 +++++++++---------- .../main/res/layout/activity_book_info.xml | 7 ++--- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt index bd9b3700f..4ea22d61c 100644 --- a/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt @@ -57,8 +57,7 @@ class BookInfoActivity : get() = getViewModel(BookInfoViewModel::class.java) override fun onActivityCreated(savedInstanceState: Bundle?) { - setSupportActionBar(toolbar) - supportActionBar?.setDisplayHomeAsUpEnabled(true) + title_bar.transparent() viewModel.bookData.observe(this, Observer { showBook(it) }) viewModel.chapterListData.observe(this, Observer { upLoading(false, it) }) viewModel.initData(intent) diff --git a/app/src/main/java/io/legado/app/ui/widget/TitleBar.kt b/app/src/main/java/io/legado/app/ui/widget/TitleBar.kt index 663bb55a8..94d3b7be6 100644 --- a/app/src/main/java/io/legado/app/ui/widget/TitleBar.kt +++ b/app/src/main/java/io/legado/app/ui/widget/TitleBar.kt @@ -2,6 +2,7 @@ package io.legado.app.ui.widget import android.content.Context import android.content.res.ColorStateList +import android.graphics.Color import android.util.AttributeSet import android.view.Menu import android.view.View @@ -186,6 +187,11 @@ class TitleBar(context: Context, attrs: AttributeSet?) : AppBarLayout(context, a toolbar.setSubtitleTextAppearance(context, resId) } + fun transparent() { + elevation = 0f + backgroundColor = Color.TRANSPARENT + } + private fun attachToActivity() { if (attachToActivity) { activity?.let { 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 27e0bec0d..1dc7d789c 100644 --- a/app/src/main/res/layout-land/activity_book_info.xml +++ b/app/src/main/res/layout-land/activity_book_info.xml @@ -14,13 +14,10 @@ android:contentDescription="@string/bg_image" app:layout_constraintTop_toTopOf="parent" /> - @@ -81,7 +78,8 @@ android:paddingLeft="10dp" android:paddingTop="8dp" android:paddingRight="16dp" - android:paddingBottom="3dp"> + android:paddingBottom="3dp" + tools:ignore="RtlHardcoded"> + android:scrollbars="vertical" + tools:ignore="NestedWeights"> + tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry" /> + tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry" /> @@ -290,7 +288,7 @@ android:text="@string/group_s" android:textColor="@color/tv_text_summary" android:textSize="13sp" - tools:ignore="NestedWeights" /> + tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry" /> + tools:ignore="NestedWeights,RtlHardcoded,RtlSymmetry" /> + android:background="@color/background" /> -