相关疑难解决方法(0)

如何将视图转换为位图?

我有两个视图(Textview&ImageView)FrameLayout,我想用文本保存图像.为此,我将View转换为位图.

我的xml是:

<FrameLayout 
     android:id="@+id/framelayout"
     android:layout_marginTop="30dip"
     android:layout_height="fill_parent" 
     android:layout_width="fill_parent">

     <ImageView 
          android:id="@+id/ImageView01"
          android:layout_height="wrap_content" 
          android:layout_width="wrap_content"/>

    <TextView android:id="@+id/text_view"
          android:layout_marginTop="30dip"
          android:layout_width="wrap_content" 
          android:maxLines="20"
          android:scrollbars="vertical"
          android:layout_height="wrap_content"/>

</FrameLayout>
Run Code Online (Sandbox Code Playgroud)

android bitmap

34
推荐指数
2
解决办法
4万
查看次数

标签 统计

android ×1

bitmap ×1