摘要:
一,报错信息: 错误: 对于add(int,MsgFragment), 找不到合适的方法 fragmentTransaction.add(R.id.fragment_container, fragment); ^ 方法 FragmentTransaction.add(Fragment,String) 阅读全文
posted @ 2025-06-02 12:27
刘宏缔的架构森林
阅读(53)
评论(0)
推荐(0)
摘要:
一,创建common目录 然后在common目录下创建layout目录 二,原来在layout目录下的xml需要另放一个目录 我们创建一个main目录,main目录下创建layout,移动到这里 三,在build.gradle中添加已创建目录: //在layout文件夹下建立子文件夹 sourceS 阅读全文
posted @ 2025-06-02 12:27
刘宏缔的架构森林
阅读(131)
评论(0)
推荐(0)
摘要:
一,代码: 公用部分 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertic 阅读全文
posted @ 2025-06-02 12:23
刘宏缔的架构森林
阅读(22)
评论(0)
推荐(0)
摘要:
一,代码: activity xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com 阅读全文
posted @ 2025-06-02 12:23
刘宏缔的架构森林
阅读(63)
评论(0)
推荐(0)
摘要:
一,代码: activity的xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com 阅读全文
posted @ 2025-06-02 12:22
刘宏缔的架构森林
阅读(295)
评论(0)
推荐(0)
摘要:
一,代码: activity xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com 阅读全文
posted @ 2025-06-02 12:22
刘宏缔的架构森林
阅读(91)
评论(0)
推荐(0)
摘要:
一,代码: 说明:在外层的最上面,增加了固定不移动的header xml: <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http: 阅读全文
posted @ 2025-06-02 12:22
刘宏缔的架构森林
阅读(269)
评论(0)
推荐(0)
摘要:
一,NestedScrollView与ScrollView的区别: NestedScrollView 和 ScrollView 的主要区别在于它具备“嵌套滑动”(Nested Scrolling)功能。在 Android 中,嵌套滑动是一种滚动冲突处理机制,允许父视图和子视图协同工作,共同处理滑动事 阅读全文
posted @ 2025-06-02 12:22
刘宏缔的架构森林
阅读(241)
评论(0)
推荐(0)
摘要:
一,代码: xml: activity <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.co 阅读全文
posted @ 2025-06-02 12:22
刘宏缔的架构森林
阅读(85)
评论(0)
推荐(0)
摘要:
一,代码: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/andr 阅读全文
posted @ 2025-06-02 12:22
刘宏缔的架构森林
阅读(45)
评论(0)
推荐(0)
浙公网安备 33010602011771号