LikeView(Just like Twitter)
1.Add naturalloadingview in your xml layout:
<com.jaren.lib.view.LikeView
android:id="@+id/lv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:cirRadius="10dp"
app:cycleTime="2000"
app:defaultColor="#ff657487" />
2.Add OnClickListener in your Java file:
lv = (LikeView) findViewById(R.id.lv);
lv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.i("LikeView", "onClick"+lv.getState());
}
});
You can customize the look and behavior of the LikeView
in xml. Use the following attributes in xml.
defaultColor
cirRadius
cycleTime