Skip to content

Commit 4f0bff6

Browse files
committed
Use drag instead of fling gesture
1 parent e329d59 commit 4f0bff6

File tree

1 file changed

+2
-1
lines changed
  • MacrobenchmarkSample/macrobenchmark/src/main/java/com/example/macrobenchmark/benchmark/frames

1 file changed

+2
-1
lines changed

MacrobenchmarkSample/macrobenchmark/src/main/java/com/example/macrobenchmark/benchmark/frames/FrameTimingBenchmark.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.example.macrobenchmark.benchmark.frames
1818

1919
import android.content.Intent
20+
import android.graphics.Point
2021
import androidx.benchmark.macro.CompilationMode
2122
import androidx.benchmark.macro.FrameTimingMetric
2223
import androidx.benchmark.macro.StartupMode
@@ -100,7 +101,7 @@ class FrameTimingBenchmark {
100101
column.setGestureMargin(device.displayWidth / 5)
101102

102103
// Scroll down several times
103-
repeat(3) { column.fling(Direction.DOWN) }
104+
repeat(1) { column.drag(Point(column.visibleCenter.x, column.visibleBounds.top)) }
104105
}
105106
}
106107
}

0 commit comments

Comments
 (0)