HapeLee 1 год назад
Родитель
Сommit
c673169456

+ 0 - 49
app/src/main/java/io/legato/kazusa/ui/widget/TitleBar.kt

@@ -188,55 +188,6 @@ class TitleBar @JvmOverloads constructor(
         toolbar.setSubtitle(subtitleId)
     }
 
-//    fun setTitleTextColor(@ColorInt color: Int) {
-//        toolbar.setTitleTextColor(color)
-//    }
-//
-//    fun setTitleTextAppearance(@StyleRes resId: Int) {
-//        toolbar.setTitleTextAppearance(context, resId)
-//    }
-//
-//    fun setSubTitleTextColor(@ColorInt color: Int) {
-//        toolbar.setSubtitleTextColor(color)
-//    }
-//
-//    fun setSubTitleTextAppearance(@StyleRes resId: Int) {
-//        toolbar.setSubtitleTextAppearance(context, resId)
-//    }
-//
-//    fun setTextColor(@ColorInt color: Int) {
-//        setTitleTextColor(color)
-//        setSubTitleTextColor(color)
-//    }
-//
-//    fun setColorFilter(@ColorInt color: Int) {
-//        val colorFilter = PorterDuffColorFilter(color, PorterDuff.Mode.SRC_ATOP)
-//        toolbar.children.firstOrNull { it is ImageView }?.background?.colorFilter = colorFilter
-//        toolbar.navigationIcon?.colorFilter = colorFilter
-//        toolbar.overflowIcon?.colorFilter = colorFilter
-//        toolbar.menu.children.forEach {
-//            it.icon?.colorFilter = colorFilter
-//        }
-//    }
-//
-//    override fun setBackgroundColor(color: Int) {
-//        if (color.alpha < 255) {
-//            //这里不能改为0f,改为0f在横屏模式下文字和图标颜色会变
-//            elevation = 0.1f
-//        }
-//        super.setBackgroundColor(color)
-//    }
-//
-//    override fun setBackground(background: Drawable?) {
-//        if (background is ColorDrawable) {
-//            if (background.alpha < 255) {
-//                //这里不能改为0f,改为0f在横屏模式下文字和图标颜色会变
-//                elevation = 0.1f
-//            }
-//        }
-//        super.setBackground(background)
-//    }
-
     fun onMultiWindowModeChanged(isInMultiWindowMode: Boolean, fullScreen: Boolean) {
 //        if (fitStatusBar) {
 //            val topPadding = if (!isInMultiWindowMode && fullScreen) context.statusBarHeight else 0

+ 2 - 0
app/src/main/res/layout/activity_about.xml

@@ -24,6 +24,8 @@
             app:titleCollapseMode="scale">
 
             <com.google.android.material.appbar.MaterialToolbar
+android:theme="@style/ThemeOverlay.Material3.Toolbar.CircleNavigationButton"
+
                 android:id="@+id/top_bar"
                 android:layout_width="match_parent"
                 android:layout_height="?attr/actionBarSize"

+ 1 - 0
app/src/main/res/layout/activity_all_bookmark.xml

@@ -21,6 +21,7 @@
             app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
 
             <com.google.android.material.appbar.MaterialToolbar
+                android:theme="@style/ThemeOverlay.Material3.Toolbar.CircleNavigationButton"
                 android:id="@+id/top_bar"
                 android:layout_width="match_parent"
                 android:layout_height="?attr/actionBarSize"

+ 1 - 1
app/src/main/res/layout/activity_book_search.xml

@@ -33,7 +33,7 @@
                 android:id="@+id/refresh_progress_bar"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:visibility="gone"
+                android:visibility="invisible"
                 app:waveAmplitude="2dp"
                 app:waveSpeed="50dp"
                 app:wavelength="40dp" />

+ 1 - 0
app/src/main/res/layout/activity_chapter_list.xml

@@ -14,6 +14,7 @@
         app:layout_constraintTop_toTopOf="parent">
 
         <com.google.android.material.appbar.MaterialToolbar
+            android:theme="@style/ThemeOverlay.Material3.Toolbar.CircleNavigationButton"
             android:id="@+id/top_bar"
             android:layout_width="match_parent"
             android:layout_height="?attr/actionBarSize"

+ 1 - 0
app/src/main/res/layout/activity_config.xml

@@ -24,6 +24,7 @@
             app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
 
             <com.google.android.material.appbar.MaterialToolbar
+                android:theme="@style/ThemeOverlay.Material3.Toolbar.CircleNavigationButton"
                 android:id="@+id/top_bar"
                 android:layout_width="match_parent"
                 android:layout_height="?attr/actionBarSize"

+ 1 - 0
app/src/main/res/layout/activity_rss_artivles.xml

@@ -26,6 +26,7 @@
             app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
 
             <com.google.android.material.appbar.MaterialToolbar
+                android:theme="@style/ThemeOverlay.Material3.Toolbar.CircleNavigationButton"
                 android:id="@+id/top_bar"
                 android:layout_width="match_parent"
                 android:layout_height="?attr/actionBarSize"

+ 2 - 1
app/src/main/res/layout/view_title_bar.xml

@@ -3,4 +3,5 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:id="@+id/toolbar"
     android:layout_width="match_parent"
-    android:layout_height="wrap_content" />
+    android:layout_height="wrap_content"
+    android:theme="@style/ThemeOverlay.Material3.Toolbar.CircleNavigationButton"/>