Skip to content

Commit

Permalink
Improve horizontal swipe between tabs UX
Browse files Browse the repository at this point in the history
  • Loading branch information
Iliyan Germanov committed Nov 15, 2021
1 parent cb7ef2d commit b004169
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/main/java/com/ivy/wallet/ui/accounts/AccountsTab.kt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ private fun BoxWithConstraintsScope.UI(
sensitivity = 250,
onSwipeLeft = {
ivyContext.selectMainTab(MainTab.HOME)
},
onSwipeRight = {
ivyContext.selectMainTab(MainTab.HOME)
}
),
) {
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/com/ivy/wallet/ui/home/HomeTab.kt
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ private fun BoxWithConstraintsScope.UI(
)
.horizontalSwipeListener(
sensitivity = 250,
onSwipeLeft = {
ivyContext.selectMainTab(MainTab.ACCOUNTS)
},
onSwipeRight = {
ivyContext.selectMainTab(MainTab.ACCOUNTS)
}
Expand Down

0 comments on commit b004169

Please sign in to comment.