问题已经在这里问:create PDF of RecyclerView in FULL length 而我也有同样的问题,因为我还没有找到解决方案,我想用全长生成RecyclerView内容的PDF。但没有找到解决办法。从RecyclerView完整内容创建PDF?
我已经尝试了所有可用的解决方案和所有可能的方法来从RecycleView生成PDF。我已经尝试
解决方案:
https://gist.github.com/PrashamTrivedi/809d2541776c8c141d9a
Take a screenshot of RecyclerView in FULL length
Convert Listview Items into a single Bitmap Image
试过这上面提到的所有解决方案,但它们中的任何不跟我和获取工作的错误,有时宽度&身高问题或某时获得空白位ap作为输出不知道为什么。
问题:
我RecyclerView与HTML内容以及在内容的意象。
考虑将以下屏幕显示为包含内容的RecyclerView。在RecyclerView具有内容
相同与100+项以上图像。
RecyclerView项目布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fresco="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/leftImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:adjustViewBounds="true"
android:maxHeight="350dp"
fresco:actualImageScaleType="fitCenter"
fresco:placeholderImage="@color/white" />
<jp.wasabeef.richeditor.RichEditor
android:id="@+id/editor"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/margin10dp"
android:layout_marginRight="@dimen/margin10dp"
android:layout_weight="1"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/rightImage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
android:adjustViewBounds="true"
android:maxHeight="350dp"
fresco:actualImageScaleType="fitCenter"
fresco:placeholderImage="@color/white" />
</LinearLayout>
如何产生这种从recyclerview内容的PDF?任何帮助将不胜感激。
谢谢。
生成PDF的samble代码你试图当前显示屏幕保存为图片,并追加的所有图像,使单一的PDF? –
@Divyesh无法工作,因为它的回收者视图 - 整个显示屏不在屏幕上。视图被回收 –
@Divyesh请正确阅读问题。 –