Browse Source

1.第三方依赖统一管理

王鹏鹏 2 years ago
parent
commit
cc7cec9897

+ 17 - 0
.idea/deploymentTargetDropDown.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="deploymentTargetDropDown">
+    <runningDeviceTargetSelectedWithDropDown>
+      <Target>
+        <type value="RUNNING_DEVICE_TARGET" />
+        <deviceKey>
+          <Key>
+            <type value="SERIAL_NUMBER" />
+            <value value="0123456789ABCDEF" />
+          </Key>
+        </deviceKey>
+      </Target>
+    </runningDeviceTargetSelectedWithDropDown>
+    <timeTargetWasSelectedWithDropDown value="2023-08-14T05:38:02.766199400Z" />
+  </component>
+</project>

+ 1 - 0
.idea/misc.xml

@@ -3,6 +3,7 @@
   <component name="DesignSurface">
     <option name="filePathToZoomLevelMap">
       <map>
+        <entry key="..\:/workspace/hcp-pad/baselib/src/main/res/layout/activity_base.xml" value="0.22826086956521738" />
         <entry key="..\:/workspace/hcp-pad/livebroadcast/src/main/res/layout/activity_live_broadcast.xml" value="0.22826086956521738" />
         <entry key="..\:/workspace/hcp-pad/livebroadcast/src/main/res/layout/fragment_first.xml" value="0.22826086956521738" />
         <entry key="..\:/workspace/hcp-pad/livebroadcast/src/main/res/layout/item_live_broadcast.xml" value="0.22826086956521738" />

+ 2 - 0
baselib/build.gradle

@@ -81,6 +81,8 @@ dependencies {
     api(rootProject.ext.androidx.multidex)
     //SmartRefreshLayout:下拉刷新, 上拉加载更多  https://github.com/scwang90/SmartRefreshLayout
     api(rootProject.ext.dependencies.smartRefreshLayout)
+    api(rootProject.ext.dependencies.refresh_header_classics)
+    api(rootProject.ext.dependencies.refresh_footer_classics)
     // jsbridge :https://github.com/lzyzsd/JsBridge
     api(rootProject.ext.dependencies.jsbridge)
     // 基础依赖包,必须要依赖   https://github.com/gyf-dev/ImmersionBar

+ 0 - 10
baselib/src/main/java/com/yingyangfly/baselib/BaseApplication.kt

@@ -57,16 +57,6 @@ open class BaseApplication : Application() {
         }
     }
 
-    fun getMetricsInfo(): Float {
-        val dm = appContext.resources.displayMetrics
-        return 1194 / dm.widthPixels.toFloat()
-    }
-
-    fun getHeightmetricsInfo(): Float {
-        val dm = appContext.resources.displayMetrics
-        return 834 / dm.heightPixels.toFloat()
-    }
-
     override fun attachBaseContext(base: Context?) {
         super.attachBaseContext(base)
         if (!isAttach) {

+ 2 - 2
baselib/src/main/java/com/yingyangfly/baselib/base/BaseActivity.kt

@@ -15,8 +15,8 @@ import androidx.appcompat.app.AppCompatActivity
 import androidx.databinding.ViewDataBinding
 import androidx.fragment.app.Fragment
 import com.alibaba.android.arouter.launcher.ARouter
-import com.scwang.smartrefresh.layout.api.RefreshLayout
-import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener
+import com.scwang.smart.refresh.layout.api.RefreshLayout
+import com.scwang.smart.refresh.layout.listener.OnRefreshLoadMoreListener
 import com.yingyangfly.baselib.R
 import com.yingyangfly.baselib.databinding.ActivityBaseBinding
 import com.yingyangfly.baselib.dialog.LoadingDialog

+ 2 - 2
baselib/src/main/java/com/yingyangfly/baselib/base/BaseFragment.kt

@@ -9,8 +9,8 @@ import android.widget.LinearLayout
 import androidx.databinding.ViewDataBinding
 import androidx.fragment.app.Fragment
 import com.alibaba.android.arouter.launcher.ARouter
-import com.scwang.smartrefresh.layout.api.RefreshLayout
-import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener
+import com.scwang.smart.refresh.layout.api.RefreshLayout
+import com.scwang.smart.refresh.layout.listener.OnRefreshLoadMoreListener
 import com.yingyangfly.baselib.R
 import com.yingyangfly.baselib.databinding.ActivityBaseBinding
 import com.yingyangfly.baselib.dialog.LoadingDialog

+ 2 - 2
baselib/src/main/java/com/yingyangfly/baselib/base/BaseFragmentActivity.kt

@@ -17,8 +17,8 @@ import androidx.databinding.ViewDataBinding
 import androidx.fragment.app.Fragment
 import androidx.fragment.app.FragmentActivity
 import com.alibaba.android.arouter.launcher.ARouter
-import com.scwang.smartrefresh.layout.api.RefreshLayout
-import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener
+import com.scwang.smart.refresh.layout.api.RefreshLayout
+import com.scwang.smart.refresh.layout.listener.OnRefreshLoadMoreListener
 import com.yingyangfly.baselib.R
 import com.yingyangfly.baselib.databinding.ActivityBaseBinding
 import com.yingyangfly.baselib.dialog.LoadingDialog

+ 4 - 4
baselib/src/main/res/layout/activity_base.xml

@@ -8,12 +8,12 @@
         android:background="@android:color/white"
         android:orientation="vertical">
 
-        <com.scwang.smartrefresh.layout.SmartRefreshLayout
+        <com.scwang.smart.refresh.layout.SmartRefreshLayout
             android:id="@+id/smartRefreshLayout"
             android:layout_width="match_parent"
             android:layout_height="match_parent">
 
-            <com.scwang.smartrefresh.layout.header.ClassicsHeader
+            <com.scwang.smart.refresh.header.ClassicsHeader
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content" />
 
@@ -23,10 +23,10 @@
                 android:layout_height="match_parent"
                 android:orientation="vertical"/>
 
-            <com.scwang.smartrefresh.layout.footer.ClassicsFooter
+            <com.scwang.smart.refresh.footer.ClassicsFooter
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content" />
-        </com.scwang.smartrefresh.layout.SmartRefreshLayout>
+        </com.scwang.smart.refresh.layout.SmartRefreshLayout>
 
     </LinearLayout>
 </layout>

+ 4 - 1
config.gradle

@@ -91,7 +91,10 @@ ext {
             //  多渠道打包
             "walle" : "com.meituan.android.walle:library:1.1.6",
             //SmartRefreshLayout:下拉刷新, 上拉加载更多  https://github.com/scwang90/SmartRefreshLayout
-            "smartRefreshLayout": 'com.scwang.smartrefresh:SmartRefreshLayout:1.1.0',
+            "smartRefreshLayout": 'io.github.scwang90:refresh-layout-kernel:2.0.6',
+            "refresh_header_classics":  'io.github.scwang90:refresh-header-classics:2.0.6',    //经典刷新头
+            "refresh_footer_classics":  'io.github.scwang90:refresh-footer-classics:2.0.6',    //经典加载
+
             // jsbridge :https://github.com/lzyzsd/JsBridge
             "jsbridge": 'com.github.lzyzsd:jsbridge:1.0.4',
             //RxJava2.0

+ 6 - 2
workbenches/src/main/res/layout/activity_workbenches.xml

@@ -153,7 +153,7 @@
             android:layout_marginTop="@dimen/divider_5px"
             android:orientation="horizontal">
 
-            <com.scwang.smartrefresh.layout.SmartRefreshLayout
+            <com.scwang.smart.refresh.layout.SmartRefreshLayout
                 android:id="@+id/swipeGame"
                 android:layout_width="0dp"
                 android:layout_height="match_parent"
@@ -161,13 +161,17 @@
                 android:layout_marginTop="@dimen/divider_12px"
                 android:layout_weight="1">
 
+                <com.scwang.smart.refresh.header.ClassicsHeader
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content" />
+
                 <androidx.recyclerview.widget.RecyclerView
                     android:id="@+id/rvGame"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
                     tools:listitem="@layout/item_game_list" />
 
-            </com.scwang.smartrefresh.layout.SmartRefreshLayout>
+            </com.scwang.smart.refresh.layout.SmartRefreshLayout>
 
             <androidx.cardview.widget.CardView
                 android:layout_width="@dimen/divider_200px"