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

第 104 章 Palette 视觉设计

目录

104.1. 禁止屏幕休眠
104.2. 颜色设置
104.2.1. 颜色设置
104.3. 样式布局
104.3.1. ConstraintLayout
104.3.2. LinearLayout
104.3.3. FrameLayout
104.3.4. 声音波形图
104.4. UI 界面
104.4.1. Toast
104.4.2. Dialog
104.4.3. DatePicker
104.4.4. Snackbar - Toast 的替代者
104.5. Text
104.5.1. Text 相关属性
104.5.2. TextView
104.5.3. EditText
104.5.4. 光标移动到行尾
104.5.5. 禁止选择文本
104.5.6. 设置 app:backgroundTint
104.5.7. 禁止滚动条
104.6. Button
104.6.1. 启用禁用
104.6.2. 实现 OnClickListener 接口
104.6.3. Fragment 中使用 Button
104.6.4. 圆形按钮
104.6.5. ImageButton
104.6.6. 添加悬浮操作按钮
104.7. Switch
104.8. Widgets
104.8.1. ImageView
104.8.2. TextClock
104.8.3. 进度条
104.8.4. NestedScrollView +
104.9. Containers
104.9.1. CardView
104.9.2. RecyclerView
104.9.3. NavigationView
104.9.4. 底部导航
104.9.5. TabLayout
104.9.6. ViewPager2
104.9.7. Navigation
104.10. 屏幕
104.10.1.
104.10.2. 媒体路由
104.10.3. 分辨率
104.10.4. 尺寸
104.10.5. 全屏显示
104.10.6. 音频处理
104.10.7. 屏幕触摸事件 onTouch(View view, MotionEvent motionEvent)
104.10.8. 手势事件
104.10.9. SimpleOnGestureListener
104.10.10. SimpleOnScaleGestureListener
104.11. 带有小三角指示的消息框
104.11.1. 左侧三角
104.11.2. 右侧三角
104.11.3. 正三角
104.11.4. 倒三角
104.11.5. 文本边框
104.11.6. 布局

104.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">