Skip to content

Commit

Permalink
Merge pull request #124 from Hamza417/ui_migration
Browse files Browse the repository at this point in the history
Update panel switcher dialog
  • Loading branch information
Hamza417 committed May 7, 2024
2 parents 6a4149c + 7ec9239 commit aeb88ac
Showing 1 changed file with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ import app.simple.positional.R
import app.simple.positional.adapters.bottombar.BottomBarAdapter
import app.simple.positional.adapters.bottombar.BottomBarItems
import app.simple.positional.callbacks.BottomSheetSlide
import app.simple.positional.callbacks.PanelsCallback
import app.simple.positional.callbacks.PermissionCallbacks
import app.simple.positional.decorations.corners.DynamicCornerLinearLayout
import app.simple.positional.decorations.popup.PopupLinearLayout
import app.simple.positional.decorations.ripple.DynamicRippleTextView
import app.simple.positional.decorations.transformers.DepthTransformer
import app.simple.positional.dialogs.app.Panels.Companion.showPanelsDialog
import app.simple.positional.extensions.activity.BaseActivity
import app.simple.positional.popups.miscellaneous.PopupFragments
import app.simple.positional.preferences.BottomBarPreferences
import app.simple.positional.preferences.FragmentPreferences
import app.simple.positional.preferences.MainPreferences
Expand Down Expand Up @@ -75,26 +76,25 @@ class MainActivity : BaseActivity(),
label = findViewById(R.id.label)

bottomBarAdapter = BottomBarAdapter(BottomBarItems.getBottomBarItems(baseContext)) {
PopupFragments(bottomBarContainer) { _, tag, position ->
bottomBar.setCurrentItem(position, true)
openFragment(tag)
FragmentPreferences.setCurrentPage(position)
FragmentPreferences.setCurrentTag(tag)
}.setOnDismissListener {
bottomBarContainer.animate()
.alpha(1f)
.setInterpolator(DecelerateInterpolator())
.setDuration(500)
.start()
}

// // They didn't like it :(
// supportFragmentManager.showPanelsDialog(PanelsCallback { _, string, position ->
// PopupFragments(bottomBarContainer) { _, tag, position ->
// bottomBar.setCurrentItem(position, true)
// openFragment(string!!)
// openFragment(tag)
// FragmentPreferences.setCurrentPage(position)
// FragmentPreferences.setCurrentTag(string)
// })
// FragmentPreferences.setCurrentTag(tag)
// }.setOnDismissListener {
// bottomBarContainer.animate()
// .alpha(1f)
// .setInterpolator(DecelerateInterpolator())
// .setDuration(500)
// .start()
// }

supportFragmentManager.showPanelsDialog(PanelsCallback { _, string, position ->
bottomBar.setCurrentItem(position, true)
openFragment(string!!)
FragmentPreferences.setCurrentPage(position)
FragmentPreferences.setCurrentTag(string)
})
}

label.setOnClickListener {
Expand Down

0 comments on commit aeb88ac

Please sign in to comment.