|
|
@ -1,11 +1,18 @@ |
|
|
|
package io.legado.app.ui.changecover |
|
|
|
package io.legado.app.ui.changecover |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import android.os.Bundle |
|
|
|
import android.util.DisplayMetrics |
|
|
|
import android.util.DisplayMetrics |
|
|
|
|
|
|
|
import android.view.LayoutInflater |
|
|
|
|
|
|
|
import android.view.View |
|
|
|
|
|
|
|
import android.view.ViewGroup |
|
|
|
import androidx.fragment.app.DialogFragment |
|
|
|
import androidx.fragment.app.DialogFragment |
|
|
|
|
|
|
|
import io.legado.app.R |
|
|
|
|
|
|
|
import io.legado.app.utils.getViewModel |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ChangeCoverDialog : DialogFragment() { |
|
|
|
class ChangeCoverDialog : DialogFragment() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private lateinit var viewModel: ChangeCoverViewModel |
|
|
|
|
|
|
|
|
|
|
|
override fun onStart() { |
|
|
|
override fun onStart() { |
|
|
|
super.onStart() |
|
|
|
super.onStart() |
|
|
@ -14,5 +21,14 @@ class ChangeCoverDialog : DialogFragment() { |
|
|
|
dialog?.window?.setLayout((dm.widthPixels * 0.9).toInt(), (dm.heightPixels * 0.9).toInt()) |
|
|
|
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) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |