diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 6d456ff25..bc92ac136 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -102,6 +102,7 @@ + diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index 169510a32..87ba8e640 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -4,6 +4,9 @@ * 先在旧版阅读(2.x)中进行备份,然后在新版阅读(3.x)【我的】->【备份与恢复】,选择【导入旧版本数据】,提示存储权限,选择允许即可导入成功。 * 注意:由于安卓10更改了权限策略,还需要给「允许安装其他应用」的权限才能导入源。MIUI11也需要此权限。 +**2019/12/22** +* 更新音频播放界面 + **2019/12/20** * 阅读界面的下载菜单可以用了 * rss阅读bug修复,webView内可以用返回建返回上一链接 diff --git a/app/src/main/java/io/legado/app/service/DownloadService.kt b/app/src/main/java/io/legado/app/service/DownloadService.kt index 6948259a3..d665d6b8f 100644 --- a/app/src/main/java/io/legado/app/service/DownloadService.kt +++ b/app/src/main/java/io/legado/app/service/DownloadService.kt @@ -39,9 +39,9 @@ class DownloadService : BaseService() { } override fun onDestroy() { - super.onDestroy() tasks.clear() searchPool.close() + super.onDestroy() } private fun download(bookUrl: String?, start: Int, end: Int) { diff --git a/app/src/main/java/io/legado/app/ui/about/DonateActivity.kt b/app/src/main/java/io/legado/app/ui/about/DonateActivity.kt index 32c8d0172..107be8809 100644 --- a/app/src/main/java/io/legado/app/ui/about/DonateActivity.kt +++ b/app/src/main/java/io/legado/app/ui/about/DonateActivity.kt @@ -76,8 +76,8 @@ class DonateActivity : BaseActivity(R.layout.activity_donate) { private fun aliDonate(context: Context) { try { val qrCode = URLEncoder.encode("tsx06677nwdk3javroq4ef0", "utf-8") - val aliPayQr = "alipayqr://platformapi/startapp?" + - "saId=10000007&qrcode=https://qr.alipay.com/$qrCode" + val aliPayQr = + "alipayqr://platformapi/startapp?saId=10000007&qrcode=https://qr.alipay.com/$qrCode" val intent = Intent(Intent.ACTION_VIEW, Uri.parse(aliPayQr)) context.startActivity(intent) } catch (e: Exception) { diff --git a/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt b/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt index 2b27a1600..a348b6e1e 100644 --- a/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt +++ b/app/src/main/java/io/legado/app/ui/audio/AudioPlayActivity.kt @@ -16,6 +16,7 @@ import io.legado.app.R import io.legado.app.base.VMBaseActivity import io.legado.app.constant.Bus import io.legado.app.constant.Status +import io.legado.app.constant.Theme import io.legado.app.data.entities.Book import io.legado.app.help.BlurTransformation import io.legado.app.help.ImageLoader @@ -34,7 +35,8 @@ import org.jetbrains.anko.sdk27.listeners.onLongClick import org.jetbrains.anko.startActivityForResult -class AudioPlayActivity : VMBaseActivity(R.layout.activity_audio_play), +class AudioPlayActivity : + VMBaseActivity(R.layout.activity_audio_play, theme = Theme.Dark), ChangeSourceDialog.CallBack { override val viewModel: AudioPlayViewModel @@ -44,6 +46,7 @@ class AudioPlayActivity : VMBaseActivity(R.layout.activity_a private var adjustProgress = false override fun onActivityCreated(savedInstanceState: Bundle?) { + title_bar.background.alpha = 0 AudioPlay.titleData.observe(this, Observer { title_bar.title = it }) AudioPlay.coverData.observe(this, Observer { upCover(it) }) viewModel.initData(intent) diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt index c45095a7e..8ee7b8e47 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt @@ -40,18 +40,17 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { if (ReadBook.book?.bookUrl != book.bookUrl) { ReadBook.resetData(book) isInitFinish = true - val count = App.db.bookChapterDao().getChapterCount(book.bookUrl) - if (count == 0) { + ReadBook.chapterSize = App.db.bookChapterDao().getChapterCount(book.bookUrl) + if (ReadBook.chapterSize == 0) { if (book.tocUrl.isEmpty()) { loadBookInfo(book) } else { loadChapterList(book) } } else { - if (ReadBook.durChapterIndex > count - 1) { - ReadBook.durChapterIndex = count - 1 + if (ReadBook.durChapterIndex > ReadBook.chapterSize - 1) { + ReadBook.durChapterIndex = ReadBook.chapterSize - 1 } - ReadBook.chapterSize = count ReadBook.loadContent() } if (ReadBook.inBookshelf) { @@ -60,6 +59,7 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { } else { isInitFinish = true ReadBook.titleDate.postValue(book.name) + ReadBook.chapterSize = App.db.bookChapterDao().getChapterCount(book.bookUrl) if (ReadBook.chapterSize == 0) { if (book.tocUrl.isEmpty()) { loadBookInfo(book) diff --git a/app/src/main/java/io/legado/app/ui/download/DownloadActivity.kt b/app/src/main/java/io/legado/app/ui/download/DownloadActivity.kt new file mode 100644 index 000000000..72356b869 --- /dev/null +++ b/app/src/main/java/io/legado/app/ui/download/DownloadActivity.kt @@ -0,0 +1,16 @@ +package io.legado.app.ui.download + +import android.os.Bundle +import io.legado.app.R +import io.legado.app.base.BaseActivity + + +class DownloadActivity : BaseActivity(R.layout.activity_download) { + + + override fun onActivityCreated(savedInstanceState: Bundle?) { + + } + + +} \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/widget/page/ContentSelectActionCallback.kt b/app/src/main/java/io/legado/app/ui/widget/page/ContentSelectActionCallback.kt index e8e8af8d4..76a4b669a 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/ContentSelectActionCallback.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/ContentSelectActionCallback.kt @@ -3,12 +3,13 @@ package io.legado.app.ui.widget.page import android.view.ActionMode import android.view.Menu import android.view.MenuItem +import android.widget.TextView import io.legado.app.R import io.legado.app.constant.Bus import io.legado.app.utils.postEvent -class ContentSelectActionCallback(private val textView: ContentTextView) : ActionMode.Callback { +class ContentSelectActionCallback(private val textView: TextView) : ActionMode.Callback { override fun onActionItemClicked(mode: ActionMode?, item: MenuItem?): Boolean { when (item?.itemId) { diff --git a/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt b/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt index 383425a7a..3a73c3227 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/ContentTextView.kt @@ -241,4 +241,5 @@ class ContentTextView : AppCompatTextView { } } } + } diff --git a/app/src/main/res/layout/activity_audio_play.xml b/app/src/main/res/layout/activity_audio_play.xml index cbae32334..71a7edfe8 100644 --- a/app/src/main/res/layout/activity_audio_play.xml +++ b/app/src/main/res/layout/activity_audio_play.xml @@ -15,20 +15,18 @@ android:scaleType="centerCrop" tools:ignore="ContentDescription" /> + + - - + + + \ No newline at end of file