Skip to content

Repository files navigation

BitmapWaveView

在bitmap中显示进度波浪 转载请注明作者AndroidMsky和出处 http://blog.csdn.net/AndroidMsky/article/details/53520406

觉得不错给个star,谢谢父老乡亲了

这里写图片描述 可切换波澜4种状态:

这里写图片描述

##使用方法: 考入BitmapWave还是一个200行的小鬼: BitmapWave.java

两个自定义属性:

<declare-styleable name="bitmapWave">
<attr name="backbitmap" format="reference"/>
<attr name="overColor" format="color"/>
</declare-styleable>

并在布局中使用:

<com.example.liangmutian.bitmapwaveview.BitmapWave
android:id="@+id/bitmapwave2"
bitmapwave:backbitmap="@mipmap/q1"
bitmapwave:overColor="#eddf0e"
android:layout_width="100dp"
android:layout_height="250dp"
/>

支持修改的属性:

属性名称描述备注
Bitmap bitmap背景图
private int mWaveLength = 700;浪宽
private int progerss = 50;浪总高
private int mWaveHeight = 80;浪振幅高
private float waveBit = 1 / 4f;左右浪比例默认1:1
private int mWavePaintColor;浪颜色

方法支持:

mBitmapWave.setMode(1);
描述备注
0基本波浪
1重叠部分消失可以表示反向加载
2浸泡感觉
3红色覆盖波浪透明切颜色加深
改变颜色
public void setColor(int c) {
mWavePaint.setColor(c);
}
改变进度
public void setProgerss(int c) {
this.progerss = c;
}

About

在bitmap中显示进度波浪

Resources

Stars

40 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages