Skip to content

Commit efb9463

Browse files
authoredNov 1, 2016
Merge pull request TouchType#17 from TouchType/CoachmarkType
Added the CoachmarkType enums
2 parents a20f9bb + 054cf9c commit efb9463

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
 

‎cornedbeef/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ android {
1313
minSdkVersion 9
1414
targetSdkVersion 22
1515
versionCode 2
16-
versionName "1.2.1"
16+
versionName "1.2.2"
1717
}
1818
buildTypes {
1919
release {

‎cornedbeef/src/main/java/com/swiftkey/cornedbeef/CoachMark.java

+13
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import android.graphics.Point;
66
import android.graphics.Rect;
77
import android.graphics.drawable.ColorDrawable;
8+
import android.support.annotation.IntDef;
89
import android.support.annotation.LayoutRes;
910
import android.support.annotation.StyleRes;
1011
import android.util.TypedValue;
@@ -17,6 +18,9 @@
1718
import android.widget.PopupWindow;
1819
import android.widget.TextView;
1920

21+
import java.lang.annotation.Retention;
22+
import java.lang.annotation.RetentionPolicy;
23+
2024
/**
2125
* A CoachMark is a temporary popup that can be positioned above a {@link View}
2226
* to notify the user about a new feature, proposition or other information.
@@ -32,6 +36,15 @@
3236
*/
3337
public abstract class CoachMark {
3438

39+
@IntDef({COACHMARK_PUNCHHOLE, COACHMARK_LAYERED, COACHMARK_HIGHLIGHT, COACHMARK_BUBBLE})
40+
@Retention(RetentionPolicy.SOURCE)
41+
public @interface CoachmarkType {}
42+
43+
public static final int COACHMARK_PUNCHHOLE = 0;
44+
public static final int COACHMARK_LAYERED = 1;
45+
public static final int COACHMARK_HIGHLIGHT = 2;
46+
public static final int COACHMARK_BUBBLE = 3;
47+
3548
public static final int NO_ANIMATION = 0;
3649

3750
/**

0 commit comments

Comments
 (0)
Please sign in to comment.