I want to create a download button so that users can download the contents of the ImageView and TextViews (which is on top of the ImageView) as an image file and save it in the device storage.
Here is the code block:
<ImageButton
android:id="@+id/back_btn"
android:layout_width="50dp"
android:layout_height="50dp"
android:background="@mipmap/ic_back"
android:layout_marginTop="20dp"/>
<ImageView
android:id="@+id/imageView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/quotes_background"
android:layout_centerInParent="true"/>
<TextView
android:id="@+id/quoteBody"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textSize="20sp"
android:typeface="monospace"
android:textColor="@color/white"
android:gravity="center"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"/>
<TextView
android:id="@+id/author"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textSize="25sp"
android:layout_below="@id/quoteBody"
android:textColor="@color/white"
android:layout_marginTop="20px"
android:gravity="center"/>
I just want to select the ImageView and the two TextViews and download them as an image (PNG). Any help will be appreciated.
Thank You.