Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make image view with three corner and shadow

image

How to make an image with only three corners like this I tried using frame layout the insert image view and make it's resource with original image the add another image view with src of border that has 3 corner bu it doesn't work

like image 823
Karim Ata Avatar asked Feb 11 '20 15:02

Karim Ata


Video Answer


1 Answers

With the Material Components library you can use the MaterialShapeDrawable.

Just use something like:

  <com.google.android.material.imageview.ShapeableImageView
      app:shapeAppearanceOverlay="@style/onlyonecorner"
      app:srcCompat="@drawable/xxx"
      ../>

with:

  <style name="onlyonecorner">
    <item name="cornerFamily">rounded</item>
    <item name="cornerSize">50%</item>
    <item name="cornerSizeTopRight">0dp</item>
  </style>

enter image description here

The ShapeableImageView requires a minimum of version 1.2.0-alpha03.

like image 91
Gabriele Mariotti Avatar answered Sep 29 '22 20:09

Gabriele Mariotti