|
|
@ -25,8 +25,6 @@ import io.legado.app.databinding.PopupActionMenuBinding |
|
|
|
import io.legado.app.service.BaseReadAloudService |
|
|
|
import io.legado.app.service.BaseReadAloudService |
|
|
|
import io.legado.app.utils.* |
|
|
|
import io.legado.app.utils.* |
|
|
|
|
|
|
|
|
|
|
|
import java.util.* |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressLint("RestrictedApi") |
|
|
|
@SuppressLint("RestrictedApi") |
|
|
|
class TextActionMenu(private val context: Context, private val callBack: CallBack) : |
|
|
|
class TextActionMenu(private val context: Context, private val callBack: CallBack) : |
|
|
|
PopupWindow(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT), |
|
|
|
PopupWindow(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT), |
|
|
@ -248,7 +246,6 @@ class TextActionMenu(private val context: Context, private val callBack: CallBac |
|
|
|
@Synchronized |
|
|
|
@Synchronized |
|
|
|
override fun onInit(status: Int) { |
|
|
|
override fun onInit(status: Int) { |
|
|
|
if (status == TextToSpeech.SUCCESS) { |
|
|
|
if (status == TextToSpeech.SUCCESS) { |
|
|
|
textToSpeech?.language = Locale.CHINA |
|
|
|
|
|
|
|
ttsInitFinish = true |
|
|
|
ttsInitFinish = true |
|
|
|
readAloud(lastText) |
|
|
|
readAloud(lastText) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|