Example #1
0
  public ShowcaseView(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);

    // Get the attributes for the ShowcaseView
    final TypedArray styled =
        context
            .getTheme()
            .obtainStyledAttributes(
                attrs, R.styleable.ShowcaseView, R.attr.showcaseViewStyle, R.style.ShowcaseView);
    backColor =
        styled.getInt(R.styleable.ShowcaseView_sv_backgroundColor, Color.argb(128, 80, 80, 80));
    detailTextColor = styled.getColor(R.styleable.ShowcaseView_sv_detailTextColor, Color.WHITE);
    titleTextColor =
        styled.getColor(R.styleable.ShowcaseView_sv_titleTextColor, Color.parseColor("#49C0EC"));
    buttonText = styled.getString(R.styleable.ShowcaseView_sv_buttonText);
    styled.recycle();

    metricScale = getContext().getResources().getDisplayMetrics().density;
    mEndButton = (Button) LayoutInflater.from(context).inflate(R.layout.showcase_button, null);

    ConfigOptions options = new ConfigOptions();
    options.showcaseId = getId();
    setConfigOptions(options);
  }
Example #2
0
 /**
  * Decide whether touches outside the showcased circle should be ignored or not
  *
  * @param block true to block touches, false otherwise. By default, this is true.
  * @deprecated Use the option in {@link ConfigOptions} instead.
  */
 @Deprecated
 public void blockNonShowcasedTouches(boolean block) {
   mOptions.block = block;
 }
Example #3
0
 /**
  * Set the shot method of the showcase - only once or no limit
  *
  * @param shotType either TYPE_ONE_SHOT or TYPE_NO_LIMIT
  * @deprecated Use the option in {@link ConfigOptions} instead.
  */
 @Deprecated
 public void setShotType(int shotType) {
   if (shotType == TYPE_NO_LIMIT || shotType == TYPE_ONE_SHOT) {
     mOptions.shotType = shotType;
   }
 }