Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在图像中制作类似的东西。我想重用我为 TAB1 创建的布局。(每次滑动的信息将从服务器获取)。
我找不到任何正确的方法来做到这一点。
我应该使用哪种视图/适配器/swipeListener?
编辑:我不是在谈论创建 TabLayouts。我只想知道布局回收。
https://developer.android.com/training/gestures/detector
您需要制作一个手势检测器,获取开始和结束 X、Y 坐标以确定滑动是否向下,然后只需更改相应字段中的图像和文本。