pull/53/head
kunfei 5 years ago
parent a7793f1a34
commit e6776a4c2a
  1. 16
      app/src/main/java/io/legado/app/ui/changecover/ChangeCoverDialog.kt

@ -1,11 +1,18 @@
package io.legado.app.ui.changecover
import android.os.Bundle
import android.util.DisplayMetrics
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.DialogFragment
import io.legado.app.R
import io.legado.app.utils.getViewModel
class ChangeCoverDialog : DialogFragment() {
private lateinit var viewModel: ChangeCoverViewModel
override fun onStart() {
super.onStart()
@ -14,5 +21,14 @@ class ChangeCoverDialog : DialogFragment() {
dialog?.window?.setLayout((dm.widthPixels * 0.9).toInt(), (dm.heightPixels * 0.9).toInt())
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
viewModel = getViewModel(ChangeCoverViewModel::class.java)
return inflater.inflate(R.layout.dialog_change_source, container)
}
}
Loading…
Cancel
Save