|
|
@ -4,7 +4,6 @@ import android.app.Activity |
|
|
|
import android.content.Intent |
|
|
|
import android.content.Intent |
|
|
|
import android.graphics.drawable.Drawable |
|
|
|
import android.graphics.drawable.Drawable |
|
|
|
import android.os.Bundle |
|
|
|
import android.os.Bundle |
|
|
|
import android.text.method.ScrollingMovementMethod |
|
|
|
|
|
|
|
import android.view.Menu |
|
|
|
import android.view.Menu |
|
|
|
import android.view.MenuItem |
|
|
|
import android.view.MenuItem |
|
|
|
import androidx.lifecycle.Observer |
|
|
|
import androidx.lifecycle.Observer |
|
|
@ -55,7 +54,6 @@ class BookInfoActivity : |
|
|
|
override fun onActivityCreated(savedInstanceState: Bundle?) { |
|
|
|
override fun onActivityCreated(savedInstanceState: Bundle?) { |
|
|
|
setSupportActionBar(toolbar) |
|
|
|
setSupportActionBar(toolbar) |
|
|
|
supportActionBar?.setDisplayHomeAsUpEnabled(true) |
|
|
|
supportActionBar?.setDisplayHomeAsUpEnabled(true) |
|
|
|
// tv_intro.movementMethod = ScrollingMovementMethod.getInstance() |
|
|
|
|
|
|
|
viewModel.bookData.observe(this, Observer { showBook(it) }) |
|
|
|
viewModel.bookData.observe(this, Observer { showBook(it) }) |
|
|
|
viewModel.chapterListData.observe(this, Observer { upLoading(false, it) }) |
|
|
|
viewModel.chapterListData.observe(this, Observer { upLoading(false, it) }) |
|
|
|
viewModel.initData(intent) |
|
|
|
viewModel.initData(intent) |
|
|
@ -126,7 +124,6 @@ class BookInfoActivity : |
|
|
|
ImageLoader.load(this, book.getDisplayCover()) |
|
|
|
ImageLoader.load(this, book.getDisplayCover()) |
|
|
|
.transition(DrawableTransitionOptions.withCrossFade(1500)) |
|
|
|
.transition(DrawableTransitionOptions.withCrossFade(1500)) |
|
|
|
.thumbnail(defaultCover()) |
|
|
|
.thumbnail(defaultCover()) |
|
|
|
.centerCrop() |
|
|
|
|
|
|
|
.apply(bitmapTransform(BlurTransformation(this, 25))) |
|
|
|
.apply(bitmapTransform(BlurTransformation(this, 25))) |
|
|
|
.into(bg_book) //模糊、渐变、缩小效果 |
|
|
|
.into(bg_book) //模糊、渐变、缩小效果 |
|
|
|
} |
|
|
|
} |
|
|
|