|
|
@ -9,6 +9,7 @@ import android.view.View |
|
|
|
import android.view.ViewGroup |
|
|
|
import android.view.ViewGroup |
|
|
|
import androidx.appcompat.widget.Toolbar |
|
|
|
import androidx.appcompat.widget.Toolbar |
|
|
|
import androidx.fragment.app.FragmentManager |
|
|
|
import androidx.fragment.app.FragmentManager |
|
|
|
|
|
|
|
import androidx.fragment.app.viewModels |
|
|
|
import androidx.recyclerview.widget.ItemTouchHelper |
|
|
|
import androidx.recyclerview.widget.ItemTouchHelper |
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager |
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager |
|
|
|
import androidx.recyclerview.widget.RecyclerView |
|
|
|
import androidx.recyclerview.widget.RecyclerView |
|
|
@ -29,7 +30,7 @@ import io.legado.app.ui.widget.recycler.ItemTouchCallback |
|
|
|
import io.legado.app.ui.widget.recycler.VerticalDivider |
|
|
|
import io.legado.app.ui.widget.recycler.VerticalDivider |
|
|
|
import io.legado.app.utils.applyTint |
|
|
|
import io.legado.app.utils.applyTint |
|
|
|
import io.legado.app.utils.getSize |
|
|
|
import io.legado.app.utils.getSize |
|
|
|
import io.legado.app.utils.getViewModel |
|
|
|
|
|
|
|
import io.legado.app.utils.requestInputMethod |
|
|
|
import io.legado.app.utils.requestInputMethod |
|
|
|
import io.legado.app.utils.viewbindingdelegate.viewBinding |
|
|
|
import io.legado.app.utils.viewbindingdelegate.viewBinding |
|
|
|
|
|
|
|
|
|
|
@ -52,7 +53,7 @@ class GroupSelectDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener |
|
|
|
|
|
|
|
|
|
|
|
private val binding by viewBinding(DialogBookGroupPickerBinding::bind) |
|
|
|
private val binding by viewBinding(DialogBookGroupPickerBinding::bind) |
|
|
|
private var requestCode: Int = -1 |
|
|
|
private var requestCode: Int = -1 |
|
|
|
private lateinit var viewModel: GroupViewModel |
|
|
|
private val viewModel: GroupViewModel by viewModels() |
|
|
|
private lateinit var adapter: GroupAdapter |
|
|
|
private lateinit var adapter: GroupAdapter |
|
|
|
private var callBack: CallBack? = null |
|
|
|
private var callBack: CallBack? = null |
|
|
|
private var groupId: Long = 0 |
|
|
|
private var groupId: Long = 0 |
|
|
@ -68,7 +69,6 @@ class GroupSelectDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener |
|
|
|
container: ViewGroup?, |
|
|
|
container: ViewGroup?, |
|
|
|
savedInstanceState: Bundle? |
|
|
|
savedInstanceState: Bundle? |
|
|
|
): View? { |
|
|
|
): View? { |
|
|
|
viewModel = getViewModel(GroupViewModel::class.java) |
|
|
|
|
|
|
|
return inflater.inflate(R.layout.dialog_book_group_picker, container) |
|
|
|
return inflater.inflate(R.layout.dialog_book_group_picker, container) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|