Skip to content

Commit b5896ea

Browse files
committed
Add vibration values
1 parent b26c043 commit b5896ea

File tree

1 file changed

+43
-1
lines changed
  • dynamic-support/src/main/java/com/pranavpandey/android/dynamic/support

1 file changed

+43
-1
lines changed

dynamic-support/src/main/java/com/pranavpandey/android/dynamic/support/Dynamic.java

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2022 Pranav Pandey
2+
* Copyright 2018-2024 Pranav Pandey
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -104,6 +104,9 @@
104104
import com.pranavpandey.android.dynamic.util.DynamicSdkUtils;
105105
import com.pranavpandey.android.dynamic.util.DynamicViewUtils;
106106

107+
import java.lang.annotation.Retention;
108+
import java.lang.annotation.RetentionPolicy;
109+
107110
/**
108111
* Helper class to manipulate {@link DynamicActivity} and inflated views at runtime according
109112
* to their implemented types.
@@ -126,6 +129,45 @@
126129
*/
127130
public class Dynamic {
128131

132+
/**
133+
* Interface to hold the vibration values.
134+
*/
135+
@Retention(RetentionPolicy.SOURCE)
136+
public @interface Vibration {
137+
138+
/**
139+
* {@code true} to enable the vibration.
140+
*/
141+
boolean DEFAULT = true;
142+
143+
/**
144+
* Interface to hold the vibration intensity values.
145+
*/
146+
@Retention(RetentionPolicy.SOURCE)
147+
@interface Intensity {
148+
149+
/**
150+
* The minimum vibration intensity.
151+
*/
152+
int MIN = 10;
153+
154+
/**
155+
* The maximum vibration intensity.
156+
*/
157+
int MAX = 500;
158+
159+
/**
160+
* The vibration intensity interval.
161+
*/
162+
int INTERVAL = 5;
163+
164+
/**
165+
* The default vibration intensity.
166+
*/
167+
int DEFAULT = 25;
168+
}
169+
}
170+
129171
/**
130172
* Load the theme styles version from the shared preferences.
131173
*

0 commit comments

Comments
 (0)