FreeRadioGroup类似于苹果的虚拟辅助按钮
类似于苹果的虚拟辅助按钮,可以淡出、拖动、松手后自动贴边等
Android 按钮控件Button
共53Star
详细介绍
demo演示:
Description
-
This is a moveable RadioGroup could fade out, and auto return to its parent's left or right, it has no side effect to RadioGroup's setOnCheckedChangeListener method .
-
Though it's a RadioGroup , the ideas used here make it very easy for you to custom your own View or ViewGroup which reacts in the similar way.
Usage
- In your root build.gradle add:
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
- Add the dependency
compile 'com.github.Sbingo:FreeRadioGroup:v1.0.0'
- In the xml layout file:
<sbingo.freeradiogroup.FreeRadioGroup
android:id="@+id/group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:background="@drawable/black_bg"
app:autoBack="true" //松手后是否自动回到父布局左侧或右侧
app:millisInFuture="2500" //从松手到淡出的时间
app:toAlpha="0.3" //淡出后的透明度值
app:moveable="true"> //是否能拖动
<RadioButton
.....
/>
.
.
.
<RadioButton
.....
/>
</sbingo.freeradiogroup.FreeRadioGroup>
If you feel it's useful, just give me a star, thank you~
公众号
-
17 Star
-
125 Star
-
0 Star
-
295 Star
-
119 Star
-
4 Star
-
6 Star