From 73ece7bafeec74191a5919efb6839c508522f917 Mon Sep 17 00:00:00 2001
From: Administrator <123>
Date: Sat, 06 Nov 2021 00:40:07 +0000
Subject: [PATCH] layout 子文件夹

---
 app/build.gradle                                            |   12 ++++++++++++
 app/src/main/res/layout/item/layout/dynamic_item_square.xml |    7 +++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/app/build.gradle b/app/build.gradle
index ae21812..bf9aaad 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -28,6 +28,18 @@
     buildFeatures {
         viewBinding true
     }
+    sourceSets {
+        main {
+            //声明layout子文件夹
+            res.srcDirs = [
+                    'src/main/res/layout/item',
+                    //下面两个是固定兼容写法
+                    'src/main/res/layout',
+                    'src/main/res'
+            ]
+        }
+    }
+
 }
 
 dependencies {
diff --git a/app/src/main/res/layout/item/layout/dynamic_item_square.xml b/app/src/main/res/layout/item/layout/dynamic_item_square.xml
new file mode 100644
index 0000000..962ebf1
--- /dev/null
+++ b/app/src/main/res/layout/item/layout/dynamic_item_square.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" >
+
+</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file

--
Gitblit v1.9.1