-
Notifications
You must be signed in to change notification settings - Fork 275
2. Customized Usage
Faruk Toptaş edited this page Jun 14, 2019
·
3 revisions
new FancyShowCaseView.Builder(this)
.focusOn(view)
.title("Change title font size")
.titleSize(14, TypedValue.COMPLEX_UNIT_SP)
.build()
.show();
new FancyShowCaseView.Builder(this)
.focusOn(view)
.title("Change title style and position")
.titleStyle(R.style.MyTitleStyle, Gravity.TOP | Gravity.CENTER)
.build()
.show();
<style name="MyTitleStyle" parent="@android:style/Widget.TextView">
<item name="android:textSize">20sp</item>
<item name="android:paddingTop">50dp</item>
<item name="android:layout_marginTop">50dp</item>
<item name="android:textColor">#00ff00</item>
<item name="android:fontFamily">sans-serif-condensed</item>
</style>
new FancyShowCaseView.Builder(this)
.focusOn(view)
.title(spannedString)
.build()
.show();
new FancyShowCaseView.Builder(this)
.focusOn(view)
.title("Add border to focus shape")
.focusBorderColor(Color.GREEN)
.focusBorderSize(10)
.build()
.show();
new FancyShowCaseView.Builder(this)
.focusOn(view)
.focusCircleRadiusFactor(1.5)
.title("Focus on a View with larger circle")
.build()
.show();
new FancyShowCaseView.Builder(this)
.focusOn(view)
.title("Change background color")
.backgroundColor(Color.parseColor("#AAff0000"))
.build()
.show();
new FancyShowCaseView.Builder(this)
.focusOn(view)
.title("Focus on View")
.dismissListener(new DismissListener() {
@Override
public void onDismiss(String id) {
// FancyShowCaseView is dismissed by user
}
@Override
public void onSkipped(String id) {
// Skipped because it was setup to shown only once and shown before
}
})
.build()
.show();
new FancyShowCaseView.Builder(this)
.title("Focus on larger view")
.focusRectAtPosition(260, 85, 480, 80)
.roundRectRadius(60)
.build()
.show();
new FancyShowCaseView.Builder(this)
.title("Focus on larger view")
.focusCircleAtPosition(400, 400, 100)
.build()
.show();
new FancyShowCaseView.Builder(this)
.focusOn(view)
.title("Focus on View")
.focusAnimationMaxValue(40) // Default max value is 20
.focusAnimationStep(3) // Default step value is 1
.build()
.show();
new FancyShowCaseView.Builder(this)
.focusOn(view)
.title("Focus on View")
.disableFocusAnimation()
.build()
.show();
new FancyShowCaseView.Builder(this)
.focusOn(view)
.title("Focus on View")
.showOnce("A_UNIQUE_ID")
.build()
.show();