Skip to content

Commit

Permalink
Merge pull request #625 from ezechuka/fix-issue-92
Browse files Browse the repository at this point in the history
Fixed Issue #92: "Open/Close Edit Transaction amount sheet with swipe"
  • Loading branch information
ILIYANGERMANOV committed Mar 23, 2022
2 parents ea0c703 + e94ba29 commit 5b89814
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/src/main/java/com/ivy/wallet/Constants.kt
Expand Up @@ -31,4 +31,6 @@ object Constants {
const val USER_INACTIVITY_TIME_LIMIT = 60 //Time in seconds

const val SWIPE_DOWN_THRESHOLD_OPEN_MORE_MENU = 200

const val SWIPE_UP_EXPANDED_THRESHOLD = 200
}
10 changes: 10 additions & 0 deletions app/src/main/java/com/ivy/wallet/ui/edit/core/EditBottomSheet.kt
Expand Up @@ -31,6 +31,7 @@ import com.google.accompanist.insets.statusBarsPadding
import com.ivy.design.api.ivyContext
import com.ivy.design.l0_system.UI
import com.ivy.design.l0_system.style
import com.ivy.wallet.Constants
import com.ivy.wallet.R
import com.ivy.wallet.base.*
import com.ivy.wallet.model.TransactionType
Expand Down Expand Up @@ -112,6 +113,15 @@ fun BoxWithConstraintsScope.EditBottomSheet(
shadowRadius = 24.dp
)
.background(UI.colors.pure, UI.shapes.r2Top)
.verticalSwipeListener(
sensitivity = Constants.SWIPE_UP_EXPANDED_THRESHOLD,
onSwipeUp = {
internalExpanded = true
},
onSwipeDown = {
internalExpanded = false
}
)
.consumeClicks()
) {
//Accounts label
Expand Down

0 comments on commit 5b89814

Please sign in to comment.