上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 178 下一页
摘要: 一,代码: 1,目标activity中指定动画 public class MylistActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.o 阅读全文
posted @ 2025-04-26 08:46 刘宏缔的架构森林 阅读(45) 评论(0) 推荐(0)
摘要: 一,代码: 1,接口返回的数据: 1,xml: activity: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmln 阅读全文
posted @ 2025-04-26 08:46 刘宏缔的架构森林 阅读(35) 评论(0) 推荐(0)
摘要: 一,代码: 1,java package com.example.okdemo1.activity; import android.content.Intent; import android.os.Bundle; import android.widget.ArrayAdapter; import 阅读全文
posted @ 2025-04-26 08:45 刘宏缔的架构森林 阅读(24) 评论(0) 推荐(0)
摘要: 一,新建一个activity 修改一个新activity的背景色:在activity_mylist.xml中增加一行: android:background="#FF6600" 二,跳转到第二个activity 1,只跳转不传参数 //给按钮增加点击事件 Button myButton = find 阅读全文
posted @ 2025-04-26 08:45 刘宏缔的架构森林 阅读(117) 评论(0) 推荐(0)
摘要: 一,原因: Android P全面禁止了非https链接,并严格审查网站的CA证书 二,解决: 在res文件夹下新建目录xml,然后创建文件network_security_config.xml 内容如下: <?xml version="1.0" encoding="utf-8"?> <networ 阅读全文
posted @ 2025-04-26 08:44 刘宏缔的架构森林 阅读(138) 评论(0) 推荐(0)
摘要: 一,安装第三方库gson 地址: https://mvnrepository.com/artifact/com.google.code.gson/gson build.gradle中dependencies添加: implementation 'com.google.code.gson:gson:2 阅读全文
posted @ 2025-04-26 08:44 刘宏缔的架构森林 阅读(125) 评论(0) 推荐(0)
摘要: 一,代码: xml <Button android:id="@+id/apibutton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="点击这里访问接口" tools:l 阅读全文
posted @ 2025-04-26 08:44 刘宏缔的架构森林 阅读(36) 评论(0) 推荐(0)
摘要: 一,创建项目时不选择Empty Activity 例如:选择Empty Views Activity 此处可以看到默认语言是kotlin,选择语言为java 可以看到创建后的项目使用的语言是java 阅读全文
posted @ 2025-04-26 08:42 刘宏缔的架构森林 阅读(1145) 评论(0) 推荐(0)
摘要: 一,安装第三方库: 1,库地址: https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp 2,安装 在build.gradle的dependencies中增加一行: implementation 'com.squareup.okh 阅读全文
posted @ 2025-04-26 08:41 刘宏缔的架构森林 阅读(76) 评论(0) 推荐(0)
摘要: 一,代码: 1,发送参数的fragment override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) println("fir 阅读全文
posted @ 2025-04-26 08:41 刘宏缔的架构森林 阅读(56) 评论(0) 推荐(0)
上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 178 下一页