我正在尝试在回收站视图中实现图像之间的导航,例如 instagram 故事;我的意思是,白线除以故事的数量。当你点击一个时,你得到了点击位置的图像。
我已经有了回收站视图,我试图放置一个图像叠加层来模拟白线,但我没有得到好的结果。
recyclerView = (RecyclerView)findViewById(R.id.rv_evento_images);
recyclerView.setLayoutManager(new LinearLayoutManager(this, HORIZONTAL, false));
recyclerView.setItemAnimator(new DefaultItemAnimator());
recyclerView.setAdapter(imagesRecyclerAdapter);
我的xml:
<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">
<TextView
android:layout_width="match_parent"
android:layout_height="30dp"
android:text="Bar"
android:textSize="20sp"
android:textColor="#FFFFFF" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_evento_images"
android:layout_width="match_parent"
android:layout_height="500dp"
android:layout_marginTop="10dp"/>
需要的结果...