<?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"        xmlns:app="http://schemas.android.com/apk/res-auto"        android:layout_width="match_parent"        android:layout_height="match_parent"        tools:context=".MainActivity">    <TextView            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:text="Hello World!"            app:layout_constraintBottom_toBottomOf="parent"            app:layout_constraintLeft_toLeftOf="parent"            app:layout_constraintRight_toRightOf="parent"            app:layout_constraintTop_toTopOf="parent"/>    <RelativeLayout            android:layout_width="match_parent"            android:layout_height="match_parent"            android:background="#00FFFF">        <Button                android:id="@+id/centerB"                android:layout_width="80dp"                android:layout_height="80dp"                android:background="#000000"                android:layout_centerInParent="true">Button>        <Button                android:id="@+id/leftB"                android:layout_width="80dp"                android:layout_height="80dp"                android:background="#006600"                android:layout_centerVertical="true"                android:layout_toLeftOf="@id/centerB"/>        <Button                android:id="@+id/rightB"                android:layout_width="80dp"                android:layout_height="80dp"                android:background="#0000cd"                android:layout_centerVertical="true"                android:layout_toRightOf="@id/centerB"/>        <Button                android:id="@+id/topB"                android:layout_width="80dp"                android:layout_height="80dp"                android:background="#FF1493"                android:layout_centerHorizontal="true"                android:layout_above="@id/centerB" />        <Button                android:id="@+id/bottomB"                android:layout_width="80dp"                android:layout_height="80dp"                android:background="#4169E1"                android:layout_centerHorizontal="true"                android:layout_below="@id/centerB"/>        <Button                android:layout_width="80dp"                android:layout_height="80dp"                android:background="#F8F8FF"                android:layout_above="@id/leftB"                android:layout_toLeftOf="@id/topB"/>        <Button                android:layout_width="80dp"                android:layout_height="80dp"                android:background="#ff0000"                android:layout_below="@id/leftB"                android:layout_toLeftOf="@id/bottomB"/>        <Button                android:layout_width="80dp"                android:layout_height="80dp"                android:background="#ffff00"                android:layout_above="@id/rightB"                android:layout_toRightOf="@id/topB"/>        <Button                android:layout_width="80dp"                android:layout_height="80dp"                android:background="#00ff00"                android:layout_below="@id/rightB"                android:layout_toRightOf="@id/bottomB"/>    RelativeLayout>androidx.constraintlayout.widget.ConstraintLayout>

在安卓虚拟机上实现

在自己手机上实现

更多相关文章

  1. 从Java到android:类的加载机制
  2. Android(安卓)dalvik虚拟机内部机制详解(2)____内存管理原理
  3. Android(安卓)4.0以上设备虚拟按键中显示Menu键
  4. Android虚拟机DVM和JAVA虚拟机JVM的区别总结
  5. Android框架浅析
  6. android修改按键的映射
  7. 阿里云与Android
  8. Android(安卓)hardware按键触感功能实现
  9. Android零基础入门第2节:Android(安卓)系统架构和应用组件那些事

随机推荐

  1. 快来,看看spring有多烂-来自jfinaL的嘲笑
  2. Linux上,最常用的一批命令解析(10年精选)
  3. 百度大佬10分钟教会你是前端bug还是后端b
  4. 没有预热,不叫高并发,叫并发高
  5. Linux生产环境上,最常用的一套“AWK“技巧
  6. C语言学习 4.0
  7. 聊聊幂等
  8. 2021.2.5
  9. 实战Spring Boot 2.0系列(一) - 使用Grad
  10. 用C语言实现三子棋(下)