@@ -36,7 +36,6 @@ import info.papdt.express.helper.support.SettingsInstance
3636import info.papdt.express.helper.ui.adapter.HomeToolbarSpinnerAdapter
3737import info.papdt.express.helper.ui.adapter.HomePackageListAdapter
3838import info.papdt.express.helper.ui.common.AbsActivity
39- import io.alterac.blurkit.FixedBlurLayout
4039import moe.feng.common.stepperview.VerticalStepperItemView
4140import moe.feng.kotlinyan.common.*
4241
@@ -99,20 +98,9 @@ class HomeActivity : AbsActivity(), OnRefreshListener {
9998 private val scanButton by lazy<View > { findViewById(R .id.scan_button) }
10099 private val moreButton by lazy<View > { findViewById(R .id.more_button) }
101100 private val bottomSheet by lazy<View > { findViewById(R .id.bottom_sheet_add_package) }
102- private val bottomSheetBackgroundBlur by lazy<FixedBlurLayout > {
103- findViewById(R .id.bottom_sheet_background_blur )
101+ private val bottomSheetBackground by lazy<View > {
102+ findViewById(R .id.bottom_sheet_background )
104103 }
105- private val bottomSheetBackgroundNormal by lazy<View > {
106- findViewById(R .id.bottom_sheet_background_normal)
107- }
108- private val bottomSheetBackground: View
109- get() {
110- return if (SettingsInstance .enableAddDialogBackgroundBlur) {
111- bottomSheetBackgroundBlur
112- } else {
113- bottomSheetBackgroundNormal
114- }
115- }
116104
117105 private val moreMenu: PopupMenu by lazy {
118106 PopupMenu (this , moreButton).also {
@@ -207,16 +195,6 @@ class HomeActivity : AbsActivity(), OnRefreshListener {
207195 tempFilterCategory = if (it.title.isEmpty()) null else it.title
208196 updateSearchDialogViewsValue()
209197 }, action = ChooseCategoryDialog .ACTION_CHOOSE_CATEGORY )
210- if (SettingsInstance .enableAddDialogBackgroundBlur) {
211- bottomSheetBackgroundBlur.startBlur()
212- }
213- }
214-
215- override fun onStop () {
216- super .onStop()
217- if (SettingsInstance .enableAddDialogBackgroundBlur) {
218- bottomSheetBackgroundBlur.pauseBlur()
219- }
220198 }
221199
222200 private fun showBottomSheetBackground () {
@@ -552,14 +530,8 @@ class HomeActivity : AbsActivity(), OnRefreshListener {
552530 override fun onSlide (v : View , slideOffset : Float ) {
553531 val progress = if (slideOffset.isNaN())
554532 1f else 1f + Math .max(slideOffset, - 1f )
555- if (SettingsInstance .enableAddDialogBackgroundBlur) {
556- bottomSheetBackgroundBlur.post {
557- bottomSheetBackgroundBlur.alpha = progress
558- }
559- } else {
560- bottomSheetBackgroundNormal.post {
561- bottomSheetBackgroundNormal.alpha = progress * 0.35f
562- }
533+ bottomSheetBackground.post {
534+ bottomSheetBackground.alpha = progress * 0.35f
563535 }
564536 bottomSheetBackground.postInvalidate()
565537 }
@@ -603,10 +575,6 @@ class HomeActivity : AbsActivity(), OnRefreshListener {
603575 val layoutManager = recyclerView.layoutManager!! as LinearLayoutManager
604576 val shouldLift = layoutManager.findFirstCompletelyVisibleItemPosition() != 0
605577
606- if (SettingsInstance .enableAddDialogBackgroundBlur) {
607- bottomSheetBackgroundBlur.postInvalidate()
608- }
609-
610578 if (animatorDirection != shouldLift) {
611579 if (elevationAnimator?.isRunning == true ) {
612580 elevationAnimator?.cancel()
0 commit comments