多版本下载面板优化(20200507测试1)https://gitlab.ghzs.com/pm/halo-app-issues/-/issues/819
This commit is contained in:
@ -284,7 +284,6 @@ class DownloadDialog : BaseDialogFragment(), View.OnTouchListener {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
val width = HaloApp.getInstance().application.resources.displayMetrics.widthPixels
|
||||
@ -292,6 +291,15 @@ class DownloadDialog : BaseDialogFragment(), View.OnTouchListener {
|
||||
dialog?.window?.setLayout(width, height)
|
||||
}
|
||||
|
||||
override fun onBack(): Boolean {
|
||||
if (mCollectionAdapter != null && mAdapter != null) {
|
||||
postBrowseMta()
|
||||
mViewModel.collectionLiveData.postValue(null)
|
||||
return true
|
||||
}
|
||||
return super.onBack()
|
||||
}
|
||||
|
||||
// dialog drag animation
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
override fun onTouch(v: View, event: MotionEvent): Boolean {
|
||||
@ -398,7 +406,6 @@ class DownloadDialog : BaseDialogFragment(), View.OnTouchListener {
|
||||
downloadDialog.show(fragmentActivity.supportFragmentManager, DownloadDialog::class.java.name)
|
||||
}
|
||||
|
||||
|
||||
private fun hasDownloadDialogInCurrentActivity(fragmentActivity: FragmentActivity): Boolean {
|
||||
val fragments: List<Fragment> = fragmentActivity.supportFragmentManager.fragments
|
||||
fragments.forEach { fragment ->
|
||||
|
||||
Reference in New Issue
Block a user