Android 我有ImageView&;TextView内部的RelativeLayout。现在我要在位图(ImageView)上放置文本了吗?
在此之后,我想用文本和存储为位图捕获所有编辑的属性 我该怎么做Android 我有ImageView&;TextView内部的RelativeLayout。现在我要在位图(ImageView)上放置文本了吗?,android,bitmap,Android,Bitmap,在此之后,我想用文本和存储为位图捕获所有编辑的属性 我该怎么做 通过这种方式,您可以创建任意视图的位图 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <ImageView android:id="
通过这种方式,您可以创建任意视图的位图
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="500dp"
android:layout_height="500dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@android:drawable/sym_def_app_icon" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imageView1"
android:layout_centerHorizontal="true"
android:layout_marginBottom="17dp"
android:text="Enter Your Text Here" />
</RelativeLayout>
yourRelativeLayout.setDrawingCacheEnabled(true);
yourRelativeLayout.buildDrawingCache();
Bitmap bm = yourRelativeLayout.getDrawingCache();