liuzhenxing 3 年之前
父节点
当前提交
ab5a5200d6
共有 4 个文件被更改,包括 8 次插入1 次删除
  1. 1 0
      .idea/misc.xml
  2. 4 0
      app/build.gradle
  3. 二进制
      app/libs/xplibcommon.aar
  4. 3 1
      app/src/main/res/layout/item_switch.xml

+ 1 - 0
.idea/misc.xml

@@ -3,6 +3,7 @@
   <component name="DesignSurface">
     <option name="filePathToZoomLevelMap">
       <map>
+        <entry key="../../../.gradle/caches/transforms-3/dae954c5fd9608ef94a7528c5de015a2/transformed/xplibcommon/res/drawable/selector_switch_thumb.xml" value="0.12" />
         <entry key="app/src/main/res/layout/activity_main.xml" value="0.3546195652173913" />
         <entry key="app/src/main/res/layout/display_activity.xml" value="0.20199275362318841" />
         <entry key="app/src/main/res/layout/item_checkbox.xml" value="0.20199275362318841" />

+ 4 - 0
app/build.gradle

@@ -27,6 +27,7 @@ android {
     }
 }
 
+
 dependencies {
 
     implementation 'androidx.appcompat:appcompat:1.4.2'
@@ -37,4 +38,7 @@ dependencies {
     androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
 
     implementation "com.google.zxing:core:3.2.1"
+
+    implementation(fileTree("libs"))
+    //compile(name:'xplibcommon', ext:'aar')
 }

二进制
app/libs/xplibcommon.aar


+ 3 - 1
app/src/main/res/layout/item_switch.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="40dp">
 
@@ -16,7 +17,8 @@
             android:layout_height="wrap_content"
             android:layout_alignParentStart="true"
             android:layout_centerVertical="true"
-            >
+            android:thumb="@drawable/selector_switch_thumb"
+            android:track="@drawable/selector_switch_track">
         </Switch>