stackView

 

 使用stackView,表现出view堆叠的效果,可以拖动,也可以触发事件切换

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <StackView
        android:id="@+id/mStackView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:loopViews="true" />
    <LinearLayout
        android:orientation="horizontal"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="上一个"
            android:onClick="prev"/>
        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="下一个"
            android:onClick="next"/>
    </LinearLayout>
</LinearLayout>
主界面

相关文章:

  • 2021-09-13
  • 2021-09-17
  • 2022-12-23
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
  • 2021-04-18
  • 2021-10-12
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-10-08
  • 2021-08-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案