Advertisement

Android Studio 扫描事件操作与图片资源切换

阅读量:

需求:

当处于第一张图片时,向左滑动将提示已到达首张图片;

当处于最后一张图片时,向右滑动将提示已到达末张图片。

页面效果图:

复制代码
 <?xml version="1.0" encoding="utf-8"?>

    
 <LinearLayout 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="match_parent"
    
     android:orientation="vertical"
    
     tools:context=".MainActivity10">
    
  

全部评论 (0)

还没有任何评论哟~