安卓手机大多数作为竖屏滚动设备,ListView是最重要的控件之一,下面介绍如何使用ListView控件
首先在Activity的布局文件中加入ListView控件
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"