原創(chuàng)版權(quán)所有,轉(zhuǎn)載請(qǐng)注明出處 ,http://m.itdecent.cn/p/dfe411baa0ed
WedgesView
可自動(dòng)轉(zhuǎn)動(dòng)的 楔子loading效果,支持自由配置。
地址: https://github.com/fairytale110/WedgesView
預(yù)覽

preview
Gif 效果略卡,實(shí)機(jī)運(yùn)行很流暢的。。。
功能
已支持:
可自由配置每個(gè)楔子的顏色和透明度
自由開(kāi)始或結(jié)束旋轉(zhuǎn)動(dòng)畫(huà),防止內(nèi)存泄露
可自由調(diào)節(jié)楔子旋轉(zhuǎn)速度
支持padding設(shè)置
開(kāi)發(fā)中功能:
手動(dòng)旋轉(zhuǎn)
支持下拉刷新頭視圖
更多擴(kuò)展
怎么使用?
<tech.nicesky.libwedgesview.WedgesView
android:id="@+id/wedgesView"
android:layout_width="222dp"
android:layout_height="222dp"
app:wv_background="@android:color/white"
app:wv_rotate_speed="0.5"
app:wv_wedge_alpha="0.8"
app:wv_wedge_diameter="@dimen/dp_222"
android:padding="@dimen/dp_20"
/>
or
int[] colors = new int[4];
colors[0] = Color.parseColor("#C2DFD7");
colors[1] = Color.parseColor("#FFE6F5");
colors[2] = Color.parseColor("#FE718D");
colors[3] = Color.parseColor("#E90C59");
WedgesView wedgesView = new WedgesView(this);
wedgesView.setBackgroundColor(Color.WHITE);//Set View's background color
wedgesView.setColors(colors);//set wedges's color
wedgesView.setRotateSpeed(0.5F);//設(shè)置最快的轉(zhuǎn)速 01F 到 1.0F
wedgesView.setWedgeAlpha(0.8F);//設(shè)置楔子的透明度 0.1F到1.0F
//設(shè)置楔子的直徑
wedgesView.setWedgeDiameter((int) getResources().getDimension(R.dimen.dp_200));
wedgesView.reStart();//開(kāi)始動(dòng)畫(huà)
//wedgesView.stop();// 停止動(dòng)畫(huà)