优化代码

pull/743/head
gedoor 4 years ago
parent 156864b83d
commit 2801aac80e
  1. 3
      app/src/main/java/io/legado/app/data/entities/Bookmark.kt
  2. 1
      app/src/main/java/io/legado/app/data/entities/RssSource.kt
  3. 9
      app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt
  4. 5
      app/src/main/java/io/legado/app/ui/book/read/ReadBookBaseActivity.kt
  5. 49
      app/src/main/java/io/legado/app/ui/book/read/page/ContentTextView.kt
  6. 7
      app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt
  7. 14
      app/src/main/java/io/legado/app/ui/book/read/page/ReadView.kt
  8. 8
      app/src/main/java/io/legado/app/ui/book/read/page/api/PageFactory.kt
  9. 6
      app/src/main/java/io/legado/app/ui/book/read/page/entities/PageData.kt
  10. 5
      app/src/main/java/io/legado/app/ui/book/read/page/entities/TextChapter.kt
  11. 19
      app/src/main/java/io/legado/app/ui/book/read/page/entities/TextPage.kt
  12. 10
      app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt
  13. 51
      app/src/main/java/io/legado/app/ui/book/read/page/provider/TextPageFactory.kt
  14. 2
      app/src/main/java/io/legado/app/ui/book/toc/BookmarkFragment.kt
  15. 5
      app/src/main/res/menu/book_read.xml
  16. 4
      app/src/main/res/menu/content_select_action.xml

@ -15,8 +15,9 @@ data class Bookmark(
var bookName: String = "", var bookName: String = "",
val bookAuthor: String = "", val bookAuthor: String = "",
var chapterIndex: Int = 0, var chapterIndex: Int = 0,
var pageIndex: Int = 0, var chapterPos: Int = 0,
var chapterName: String = "", var chapterName: String = "",
var bookText: String = "",
var content: String = "" var content: String = ""
) : Parcelable ) : Parcelable

@ -25,6 +25,7 @@ data class RssSource(
var sourceGroup: String? = null, var sourceGroup: String? = null,
var enabled: Boolean = true, var enabled: Boolean = true,
var sortUrl: String? = null, var sortUrl: String? = null,
var singleUrl: Boolean = false,
var articleStyle: Int = 0, var articleStyle: Int = 0,
//列表规则 //列表规则
var ruleArticles: String? = null, var ruleArticles: String? = null,

@ -199,7 +199,6 @@ class ReadBookActivity : ReadBookBaseActivity(),
} }
} }
R.id.menu_download -> showDownloadDialog() R.id.menu_download -> showDownloadDialog()
R.id.menu_add_bookmark -> showBookMark()
R.id.menu_copy_text -> R.id.menu_copy_text ->
TextDialog.show(supportFragmentManager, ReadBook.curTextChapter?.getContent()) TextDialog.show(supportFragmentManager, ReadBook.curTextChapter?.getContent())
R.id.menu_update_toc -> ReadBook.book?.let { R.id.menu_update_toc -> ReadBook.book?.let {
@ -430,6 +429,10 @@ class ReadBookActivity : ReadBookBaseActivity(),
*/ */
override fun onMenuItemSelected(itemId: Int): Boolean { override fun onMenuItemSelected(itemId: Int): Boolean {
when (itemId) { when (itemId) {
R.id.menu_bookmark -> binding.readView.curPage.let {
showBookMark(0, it.selectedText)
return true
}
R.id.menu_replace -> { R.id.menu_replace -> {
val scopes = arrayListOf<String>() val scopes = arrayListOf<String>()
ReadBook.book?.name?.let { ReadBook.book?.name?.let {
@ -748,8 +751,8 @@ class ReadBookActivity : ReadBookBaseActivity(),
requestCodeChapterList -> requestCodeChapterList ->
data?.getIntExtra("index", ReadBook.durChapterIndex)?.let { index -> data?.getIntExtra("index", ReadBook.durChapterIndex)?.let { index ->
if (index != ReadBook.durChapterIndex) { if (index != ReadBook.durChapterIndex) {
val pageIndex = data.getIntExtra("pageIndex", 0) val chapterPos = data.getIntExtra("chapterPos", 0)
viewModel.openChapter(index, pageIndex) viewModel.openChapter(index, chapterPos)
} }
} }
requestCodeSearchResult -> requestCodeSearchResult ->

@ -199,7 +199,7 @@ abstract class ReadBookBaseActivity :
} }
@SuppressLint("InflateParams") @SuppressLint("InflateParams")
fun showBookMark() { fun showBookMark(chapterPos: Int, bookText: String) {
val book = ReadBook.book ?: return val book = ReadBook.book ?: return
val textChapter = ReadBook.curTextChapter ?: return val textChapter = ReadBook.curTextChapter ?: return
alert(title = getString(R.string.bookmark_add)) { alert(title = getString(R.string.bookmark_add)) {
@ -215,8 +215,9 @@ abstract class ReadBookBaseActivity :
bookUrl = book.bookUrl, bookUrl = book.bookUrl,
bookName = book.name, bookName = book.name,
chapterIndex = ReadBook.durChapterIndex, chapterIndex = ReadBook.durChapterIndex,
pageIndex = ReadBook.durChapterPos, chapterPos = chapterPos,
chapterName = textChapter.title, chapterName = textChapter.title,
bookText = bookText,
content = editContent content = editContent
) )
App.db.bookmarkDao.insert(bookmark) App.db.bookmarkDao.insert(bookmark)

@ -12,7 +12,9 @@ import io.legado.app.constant.PreferKey
import io.legado.app.help.ReadBookConfig import io.legado.app.help.ReadBookConfig
import io.legado.app.lib.theme.accentColor import io.legado.app.lib.theme.accentColor
import io.legado.app.service.help.ReadBook import io.legado.app.service.help.ReadBook
import io.legado.app.ui.book.read.page.entities.* import io.legado.app.ui.book.read.page.entities.TextChar
import io.legado.app.ui.book.read.page.entities.TextLine
import io.legado.app.ui.book.read.page.entities.TextPage
import io.legado.app.ui.book.read.page.provider.ChapterProvider import io.legado.app.ui.book.read.page.provider.ChapterProvider
import io.legado.app.ui.book.read.page.provider.ImageProvider import io.legado.app.ui.book.read.page.provider.ImageProvider
import io.legado.app.ui.book.read.page.provider.TextPageFactory import io.legado.app.ui.book.read.page.provider.TextPageFactory
@ -39,7 +41,6 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
private val visibleRect = RectF() private val visibleRect = RectF()
private val selectStart = arrayOf(0, 0, 0) private val selectStart = arrayOf(0, 0, 0)
private val selectEnd = arrayOf(0, 0, 0) private val selectEnd = arrayOf(0, 0, 0)
private var textChapter: TextChapter? = null
var textPage: TextPage = TextPage() var textPage: TextPage = TextPage()
private set private set
@ -51,9 +52,8 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
callBack = activity as CallBack callBack = activity as CallBack
} }
fun setContent(pageData: PageData) { fun setContent(textPage: TextPage) {
this.textChapter = pageData.textChapter this.textPage = textPage
this.textPage = pageData.textPage
invalidate() invalidate()
} }
@ -140,9 +140,9 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
isReadAloud: Boolean, isReadAloud: Boolean,
) { ) {
val textPaint = if (isTitle) { val textPaint = if (isTitle) {
textChapter?.titlePaint ?: ChapterProvider.titlePaint ChapterProvider.titlePaint
} else { } else {
textChapter?.contentPaint ?: ChapterProvider.contentPaint ChapterProvider.contentPaint
} }
textPaint.color = textPaint.color =
if (isReadAloud) context.accentColor else ReadBookConfig.textColor if (isReadAloud) context.accentColor else ReadBookConfig.textColor
@ -190,14 +190,14 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
pageOffset = min(0, offset) pageOffset = min(0, offset)
} else if (pageOffset > 0) { } else if (pageOffset > 0) {
pageFactory.moveToPrev(false) pageFactory.moveToPrev(false)
textPage = pageFactory.curData.textPage textPage = pageFactory.curPage
pageOffset -= textPage.height.toInt() pageOffset -= textPage.height.toInt()
upView?.invoke(textPage) upView?.invoke(textPage)
contentDescription = textPage.text contentDescription = textPage.text
} else if (pageOffset < -textPage.height) { } else if (pageOffset < -textPage.height) {
pageOffset += textPage.height.toInt() pageOffset += textPage.height.toInt()
pageFactory.moveToNext(false) pageFactory.moveToNext(false)
textPage = pageFactory.curData.textPage textPage = pageFactory.curPage
upView?.invoke(textPage) upView?.invoke(textPage)
contentDescription = textPage.text contentDescription = textPage.text
} }
@ -308,15 +308,19 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
} }
Log.e("y", "$y") Log.e("y", "$y")
for ((lineIndex, textLine) in relativePage(relativePos).textLines.withIndex()) { for ((lineIndex, textLine) in relativePage(relativePos).textLines.withIndex()) {
if (y > textLine.lineTop + relativeOffset && y < textLine.lineBottom + relativeOffset) { if (y > textLine.lineTop + relativeOffset
&& y < textLine.lineBottom + relativeOffset
) {
Log.e("line", "$relativePos $lineIndex") Log.e("line", "$relativePos $lineIndex")
for ((charIndex, textChar) in textLine.textChars.withIndex()) { for ((charIndex, textChar) in textLine.textChars.withIndex()) {
if (x > textChar.start && x < textChar.end) { if (x > textChar.start && x < textChar.end) {
Log.e("char", "$relativePos $lineIndex $charIndex") Log.e("char", "$relativePos $lineIndex $charIndex")
if (selectEnd[0] != relativePos || selectEnd[1] != lineIndex || selectEnd[2] != charIndex) { if (selectEnd[0] != relativePos
if (selectToInt(relativePos, lineIndex, charIndex) < selectToInt( || selectEnd[1] != lineIndex
selectStart || selectEnd[2] != charIndex
) ) {
if (selectToInt(relativePos, lineIndex, charIndex)
< selectToInt(selectStart)
) { ) {
return return
} }
@ -476,6 +480,17 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
return stringBuilder.toString() return stringBuilder.toString()
} }
val selectStartPos: Int
get() {
for (i in 0 until selectStart[0]) {
}
return 0
}
private fun selectToInt(page: Int, line: Int, char: Int): Int { private fun selectToInt(page: Int, line: Int, char: Int): Int {
return page * 10000000 + line * 100000 + char return page * 10000000 + line * 100000 + char
} }
@ -488,15 +503,15 @@ class ContentTextView(context: Context, attrs: AttributeSet?) : View(context, at
return when (relativePos) { return when (relativePos) {
0 -> pageOffset.toFloat() 0 -> pageOffset.toFloat()
1 -> pageOffset + textPage.height 1 -> pageOffset + textPage.height
else -> pageOffset + textPage.height + pageFactory.nextData.textPage.height else -> pageOffset + textPage.height + pageFactory.nextPage.height
} }
} }
private fun relativePage(relativePos: Int): TextPage { private fun relativePage(relativePos: Int): TextPage {
return when (relativePos) { return when (relativePos) {
0 -> textPage 0 -> textPage
1 -> pageFactory.nextData.textPage 1 -> pageFactory.nextPage
else -> pageFactory.nextPlusData.textPage else -> pageFactory.nextPlusPage
} }
} }

@ -15,7 +15,6 @@ import io.legado.app.databinding.ViewBookPageBinding
import io.legado.app.help.ReadBookConfig import io.legado.app.help.ReadBookConfig
import io.legado.app.help.ReadTipConfig import io.legado.app.help.ReadTipConfig
import io.legado.app.service.help.ReadBook import io.legado.app.service.help.ReadBook
import io.legado.app.ui.book.read.page.entities.PageData
import io.legado.app.ui.book.read.page.entities.TextPage import io.legado.app.ui.book.read.page.entities.TextPage
import io.legado.app.ui.book.read.page.provider.ChapterProvider import io.legado.app.ui.book.read.page.provider.ChapterProvider
import io.legado.app.ui.widget.BatteryView import io.legado.app.ui.widget.BatteryView
@ -211,12 +210,12 @@ class PageView(context: Context) : FrameLayout(context) {
} }
} }
fun setContent(pageData: PageData, resetPageOffset: Boolean = true) { fun setContent(textPage: TextPage, resetPageOffset: Boolean = true) {
setProgress(pageData.textPage) setProgress(textPage)
if (resetPageOffset) { if (resetPageOffset) {
resetPageOffset() resetPageOffset()
} }
binding.contentTextView.setContent(pageData) binding.contentTextView.setContent(textPage)
} }
fun setContentDescription(content: String) { fun setContentDescription(content: String) {

@ -471,18 +471,18 @@ class ReadView(context: Context, attrs: AttributeSet) :
} }
override fun upContent(relativePosition: Int, resetPageOffset: Boolean) { override fun upContent(relativePosition: Int, resetPageOffset: Boolean) {
curPage.setContentDescription(pageFactory.curData.textPage.text) curPage.setContentDescription(pageFactory.curPage.text)
if (isScroll && !callBack.isAutoPage) { if (isScroll && !callBack.isAutoPage) {
curPage.setContent(pageFactory.curData, resetPageOffset) curPage.setContent(pageFactory.curPage, resetPageOffset)
} else { } else {
curPage.resetPageOffset() curPage.resetPageOffset()
when (relativePosition) { when (relativePosition) {
-1 -> prevPage.setContent(pageFactory.prevData) -1 -> prevPage.setContent(pageFactory.prevPage)
1 -> nextPage.setContent(pageFactory.nextData) 1 -> nextPage.setContent(pageFactory.nextPage)
else -> { else -> {
curPage.setContent(pageFactory.curData) curPage.setContent(pageFactory.curPage)
nextPage.setContent(pageFactory.nextData) nextPage.setContent(pageFactory.nextPage)
prevPage.setContent(pageFactory.prevData) prevPage.setContent(pageFactory.prevPage)
} }
} }
} }

@ -10,13 +10,13 @@ abstract class PageFactory<DATA>(protected val dataSource: DataSource) {
abstract fun moveToPrev(upContent: Boolean): Boolean abstract fun moveToPrev(upContent: Boolean): Boolean
abstract val nextData: DATA abstract val nextPage: DATA
abstract val prevData: DATA abstract val prevPage: DATA
abstract val curData: DATA abstract val curPage: DATA
abstract val nextPlusData: DATA abstract val nextPlusPage: DATA
abstract fun hasNext(): Boolean abstract fun hasNext(): Boolean

@ -1,6 +0,0 @@
package io.legado.app.ui.book.read.page.entities
data class PageData(
val textPage: TextPage,
val textChapter: TextChapter? = null
)

@ -1,6 +1,5 @@
package io.legado.app.ui.book.read.page.entities package io.legado.app.ui.book.read.page.entities
import android.text.TextPaint
import kotlin.math.min import kotlin.math.min
data class TextChapter( data class TextChapter(
@ -8,9 +7,7 @@ data class TextChapter(
val title: String, val title: String,
val url: String, val url: String,
val pages: List<TextPage>, val pages: List<TextPage>,
val chaptersSize: Int, val chaptersSize: Int
var titlePaint: TextPaint? = null,
var contentPaint: TextPaint? = null
) { ) {
fun page(index: Int): TextPage? { fun page(index: Int): TextPage? {

@ -5,6 +5,7 @@ import android.text.StaticLayout
import io.legado.app.App import io.legado.app.App
import io.legado.app.R import io.legado.app.R
import io.legado.app.help.ReadBookConfig import io.legado.app.help.ReadBookConfig
import io.legado.app.service.help.ReadBook
import io.legado.app.ui.book.read.page.provider.ChapterProvider import io.legado.app.ui.book.read.page.provider.ChapterProvider
import java.text.DecimalFormat import java.text.DecimalFormat
@ -123,4 +124,22 @@ data class TextPage(
return percent return percent
} }
fun getTextChapter(): TextChapter? {
ReadBook.curTextChapter?.let {
if (it.position == chapterIndex) {
return it
}
}
ReadBook.nextTextChapter?.let {
if (it.position == chapterIndex) {
return it
}
}
ReadBook.prevTextChapter?.let {
if (it.position == chapterIndex) {
return it
}
}
return null
}
} }

@ -12,7 +12,6 @@ import io.legado.app.constant.EventBus
import io.legado.app.data.entities.Book import io.legado.app.data.entities.Book
import io.legado.app.data.entities.BookChapter import io.legado.app.data.entities.BookChapter
import io.legado.app.help.AppConfig import io.legado.app.help.AppConfig
import io.legado.app.help.BookHelp
import io.legado.app.help.ReadBookConfig import io.legado.app.help.ReadBookConfig
import io.legado.app.ui.book.read.page.entities.TextChapter import io.legado.app.ui.book.read.page.entities.TextChapter
import io.legado.app.ui.book.read.page.entities.TextChar import io.legado.app.ui.book.read.page.entities.TextChar
@ -86,11 +85,6 @@ object ChapterProvider {
val textPages = arrayListOf<TextPage>() val textPages = arrayListOf<TextPage>()
val stringBuilder = StringBuilder() val stringBuilder = StringBuilder()
var durY = 0f var durY = 0f
var paint = Pair(titlePaint, contentPaint)
BookHelp.getFontPath(book, bookChapter)?.let {
val typeface = getTypeface(it)
paint = getPaint(typeface)
}
textPages.add(TextPage()) textPages.add(TextPage())
contents.forEachIndexed { index, text -> contents.forEachIndexed { index, text ->
val matcher = AppPattern.imgPattern.matcher(text) val matcher = AppPattern.imgPattern.matcher(text)
@ -105,7 +99,7 @@ object ChapterProvider {
} }
} else { } else {
val isTitle = index == 0 val isTitle = index == 0
val textPaint = if (isTitle) paint.first else paint.second val textPaint = if (isTitle) titlePaint else contentPaint
if (!(isTitle && ReadBookConfig.titleMode == 2)) { if (!(isTitle && ReadBookConfig.titleMode == 2)) {
durY = setTypeText(text, durY, textPages, stringBuilder, isTitle, textPaint) durY = setTypeText(text, durY, textPages, stringBuilder, isTitle, textPaint)
} }
@ -125,7 +119,7 @@ object ChapterProvider {
return TextChapter( return TextChapter(
bookChapter.index, bookChapter.title, bookChapter.index, bookChapter.title,
bookChapter.getAbsoluteURL().substringBefore(","), bookChapter.getAbsoluteURL().substringBefore(","),
textPages, chapterSize, paint.first, paint.second textPages, chapterSize
) )
} }

@ -3,10 +3,9 @@ package io.legado.app.ui.book.read.page.provider
import io.legado.app.service.help.ReadBook import io.legado.app.service.help.ReadBook
import io.legado.app.ui.book.read.page.api.DataSource import io.legado.app.ui.book.read.page.api.DataSource
import io.legado.app.ui.book.read.page.api.PageFactory import io.legado.app.ui.book.read.page.api.PageFactory
import io.legado.app.ui.book.read.page.entities.PageData
import io.legado.app.ui.book.read.page.entities.TextPage import io.legado.app.ui.book.read.page.entities.TextPage
class TextPageFactory(dataSource: DataSource) : PageFactory<PageData>(dataSource) { class TextPageFactory(dataSource: DataSource) : PageFactory<TextPage>(dataSource) {
override fun hasPrev(): Boolean = with(dataSource) { override fun hasPrev(): Boolean = with(dataSource) {
return hasPrevChapter() || pageIndex > 0 return hasPrevChapter() || pageIndex > 0
@ -60,81 +59,73 @@ class TextPageFactory(dataSource: DataSource) : PageFactory<PageData>(dataSource
false false
} }
override val curData: PageData override val curPage: TextPage
get() = with(dataSource) { get() = with(dataSource) {
ReadBook.msg?.let { ReadBook.msg?.let {
return@with PageData(TextPage(text = it).format()) return@with TextPage(text = it).format()
} }
currentChapter?.let { currentChapter?.let {
val page = it.page(pageIndex) ?: TextPage(title = it.title).format() return@with it.page(pageIndex) ?: TextPage(title = it.title).format()
return@with PageData(page, it)
} }
return PageData(TextPage().format()) return TextPage().format()
} }
override val nextData: PageData override val nextPage: TextPage
get() = with(dataSource) { get() = with(dataSource) {
ReadBook.msg?.let { ReadBook.msg?.let {
return@with PageData(TextPage(text = it).format()) return@with TextPage(text = it).format()
} }
currentChapter?.let { currentChapter?.let {
if (pageIndex < it.pageSize - 1) { if (pageIndex < it.pageSize - 1) {
val page = it.page(pageIndex + 1)?.removePageAloudSpan() return@with it.page(pageIndex + 1)?.removePageAloudSpan()
?: TextPage(title = it.title).format() ?: TextPage(title = it.title).format()
return@with PageData(page, it)
} }
} }
if (!hasNextChapter()) { if (!hasNextChapter()) {
return@with PageData(TextPage(text = "")) return@with TextPage(text = "")
} }
nextChapter?.let { nextChapter?.let {
val page = it.page(0)?.removePageAloudSpan() return@with it.page(0)?.removePageAloudSpan()
?: TextPage(title = it.title).format() ?: TextPage(title = it.title).format()
return@with PageData(page, it)
} }
return PageData(TextPage().format()) return TextPage().format()
} }
override val prevData: PageData override val prevPage: TextPage
get() = with(dataSource) { get() = with(dataSource) {
ReadBook.msg?.let { ReadBook.msg?.let {
return@with PageData(TextPage(text = it).format()) return@with TextPage(text = it).format()
} }
if (pageIndex > 0) { if (pageIndex > 0) {
currentChapter?.let { currentChapter?.let {
val page = it.page(pageIndex - 1)?.removePageAloudSpan() return@with it.page(pageIndex - 1)?.removePageAloudSpan()
?: TextPage(title = it.title).format() ?: TextPage(title = it.title).format()
return@with PageData(page, it)
} }
} }
prevChapter?.let { prevChapter?.let {
val page = it.lastPage?.removePageAloudSpan() return@with it.lastPage?.removePageAloudSpan()
?: TextPage(title = it.title).format() ?: TextPage(title = it.title).format()
return@with PageData(page, it)
} }
return PageData(TextPage().format()) return TextPage().format()
} }
override val nextPlusData: PageData override val nextPlusPage: TextPage
get() = with(dataSource) { get() = with(dataSource) {
currentChapter?.let { currentChapter?.let {
if (pageIndex < it.pageSize - 2) { if (pageIndex < it.pageSize - 2) {
val page = it.page(pageIndex + 2)?.removePageAloudSpan() return@with it.page(pageIndex + 2)?.removePageAloudSpan()
?: TextPage(title = it.title).format() ?: TextPage(title = it.title).format()
return@with PageData(page, it)
} }
nextChapter?.let { nc -> nextChapter?.let { nc ->
if (pageIndex < it.pageSize - 1) { if (pageIndex < it.pageSize - 1) {
val page = nc.page(0)?.removePageAloudSpan() return@with nc.page(0)?.removePageAloudSpan()
?: TextPage(title = nc.title).format() ?: TextPage(title = nc.title).format()
return@with PageData(page, nc)
} }
val page = nc.page(1)?.removePageAloudSpan() return@with nc.page(1)?.removePageAloudSpan()
?: TextPage(title = nc.title).format() ?: TextPage(title = nc.title).format()
return@with PageData(page, nc)
} }
} }
return PageData(TextPage().format()) return TextPage().format()
} }
} }

@ -76,7 +76,7 @@ class BookmarkFragment : VMBaseFragment<ChapterListViewModel>(R.layout.fragment_
override fun onClick(bookmark: Bookmark) { override fun onClick(bookmark: Bookmark) {
val bookmarkData = Intent() val bookmarkData = Intent()
bookmarkData.putExtra("index", bookmark.chapterIndex) bookmarkData.putExtra("index", bookmark.chapterIndex)
bookmarkData.putExtra("pageIndex", bookmark.pageIndex) bookmarkData.putExtra("chapterPos", bookmark.chapterPos)
activity?.setResult(Activity.RESULT_OK, bookmarkData) activity?.setResult(Activity.RESULT_OK, bookmarkData)
activity?.finish() activity?.finish()
} }

@ -44,11 +44,6 @@
</group> </group>
<item
android:id="@+id/menu_add_bookmark"
android:title="@string/bookmark_add"
app:showAsAction="never" />
<group android:id="@+id/menu_group_login"> <group android:id="@+id/menu_group_login">
<item <item
android:id="@+id/menu_login" android:id="@+id/menu_login"

@ -9,6 +9,10 @@
android:id="@+id/menu_copy" android:id="@+id/menu_copy"
android:title="@android:string/copy" /> android:title="@android:string/copy" />
<item
android:id="@+id/menu_bookmark"
android:title="@string/bookmark" />
<item <item
android:id="@+id/menu_aloud" android:id="@+id/menu_aloud"
android:title="@string/read_aloud" /> android:title="@string/read_aloud" />

Loading…
Cancel
Save