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

第 7 章 Palette 视觉设计

目录

7.1. 禁止屏幕休眠
7.2. 颜色设置
7.2.1. 颜色设置
7.3. 样式布局
7.3.1. ConstraintLayout
7.3.2. LinearLayout
7.3.3. FrameLayout
7.3.4. 声音波形图
7.4. UI 界面
7.4.1. Toast
7.4.2. Dialog
7.4.3. DatePicker
7.5. Text
7.5.1. Text 相关属性
7.5.2. TextView
7.5.3. EditText
7.5.4. 光标移动到行尾
7.5.5. 禁止选择文本
7.5.6. 设置 app:backgroundTint
7.5.7. 禁止滚动条
7.6. Button
7.6.1. 启用禁用
7.6.2. 实现 OnClickListener 接口
7.6.3. Fragment 中使用 Button
7.6.4. 圆形按钮
7.6.5. ImageButton
7.7. Switch
7.8. Widgets
7.8.1. ImageView
7.8.2. TextClock
7.8.3. 进度条
7.8.4. NestedScrollView +
7.9. Containers
7.9.1. CardView
7.9.2. RecyclerView
7.9.3. NavigationView
7.9.4. 底部导航
7.9.5. TabLayout
7.9.6. ViewPager2
7.9.7. Navigation
7.10. 屏幕
7.10.1.
7.10.2. 媒体路由
7.10.3. 分辨率
7.10.4. 尺寸
7.10.5. 全屏显示
7.10.6. 音频处理
7.10.7. 屏幕触摸事件 onTouch(View view, MotionEvent motionEvent)
7.10.8. 手势事件
7.10.9. SimpleOnGestureListener
7.10.10. SimpleOnScaleGestureListener
7.11. 带有小三角指示的消息框
7.11.1. 左侧三角
7.11.2. 右侧三角
7.11.3. 正三角
7.11.4. 倒三角
7.11.5. 文本边框
7.11.6. 布局

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