Skip to content

Commit

Permalink
update SDK to 34 (Android 14)
Browse files Browse the repository at this point in the history
  • Loading branch information
smdyv authored and thestinger committed Aug 25, 2023
1 parent ed13fec commit 0e07eca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ android {
}
}

compileSdk = 33
compileSdk = 34
buildToolsVersion = "34.0.0"

namespace = "app.grapheneos.camera"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1341,21 +1341,25 @@ open class MainActivity : AppCompatActivity(),
return false
}

override fun onScroll(p0: MotionEvent, p1: MotionEvent, p2: Float, p3: Float): Boolean {
override fun onScroll(p0: MotionEvent?, p1: MotionEvent, p2: Float, p3: Float): Boolean {
return false
}

override fun onLongPress(p0: MotionEvent) {}

override fun onFling(
e1: MotionEvent, e2: MotionEvent,
velocityX: Float, velocityY: Float
p0: MotionEvent?,
e1: MotionEvent,
velocityX: Float,
velocityY: Float
): Boolean {

var result = false
try {
val diffY = e2.y - e1.y
val diffX = e2.x - e1.x
p0 ?: return false

val diffY = e1.y - p0.y
val diffX = e1.x - p0.x

if (abs(diffX) > abs(diffY)) {
if (abs(diffX) > SWIPE_THRESHOLD && abs(velocityX) > SWIPE_VELOCITY_THRESHOLD) {
Expand Down

0 comments on commit 0e07eca

Please sign in to comment.