优化代码

pull/783/head
gedoor 4 years ago
parent a5a6eda39a
commit 6ed918f9ad
  1. 2
      app/src/main/java/io/legado/app/ui/book/read/config/SpeakEngineDialog.kt
  2. 3
      app/src/main/res/layout/dialog_recycler_view.xml

@ -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()

@ -22,8 +22,7 @@
<io.legado.app.ui.widget.recycler.scroller.FastScrollRecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
android:layout_height="match_parent" />
</FrameLayout>

Loading…
Cancel
Save