Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/227.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何通过instagram故事等控件实现图像之间的导航?_Android_Android Recyclerview_Instagram Story - Fatal编程技术网

Android 如何通过instagram故事等控件实现图像之间的导航?

Android 如何通过instagram故事等控件实现图像之间的导航?,android,android-recyclerview,instagram-story,Android,Android Recyclerview,Instagram Story,我正试图在回收者视图中实现图像之间的导航,就像instagram故事一样;我的意思是,白线划分在故事的数量上。。当你点击其中一个时,你得到了点击位置的图像 我已经有了“回收者”视图,我试图用图像叠加来模拟白线,但没有得到好的结果 recyclerView = (RecyclerView)findViewById(R.id.rv_evento_images); recyclerView.setLayoutManager(new LinearLayoutManager(this, H

我正试图在回收者视图中实现图像之间的导航,就像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"/>


我为未来的观众找到了一个解决方案

我认为“instagram故事”是一个带有图像的回收视图,但不是。控件是一个设置imageview背景的视图

我使用了一个图书馆,StoriesProgressView

它工作得很好,但这取决于你需要什么功能