Answer the question
In order to leave comments, you need to log in
How to make a cut corner Image View?
Tell me how to make the same element as in the picture,
at first I thought in the direction of the picture above the ImageView, but in the end it turned out this
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1000dp"
android:height="1000dp"
android:viewportHeight="100"
android:viewportWidth="100">
<group android:name="triableGroup">
<path
android:name="triangle"
android:fillColor="#ffffff"
android:pathData="m 0,80 l 100,50 -100,0 z" />
</group>
</vector>
Answer the question
In order to leave comments, you need to log in
The correct way is to use clipPath(). You create a new view that inherits ImageView and clip the incoming canvas in the onDraw() method.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question