Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update panel switcher dialog #124

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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