上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 169 下一页
摘要: 一,代码: 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 刘宏缔的架构森林 阅读(181) 评论(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 刘宏缔的架构森林 阅读(62) 评论(0) 推荐(0)
摘要: 一,代码: 说明:在外层的最上面,增加了固定不移动的header xml: <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http: 阅读全文
posted @ 2025-06-02 12:22 刘宏缔的架构森林 阅读(192) 评论(0) 推荐(0)
摘要: 一,NestedScrollView与ScrollView的区别: NestedScrollView 和 ScrollView 的主要区别在于它具备“嵌套滑动”(Nested Scrolling)功能。在 Android 中,嵌套滑动是一种滚动冲突处理机制,允许父视图和子视图协同工作,共同处理滑动事 阅读全文
posted @ 2025-06-02 12:22 刘宏缔的架构森林 阅读(162) 评论(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 刘宏缔的架构森林 阅读(59) 评论(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 刘宏缔的架构森林 阅读(26) 评论(0) 推荐(0)
摘要: 一,fragment生命周期以及和activity生命周期的关系 和activity生命周期的关系 二,代码: viewpager2的两个fragment cate1 package com.example.okdemo1.fragment; import android.app.Activity; 阅读全文
posted @ 2025-06-02 12:22 刘宏缔的架构森林 阅读(45) 评论(0) 推荐(0)
摘要: 一,代码: xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_ 阅读全文
posted @ 2025-05-24 17:58 刘宏缔的架构森林 阅读(163) 评论(0) 推荐(0)
摘要: 一,代码: adapter public class MyRecycleAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> { private Context context; private static final int 阅读全文
posted @ 2025-05-24 17:57 刘宏缔的架构森林 阅读(26) 评论(0) 推荐(0)
摘要: 一,代码: adapter: package com.example.okdemo1.adapter; import androidx.recyclerview.widget.RecyclerView; import android.content.Context; import android.v 阅读全文
posted @ 2025-05-24 17:57 刘宏缔的架构森林 阅读(52) 评论(0) 推荐(0)
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 169 下一页