If you think the Android project Calma listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.espian.showcaseview;
//fromwww.java2s.comimport android.app.Activity;
import android.view.View;
publicclass ShowcaseViewBuilder {
privatefinal ShowcaseView showcaseView;
public ShowcaseViewBuilder(Activity activity) {
this.showcaseView = new ShowcaseView(activity);
}
public ShowcaseViewBuilder(ShowcaseView showcaseView) {
this.showcaseView = showcaseView;
}
public ShowcaseViewBuilder(Activity activity, int showcaseLayoutViewId) {
this.showcaseView = (ShowcaseView) activity.getLayoutInflater().inflate(showcaseLayoutViewId, null);
}
public ShowcaseViewBuilder setShowcaseNoView() {
showcaseView.setShowcaseNoView();
returnthis;
}
public ShowcaseViewBuilder setShowcaseView(View view) {
showcaseView.setShowcaseView(view);
returnthis;
}
public ShowcaseViewBuilder setShowcasePosition(int x, int y) {
showcaseView.setShowcasePosition(x, y);
returnthis;
}
public ShowcaseViewBuilder setShowcaseItem(int itemType, int actionItemId, Activity activity) {
showcaseView.setShowcaseItem(itemType, actionItemId, activity);
returnthis;
}
public ShowcaseViewBuilder setShowcaseIndicatorScale(float scale) {
showcaseView.setShowcaseIndicatorScale(scale);
returnthis;
}
public ShowcaseViewBuilder overrideButtonClick(View.OnClickListener listener) {
showcaseView.overrideButtonClick(listener);
returnthis;
}
public ShowcaseViewBuilder animateGesture(float offsetStartX, float offsetStartY, float offsetEndX, float offsetEndY) {
showcaseView.animateGesture(offsetStartX, offsetStartY, offsetEndX, offsetEndY);
returnthis;
}
// public ShowcaseViewBuilder setTextColors(int titleTextColor, int detailTextColor) {
// showcaseView.setTextColors(titleTextColor, detailTextColor);
// return this;
// }
public ShowcaseViewBuilder setText(String titleText, String subText) {
showcaseView.setText(titleText, subText);
returnthis;
}
public ShowcaseViewBuilder setText(int titleText, int subText) {
showcaseView.setText(titleText, subText);
returnthis;
}
public ShowcaseViewBuilder pointTo(View view) {
showcaseView.pointTo(view);
returnthis;
}
public ShowcaseViewBuilder pointTo(float x, float y) {
showcaseView.pointTo(x, y);
returnthis;
}
public ShowcaseViewBuilder setConfigOptions(ShowcaseView.ConfigOptions configOptions) {
showcaseView.setConfigOptions(configOptions);
returnthis;
}
public ShowcaseView build(){
return showcaseView;
}
}