简体   繁体   中英

How to create concave imageview in android?

I need a concave view from one side.What is the best and easiest way to achive this? Thanks for help 在此处输入图片说明

https://github.com/florent37/ArcLayout

Since you asked the Easiest Way ; Simply use this if you don't want to deal with BitmapShader and Animations.

Crop inside:

<com.github.florent37.arclayout.ArcLayout
          android:layout_width="match_parent"
          android:layout_height="200dp"
          app:arc_cropDirection="cropInside"
          app:arc_height="90dp"
          app:arc_padding="30dp"
          android:elevation="5dp"
          >

          <ImageView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="centerCrop"
                android:src="@drawable/yourImage" /> 

 </com.github.florent37.arclayout.ArcLayout>   

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM