Search code examples
androidandroid-layoutandroid-toolbarandroid-xmlandroid-vectordrawable

how to make curve toolbar and tablayout?


I am trying to make thing like this but i couldn't do it any one can help me with this ! enter image description here


Solution

  • You can use ArcLayout library.

    1. Add dependency to build.gradle(app level)

      compile 'com.github.florent37:arclayout:1.0.3'

    2. Add ArcLayout to your xml it can make curve inside or outside, inside in your case, so use this app:arc_cropDirection="cropInside" property.

      <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"
             >
      
            <!--Your layout will be here to make toolbar -->