Code example for ClipDrawable

0
      Log.e(LTAG, "Could not load resource for bar drawable.");
      return; 
    } 
 
    mBarDrawable = new ClipDrawable(draw,
        Gravity.FILL_HORIZONTAL | Gravity.BOTTOM, ClipDrawable.VERTICAL);
  } 
 
 
 
  private void initWithAttrs(AttributeSet attrs)
  { 
    Context ctx = mContext.get();
    if (null == ctx) {
      return; 
    } 
 
    TypedArray a = ctx.obtainStyledAttributes(attrs, R.styleable.SpectralView);
 
    // Read number of bars, defaulting to DEFAULT_NUMBER_OF_BARS 
    mNumberOfBars = a.getInt(R.styleable.SpectralView_numberOfBars,