Я делаю снимок экрана с макетом, но получаю изображение, не похожее на отображение во время выполнения. Я использовал библиотеку com.github.chrisbanes.photoview.PhotoView
для жестов масштабирования изображения.
<LinearLayout
android:id="@+id/ContentLinearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/random"
android:orientation="horizontal"
android:weightSum="2">
<androidx.cardview.widget.CardView
android:id="@+id/ImageViewLeftCard"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardCornerRadius="20dp"
android:layout_margin="1dp"
android:layout_weight="1">
<com.github.chrisbanes.photoview.PhotoView
android:id="@+id/ImageViewLeft"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blackcolor"/>
</androidx.cardview.widget.CardView>
<androidx.cardview.widget.CardView
android:id="@+id/ImageViewRightCard"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardCornerRadius="20dp"
android:layout_margin="1dp"
android:layout_weight="1">
<com.github.chrisbanes.photoview.PhotoView
android:id="@+id/ImageViewRight"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/blackcolor" />
</androidx.cardview.widget.CardView>
</LinearLayout>
![enter image description here](https://i.stack.imgur.com/spQmA.jpg)
Мне нужно изображение за снимком экрана, как и в режиме отображения.
Я делаю снимок экрана с этим кодом.
private void screenshot(View v){
v.setDrawingCacheEnabled(true);
Bitmap bitmap = Bitmap.createBitmap(v.getDrawingCache());
v.setDrawingCacheEnabled(false);
}
Проблема, с которой я столкнулся ... простыми словами, мне нужно изображение с закругленными углами после скриншота.