上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 169 下一页
摘要: 一,安装第三方库: 1,库地址: https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp 2,安装 在build.gradle的dependencies中增加一行: implementation 'com.squareup.okh 阅读全文
posted @ 2025-04-26 08:41 刘宏缔的架构森林 阅读(59) 评论(0) 推荐(0)
摘要: 一,代码: 1,发送参数的fragment override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) println("fir 阅读全文
posted @ 2025-04-26 08:41 刘宏缔的架构森林 阅读(50) 评论(0) 推荐(0)
摘要: 一,定义动画 1,slide_right.xml <slide xmlns:android="http://schemas.android.com/apk/res/android" android:duration="@android:integer/config_longAnimTime" and 阅读全文
posted @ 2025-04-26 08:40 刘宏缔的架构森林 阅读(16) 评论(0) 推荐(0)
摘要: 一,创建fragment,如图 二,编辑已有fragment,使可以跳转到新添加fragment 1,在已有fragment上添加一个按钮,如下: <Button android:id="@+id/gothree" android:layout_width="wrap_content" androi 阅读全文
posted @ 2025-04-26 08:39 刘宏缔的架构森林 阅读(33) 评论(0) 推荐(0)
摘要: 一,activity和fragment的区别 特性 Activity Fragment 定义 代表应用中的一个独立屏幕 代表 Activity 中的一部分 UI 或行为 生命周期 独立生命周期 依附于宿主 Activity 的生命周期 入口点 需要在 AndroidManifest.xml 中声明 阅读全文
posted @ 2025-04-26 08:39 刘宏缔的架构森林 阅读(130) 评论(0) 推荐(0)
摘要: 一,创建项目 二,项目运行的效果: 阅读全文
posted @ 2025-04-26 08:39 刘宏缔的架构森林 阅读(14) 评论(0) 推荐(0)
摘要: 一,报错信息: Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-8.11.1-bin.zip'. Reason: java.net.SocketTimeoutEx 阅读全文
posted @ 2025-04-26 08:38 刘宏缔的架构森林 阅读(6989) 评论(0) 推荐(0)
摘要: 一,代码: 说明:getx的middleware有个缺陷,不能获取到目标页面的arguments, 所以写一个函数,用来代替页面的跳转 1,functions.dart import 'package:get/get.dart'; import '../services/AuthService.da 阅读全文
posted @ 2025-04-26 08:37 刘宏缔的架构森林 阅读(128) 评论(0) 推荐(0)
摘要: 一,安装第三方库 库地址: https://pub.dev/packages/flutter_secure_storage 编辑pubspec.yaml dependencies: flutter: sdk: flutter flutter_secure_storage: ^9.2.4 然后点击 p 阅读全文
posted @ 2025-04-26 08:37 刘宏缔的架构森林 阅读(127) 评论(0) 推荐(0)
摘要: 一,比较GetxController 和 GetxService 的区别 1,两者的区别: GetxController: GetxController 用于管理特定页面或 widget 的状态。每个页面或 widget 可以拥有一个或多个 GetxController,用于管理其自身的状态和逻辑。 阅读全文
posted @ 2025-04-26 08:37 刘宏缔的架构森林 阅读(465) 评论(0) 推荐(0)
上一页 1 ··· 35 36 37 38 39 40 41 42 43 ··· 169 下一页