Commit d323f1ad by gao.chao

仿IOS 开关控件

parent b8181690
...@@ -4,7 +4,7 @@ android { ...@@ -4,7 +4,7 @@ android {
compileSdkVersion 28 compileSdkVersion 28
defaultConfig { defaultConfig {
applicationId "com.mayi.demo" applicationId "com.mayi.demo"
minSdkVersion 20 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
......
...@@ -9,6 +9,19 @@ ...@@ -9,6 +9,19 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"> android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="仿IOS 开关控件"
android:textColor="@color/color_666666" />
<com.mayi.fastdevelop.view.IOSSwitchView
android:id="@+id/s"
android:layout_width="@dimen/size_36"
android:layout_height="@dimen/size_18"
android:layout_margin="@dimen/size_15" />
<Button <Button
android:id="@+id/b1" android:id="@+id/b1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
......
...@@ -4,7 +4,7 @@ android { ...@@ -4,7 +4,7 @@ android {
compileSdkVersion 28 compileSdkVersion 28
defaultConfig { defaultConfig {
minSdkVersion 20 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 3 versionCode 3
versionName "1.2" versionName "1.2"
......
...@@ -17,4 +17,16 @@ ...@@ -17,4 +17,16 @@
<attr name="label_text" format="string"/> <attr name="label_text" format="string"/>
<attr name="label_text_size" format="float"/> <attr name="label_text_size" format="float"/>
</declare-styleable> </declare-styleable>
<declare-styleable name="IOSSwitchView">
<attr name="default_stroke_color" format="color"/>
<attr name="target_stroke_color" format="color"/>
<attr name="default_circle_color" format="color"/>
<attr name="default_solid_color" format="color"/>
<attr name="target_circle_color" format="color"/>
<attr name="target_solid_color" format="color"/>
<attr name="checked" format="boolean"/>
</declare-styleable>
</resources> </resources>
\ No newline at end of file
...@@ -3,7 +3,7 @@ apply plugin: 'com.android.library' ...@@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
android { android {
compileSdkVersion 28 compileSdkVersion 28
defaultConfig { defaultConfig {
minSdkVersion 20 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 1 versionCode 1
versionName "1.0" versionName "1.0"
......
...@@ -3,7 +3,7 @@ apply plugin: 'com.android.library' ...@@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
android { android {
compileSdkVersion 28 compileSdkVersion 28
defaultConfig { defaultConfig {
minSdkVersion 20 minSdkVersion 21
targetSdkVersion 28 targetSdkVersion 28
versionCode 2 versionCode 2
versionName "1.1" versionName "1.1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment