From 6ed918f9ada2cc827cabae19d260a4896dade27c Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 29 Dec 2020 21:14:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/read/config/SpeakEngineDialog.kt | 2 ++ app/src/main/res/layout/dialog_recycler_view.xml | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt index ab5219b82..fb58e12a0 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt @@ -9,6 +9,7 @@ import android.view.View import android.view.ViewGroup import androidx.appcompat.widget.Toolbar import androidx.lifecycle.LiveData +import androidx.recyclerview.widget.LinearLayoutManager import io.legado.app.App import io.legado.app.R import io.legado.app.base.BaseDialogFragment @@ -59,6 +60,7 @@ class SpeakEngineDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener toolBar.setBackgroundColor(primaryColor) toolBar.setTitle(R.string.speak_engine) adapter = Adapter(requireContext()) + recyclerView.layoutManager = LinearLayoutManager(requireContext()) recyclerView.adapter = adapter tvFooterLeft.setText(R.string.local_tts) tvFooterLeft.visible() diff --git a/app/src/main/res/layout/dialog_recycler_view.xml b/app/src/main/res/layout/dialog_recycler_view.xml index 29d018cea..34ba05c5f 100644 --- a/app/src/main/res/layout/dialog_recycler_view.xml +++ b/app/src/main/res/layout/dialog_recycler_view.xml @@ -22,8 +22,7 @@ + android:layout_height="match_parent" />