我ViewPager的RecyclerView.
Viewpager水平滚动工作正常,但是当我尝试RecyclerView通过选择我的ViewPager项目来垂直滚动时RecyclerView;我的RecyclerView没有滚动。
mRecyclerViewCarouselInfo.setLayoutManager(new LinearLayoutManager(getContext(),LinearLayoutManager.VERTICAL,false));
mRecyclerViewCarouselInfo.addOnItemTouchListener(new RecyclerView.OnItemTouchListener() {
@Override
public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
int action = e.getAction();
switch (action) {
case MotionEvent.ACTION_MOVE:
rv.getParent().requestDisallowInterceptTouchEvent(true);
break;
}
return false;
}
@Override
public void onTouchEvent(RecyclerView rv, MotionEvent event) {
}
@Override
public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {
}
});
Run Code Online (Sandbox Code Playgroud)
我的 Recyclerview 布局代码如下
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:orientation="vertical"
android:paddingBottom="@dimen/margin_gap_8">
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:listSelector="@drawable/listitem_selector_bg"
android:visibility="visible"/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud) 我Uint8List从适用于 Android 和 iOS 的记录器插件中获取。每当我在麦克风的流订阅中获取数据时,我都想将数据写入本地可播放音频文件中。有什么可能的方法来写入数据吗?
目前,我正在存储数据,如
recordedFile.writeAsBytesSync(recordedData, flush: true);
Run Code Online (Sandbox Code Playgroud)
它正在将数据写入文件,但无法从文件存储中播放。但是,如果我读取同一个文件并将它的字节提供给插件,它也会播放相同的缓冲区。