上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 186 下一页
摘要: 一,代码: 说明: ‌View.VISIBLE‌:表示View是可见的,即显示在屏幕上。 ‌View.INVISIBLE‌:表示View是不可见的,但仍然占据空间。 ‌View.GONE‌:表示View是不可见的,并且不占据空间‌1。 xml <?xml version="1.0" encoding 阅读全文
posted @ 2025-05-01 09:23 刘宏缔的架构森林 阅读(53) 评论(0) 推荐(0)
摘要: 一,代码 //给按钮增加点击事件 Button webButton = findViewById(R.id.webbutton); webButton.setOnClickListener(new View.OnClickListener() { @Override public void onCl 阅读全文
posted @ 2025-05-01 09:23 刘宏缔的架构森林 阅读(95) 评论(0) 推荐(0)
摘要: 一,配置权限: <uses-feature android:name="android.hardware.telephony" android:required="false" /> <uses-permission android:name="android.permission.CALL_PHO 阅读全文
posted @ 2025-05-01 09:23 刘宏缔的架构森林 阅读(39) 评论(0) 推荐(0)
摘要: 一,安装第三方库glide 1,库地址: https://mvnrepository.com/artifact/com.github.bumptech.glide/glide 2,安装:编辑build.gradle,在dependencies段增加如下一行 // https://mvnreposit 阅读全文
posted @ 2025-05-01 09:23 刘宏缔的架构森林 阅读(105) 评论(0) 推荐(0)
摘要: 一,代码: 在activity的oncreate方法中添加如下代码: //设置状态栏透明 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { getWindow().getDecorView().setSystemUiVisibility(Vi 阅读全文
posted @ 2025-05-01 09:22 刘宏缔的架构森林 阅读(391) 评论(0) 推荐(0)
摘要: 一,问题的现象 代码: //给按钮增加点击事件 Button myButton = findViewById(R.id.apibutton); myButton.setOnClickListener(new View.OnClickListener() { @Override public void 阅读全文
posted @ 2025-05-01 09:22 刘宏缔的架构森林 阅读(74) 评论(0) 推荐(0)
摘要: 一,代码: 1,目标activity中指定动画 public class MylistActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.o 阅读全文
posted @ 2025-04-26 08:46 刘宏缔的架构森林 阅读(71) 评论(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 刘宏缔的架构森林 阅读(44) 评论(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 刘宏缔的架构森林 阅读(35) 评论(0) 推荐(0)
摘要: 一,新建一个activity 修改一个新activity的背景色:在activity_mylist.xml中增加一行: android:background="#FF6600" 二,跳转到第二个activity 1,只跳转不传参数 //给按钮增加点击事件 Button myButton = find 阅读全文
posted @ 2025-04-26 08:45 刘宏缔的架构森林 阅读(142) 评论(0) 推荐(0)
上一页 1 ··· 51 52 53 54 55 56 57 58 59 ··· 186 下一页