第一步
首先在xml文件中声明一个List View控件,并且标明id
(这一步其实不用说,怕自学Android的小白不懂,就好比当初的我,哈哈)
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height=