一、准备图片
在drawable文件夹下放置需要进行轮询的图片
二、编写一个简单的布局文件
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<Button
android:id="@+id/nextimg"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text=