摘要: 前端 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" 阅读全文
posted @ 2021-09-16 21:33 猫与少年 阅读(79) 评论(0) 推荐(0)
摘要: 前端 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_paren 阅读全文
posted @ 2021-09-16 21:23 猫与少年 阅读(73) 评论(0) 推荐(0)
摘要: 前端代码 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android 阅读全文
posted @ 2021-09-16 21:20 猫与少年 阅读(64) 评论(0) 推荐(0)
摘要: 前端代码 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_paren 阅读全文
posted @ 2021-09-16 19:44 猫与少年 阅读(278) 评论(0) 推荐(0)
摘要: 1. android:src 设置图片资源2. android:scaleType 设置图片缩放类型 1. fitStart 保持宽高比缩放图片,直到较长的边与lmage的边长相等縮放完成后将图片放在lmageView的左上角 2. fitCenter 默认值,同上,缩放后放于中间 3. fitEn 阅读全文
posted @ 2021-09-14 15:57 猫与少年 阅读(278) 评论(0) 推荐(0)
摘要: 主要属性: 1.hint——输入提示 主要用作在输入之前的提示效果 android:hint="请输入用户名" 使用textColorHint属性为其设置颜色 2.inputType—— 输入类型 为其指定输入类型,如:电话、密码等 android:inputType="phone"//指定其输入框 阅读全文
posted @ 2021-09-14 11:58 猫与少年 阅读(185) 评论(0) 推荐(0)
摘要: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android. 阅读全文
posted @ 2021-09-14 09:46 猫与少年 阅读(114) 评论(0) 推荐(0)
摘要: Button背景色 直接修改 android:background="@color/black"是没有效果的 我们需要到themes.xml文件夹下修改style 将<style name="Theme.My_Button" parent="Theme.MaterialComponents.DayN 阅读全文
posted @ 2021-09-11 16:45 猫与少年 阅读(2285) 评论(0) 推荐(0)
摘要: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" an 阅读全文
posted @ 2021-09-11 15:45 猫与少年 阅读(88) 评论(0) 推荐(0)
摘要: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" an 阅读全文
posted @ 2021-09-11 14:56 猫与少年 阅读(22) 评论(0) 推荐(0)