上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 178 下一页
摘要: 一,代码: 功能:点击按钮后滑动到相应页面, 手动滑动页面时,下面的按钮能指示当前滑动到的页面 页面最下方的三个按钮,相当于我们自定义的tabbar 1,xml <?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.wid 阅读全文
posted @ 2025-05-01 09:27 刘宏缔的架构森林 阅读(26) 评论(0) 推荐(0)
摘要: 一,问题: xml: <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="200px"> <Button android:id="@+id/ 阅读全文
posted @ 2025-05-01 09:26 刘宏缔的架构森林 阅读(62) 评论(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-01 09:24 刘宏缔的架构森林 阅读(46) 评论(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-01 09:24 刘宏缔的架构森林 阅读(52) 评论(0) 推荐(0)
摘要: 一,代码: 说明: ‌View.VISIBLE‌:表示View是可见的,即显示在屏幕上。 ‌View.INVISIBLE‌:表示View是不可见的,但仍然占据空间。 ‌View.GONE‌:表示View是不可见的,并且不占据空间‌1。 xml <?xml version="1.0" encoding 阅读全文
posted @ 2025-05-01 09:23 刘宏缔的架构森林 阅读(42) 评论(0) 推荐(0)
摘要: 一,代码 //给按钮增加点击事件 Button webButton = findViewById(R.id.webbutton); webButton.setOnClickListener(new View.OnClickListener() { @Override public void onCl 阅读全文
posted @ 2025-05-01 09:23 刘宏缔的架构森林 阅读(59) 评论(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 刘宏缔的架构森林 阅读(30) 评论(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 刘宏缔的架构森林 阅读(81) 评论(0) 推荐(0)
摘要: 一,代码: 在activity的oncreate方法中添加如下代码: //设置状态栏透明 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { getWindow().getDecorView().setSystemUiVisibility(Vi 阅读全文
posted @ 2025-05-01 09:22 刘宏缔的架构森林 阅读(308) 评论(0) 推荐(0)
摘要: 一,问题的现象 代码: //给按钮增加点击事件 Button myButton = findViewById(R.id.apibutton); myButton.setOnClickListener(new View.OnClickListener() { @Override public void 阅读全文
posted @ 2025-05-01 09:22 刘宏缔的架构森林 阅读(57) 评论(0) 推荐(0)
上一页 1 ··· 43 44 45 46 47 48 49 50 51 ··· 178 下一页