上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 169 下一页
摘要: 一,代码: xml: activity <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.co 阅读全文
posted @ 2025-05-24 17:57 刘宏缔的架构森林 阅读(113) 评论(0) 推荐(0)
摘要: 一,代码: 1,xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/re 阅读全文
posted @ 2025-05-24 17:57 刘宏缔的架构森林 阅读(56) 评论(0) 推荐(0)
摘要: 一,代码: xml: <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res 阅读全文
posted @ 2025-05-24 17:57 刘宏缔的架构森林 阅读(15) 评论(0) 推荐(0)
摘要: 一,官方文档: https://developer.android.google.cn/training/data-storage/shared/photopicker?authuser=5&hl=zh-cn#java 二,代码: package com.example.okdemo1.activi 阅读全文
posted @ 2025-05-24 17:56 刘宏缔的架构森林 阅读(83) 评论(0) 推荐(0)
摘要: 一,代码: xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/ 阅读全文
posted @ 2025-05-24 17:56 刘宏缔的架构森林 阅读(29) 评论(0) 推荐(0)
摘要: 一,不要再使用onBackPressed onBackPressed() 在Android 13中被弃用,即当build中compileSdkVersion和targetSdkVersion为33及以上,onBackPressed()被弃用 二,代码: public class MainActivi 阅读全文
posted @ 2025-05-24 17:55 刘宏缔的架构森林 阅读(82) 评论(0) 推荐(0)
摘要: 一,添加字体文件 在res目录下创建font目录,然后把字体文件复制到此目录下,注意:字体文件的文件名请使用英文小写字符 二,代码: xml: <TextView android:id="@+id/textView" android:layout_width="wrap_content" andro 阅读全文
posted @ 2025-05-24 17:55 刘宏缔的架构森林 阅读(44) 评论(0) 推荐(0)
摘要: 一,代码: xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/ 阅读全文
posted @ 2025-05-24 17:55 刘宏缔的架构森林 阅读(7) 评论(0) 推荐(0)
摘要: 一,代码: public class AnimActivity extends AppCompatActivity { private Handler handler = new Handler(); private static final long DELAY_TIME = 3000; // 3 阅读全文
posted @ 2025-05-24 17:54 刘宏缔的架构森林 阅读(10) 评论(0) 推荐(0)
摘要: 一,代码: 在oncreate生命周期中添加代码: setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); 如下: protected void onCreate(Bundle savedInstanceState) { 阅读全文
posted @ 2025-05-24 17:54 刘宏缔的架构森林 阅读(19) 评论(0) 推荐(0)
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 169 下一页