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.
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.
确定最低高度似乎没有任何变化。 将管道改成9个编织机,使til升(它变成覆盖整个地区的1纳克,而不是横向利用)。 最后,我需要横向利用和纵向推广。
没有人对我有想法?
EDIT:
我在“进步的巴斯”看到,他们总结了你们所有的蓝图,如:
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;
在其他言辞中,你们的比照图不得不与Clamp混为一谈,而不是尊重你原来的手脚。 我相信,这是我不知道的。 我可以想到的唯一想法是写一下我自己掌握的进展。