I want to take a screenshot of an activity which is having a scrolview. I am able to take a screenshot that contains only the visible part. Is there a way to take a more complete screenshot of the scrollview so as invisible parts are also included?
Please I need help on this, I have been stuck on it from days.
I've already tried some ways/solutions provided in related questions from the site but none of them worked for me.
Here is the layout I use:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="16dp"
android:gravity="center"
android:orientation="vertical">
<Button
android:id="@+id/capture_screen_shot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Take ScreenShot" />
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/sc">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/m">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/Data" />
</LinearLayout>
</ScrollView>
</LinearLayout>
Help me please :)