优化,主题色适配

pull/298/head
gedoor 4 years ago
parent 637fe93f51
commit 2b465d2404
  1. 7
      app/src/main/java/io/legado/app/ui/about/AboutActivity.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/local/ImportBookActivity.kt
  3. 4
      app/src/main/res/layout/activity_import_book.xml

@ -1,5 +1,6 @@
package io.legado.app.ui.about
import android.graphics.drawable.GradientDrawable
import android.os.Bundle
import android.text.Spannable
import android.text.SpannableString
@ -9,6 +10,8 @@ import android.view.MenuItem
import io.legado.app.R
import io.legado.app.base.BaseActivity
import io.legado.app.lib.theme.accentColor
import io.legado.app.lib.theme.backgroundColor
import io.legado.app.utils.dp
import io.legado.app.utils.openUrl
import kotlinx.android.synthetic.main.activity_about.*
import org.jetbrains.anko.share
@ -17,6 +20,10 @@ import org.jetbrains.anko.share
class AboutActivity : BaseActivity(R.layout.activity_about) {
override fun onActivityCreated(savedInstanceState: Bundle?) {
val background = GradientDrawable()
background.cornerRadius = 3F.dp
background.setColor(backgroundColor)
ll_about.background = background
val fTag = "aboutFragment"
var aboutFragment = supportFragmentManager.findFragmentByTag(fTag)
if (aboutFragment == null) aboutFragment = AboutFragment()

@ -20,6 +20,7 @@ import io.legado.app.base.VMBaseActivity
import io.legado.app.help.AppConfig
import io.legado.app.help.permission.Permissions
import io.legado.app.help.permission.PermissionsCompat
import io.legado.app.lib.theme.backgroundColor
import io.legado.app.ui.filechooser.FileChooserDialog
import io.legado.app.ui.filechooser.FilePicker
import io.legado.app.ui.widget.SelectActionBar
@ -62,6 +63,7 @@ class ImportBookActivity : VMBaseActivity<ImportBookViewModel>(R.layout.activity
}
private fun initView() {
lay_top.setBackgroundColor(backgroundColor)
recycler_view.layoutManager = LinearLayoutManager(this)
adapter = ImportBookAdapter(this, this)
recycler_view.adapter = adapter

@ -14,7 +14,7 @@
<!--path-->
<LinearLayout
android:id="@+id/layTop"
android:id="@+id/lay_top"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/titleBar"
@ -57,7 +57,7 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
app:layout_constraintTop_toBottomOf="@id/layTop"
app:layout_constraintTop_toBottomOf="@id/lay_top"
app:layout_constraintBottom_toTopOf="@id/select_action_bar">
<io.legado.app.ui.widget.recycler.scroller.FastScrollRecyclerView

Loading…
Cancel
Save