diff --git a/app/src/main/java/io/legado/app/base/BaseActivity.kt b/app/src/main/java/io/legado/app/base/BaseActivity.kt index c7f4819b3..87ec5121e 100644 --- a/app/src/main/java/io/legado/app/base/BaseActivity.kt +++ b/app/src/main/java/io/legado/app/base/BaseActivity.kt @@ -11,6 +11,7 @@ import androidx.appcompat.view.menu.MenuBuilder import androidx.appcompat.view.menu.MenuItemImpl import androidx.core.view.forEach import androidx.lifecycle.ViewModel +import io.legado.app.R import io.legado.app.lib.theme.ColorUtils import io.legado.app.lib.theme.DrawableUtils import io.legado.app.lib.theme.ThemeStore @@ -41,7 +42,7 @@ abstract class BaseActivity : AppCompatActivity() { } val bool = onCompatCreateOptionsMenu(it) val primaryTextColor = getPrimaryTextColor(ColorUtils.isColorLight(ThemeStore.primaryColor(this))) - val defaultTextColor = getCompatColor(io.legado.app.R.color.tv_text_default) + val defaultTextColor = getCompatColor(R.color.tv_text_default) menu.forEach { item -> (item as MenuItemImpl).let { impl -> //overflow:展开的item @@ -76,9 +77,9 @@ abstract class BaseActivity : AppCompatActivity() { protected fun initTheme() { if (ColorUtils.isColorLight(ThemeStore.primaryColor(this))) { - setTheme(io.legado.app.R.style.AppTheme_Light) + setTheme(R.style.AppTheme_Light) } else { - setTheme(io.legado.app.R.style.AppTheme_Dark) + setTheme(R.style.AppTheme_Dark) } } diff --git a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt index e0b1c1aa6..c63b53d05 100644 --- a/app/src/main/java/io/legado/app/ui/main/MainActivity.kt +++ b/app/src/main/java/io/legado/app/ui/main/MainActivity.kt @@ -6,7 +6,6 @@ import android.view.MenuItem import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import androidx.fragment.app.FragmentPagerAdapter -import androidx.fragment.app.FragmentStatePagerAdapter import androidx.viewpager.widget.ViewPager import com.google.android.material.bottomnavigation.BottomNavigationView import io.legado.app.R