Note that there are some explanatory texts on larger screens.

plurals
  1. POcustom indeterminate progress drawable scaling
    primarykey
    data
    text
    <p>Trying to use a custom indeterminate drawable that will use vertical scaling. It comes out looking strange, it seems as though the bottom row of pixels are the only ones scaled, so it comes out looking like this.</p> <p><img src="https://i.stack.imgur.com/67ttc.png" alt="enter image description here"></p> <p>I want it to be vertically scaled so it looks like a traditional candy-stripe indeterminate progress bar. The reason I need it to be scalable is that the area it will be covering will be weighted, so I can't have a static size.</p> <p>Setting the minimum height seems to change nothing. Changing the drawables to 9-patch screws up the tiling (it turns into one png covering the whole area instead of horizontally tiling. In the end, I need horizontal tiling, and vertical scaling. </p> <p>Anyone have an idea for me?</p> <p>EDIT:</p> <p>Reading up, I see in ProgressBar, that they wrap all your bitmaps like so:</p> <pre><code> final Bitmap tileBitmap = ((BitmapDrawable) drawable).getBitmap(); if (mSampleTile == null) { mSampleTile = tileBitmap; } final ShapeDrawable shapeDrawable = new ShapeDrawable(getDrawableShape()); final BitmapShader bitmapShader = new BitmapShader(tileBitmap, Shader.TileMode.REPEAT, Shader.TileMode.CLAMP); shapeDrawable.getPaint().setShader(bitmapShader); return (clip) ? new ClipDrawable(shapeDrawable, Gravity.LEFT, ClipDrawable.HORIZONTAL) : shapeDrawable; </code></pre> <p>In otherwords, the force your bitmap to tile with Clamp, instead of respecting your original tile setting. I am sure there is a reason for this that I don't know. The only think I can think of is to write my own progress bar class that does my own tiling.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload