A button they you can slide to open or close something
you can define a slideswitch in xml like the following example
{% highlight java %}
<com.leaking.slideswitch.SlideSwitch android:id="@+id/swit" android:layout_height="wrap_content" android:layout_width="wrap_content" slideswitch:isOpen="true" slideswitch:baseColor="#ffff510e" slideswitch:moveColor="#ffffff" slideswitch:slideHeight="30dip" slideswitch:slideWidth="80dip" slideswitch:stillColor="#ffa3a3a3" > </com.leaking.slideswitch.SlideSwitch>
{% endhighlight %}
you can init the state(open or close) in jave code in this way
{% highlight java %}
bulletSwitch.setState(true);
{% endhighlight %}
fragment的设计原理