Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏

第 66 章 Palette 视觉设计

目录

66.1. 禁止屏幕休眠
66.2. 颜色设置
66.2.1. 颜色设置
66.3. 样式布局
66.3.1. ConstraintLayout
66.3.2. LinearLayout
66.3.3. FrameLayout
66.3.4. 声音波形图
66.4. UI 界面
66.4.1. Toast
66.4.2. Dialog
66.4.3. DatePicker
66.4.4. Snackbar - Toast 的替代者
66.5. Text
66.5.1. Text 相关属性
66.5.2. TextView
66.5.3. EditText
66.5.4. 光标移动到行尾
66.5.5. 禁止选择文本
66.5.6. 设置 app:backgroundTint
66.5.7. 禁止滚动条
66.6. Button
66.6.1. 启用禁用
66.6.2. 实现 OnClickListener 接口
66.6.3. Fragment 中使用 Button
66.6.4. 圆形按钮
66.6.5. ImageButton
66.6.6. 添加悬浮操作按钮
66.7. Switch
66.8. Widgets
66.8.1. ImageView
66.8.2. TextClock
66.8.3. 进度条
66.8.4. NestedScrollView +
66.9. Containers
66.9.1. CardView
66.9.2. RecyclerView
66.9.3. NavigationView
66.9.4. 底部导航
66.9.5. TabLayout
66.9.6. ViewPager2
66.9.7. Navigation
66.10. 屏幕
66.10.1.
66.10.2. 媒体路由
66.10.3. 分辨率
66.10.4. 尺寸
66.10.5. 全屏显示
66.10.6. 音频处理
66.10.7. 屏幕触摸事件 onTouch(View view, MotionEvent motionEvent)
66.10.8. 手势事件
66.10.9. SimpleOnGestureListener
66.10.10. SimpleOnScaleGestureListener
66.11. 带有小三角指示的消息框
66.11.1. 左侧三角
66.11.2. 右侧三角
66.11.3. 正三角
66.11.4. 倒三角
66.11.5. 文本边框
66.11.6. 布局

66.1. 禁止屏幕休眠

android:keepScreenOn="true"

		
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context="cn.netkiller.student.MainActivity"
    tools:visibility="invisible"
    android:keepScreenOn="true">