强调一下我编写该代码时候用的工具
避免工具版本不同造成无法达到预期效果
android studio3.3.2
好,教程开始前看一下效果图
第一步:activity_main.xml文件代码
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height