Status can be changed through the Animation button-third-party Open Source-TickPlusDrawable, tickplusdrawable
The project home page for Android tickplusdrawable (TickPlusDrawable) on github is: https://github.com/flavienlaurent/tickplusdrawable
Test code:
Layout:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <View android:id="@+id/view" android:layout_gravity="center" android:padding="30dp" android:layout_width="128dp" android:layout_height="128dp" /></FrameLayout>
JAVA code:
Package com. flavienlaurent. tickplusdrawable; import android. annotation. targetApi; import android. app. activity; import android. OS. build; import android. OS. bundle; import android. view. view; public class MainActivity extends Activity {@ TargetApi (Build. VERSION_CODES.JELLY_BEAN) @ Override protected void onCreate (Bundle savedInstanceState) {super. onCreate (savedInstanceState); setContentView (R. layout. activity_main); View view = findViewById (R. id. view); // The first parameter indicates the width of the plus sign and the check mark. The second parameter indicates the background color and Check color of the circle. // The third parameter indicates the color of the default plus sign, display only one final TickPlusDrawable tickPlusDrawable = new TickPlusDrawable (10, 0xff9C27B0, 0xff2196F3); view. setBackground (tickPlusDrawable); view. setOnClickListener (new View. onClickListener () {@ Override public void onClick (View v) {tickPlusDrawable. toggle ();}});}}
Related documents:
Http://www.cnblogs.com/zzw1994/p/4999461.html