Skip to content

Commit 337351f

Browse files
committed
Add code snippets for haptics in Android docs
Provides a more robust and maintainable set of source code, compared to the manually-created snippets currently published on https://developer.android.com/develop/ui/views/haptics/custom-haptic-effects Also remove leftover test file
1 parent d14dd06 commit 337351f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

misc/src/main/java/com/example/snippets/ui/haptics/CustomVibrationCompositions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class CustomVibrationPatternsJava : Activity() {
3535
val timings = longArrayOf(50, 50, 100, 50, 50)
3636
val amplitudes = intArrayOf(64, 128, 255, 128, 64)
3737
val repeat = 1 // Repeat from the second entry, index = 1.
38-
VibrationEffect repeatingEffect = VibrationEffect.createWaveform(
38+
val repeatingEffect = VibrationEffect.createWaveform(
3939
timings, amplitudes, repeat)
4040
// repeatingEffect can be used in multiple places.
4141

0 commit comments

Comments
 (0)