create rounded corner border in android with three colors for a layout -


create rounded corner border in android 3 colors layout

i want create layout rounded borders , have border in 3 colors outer border green , middle border blue , last inner border again green how can achieved

i have tried code create rou

<shape xmlns:android="http://schemas.android.com/apk/res/android" >      <solid android:color="#ffffff" />      <stroke         android:width="3dip"         android:color="#b1bcbe" />      <corners android:radius="10dip" />      <padding         android:bottom="0dip"         android:left="0dip"         android:right="0dip"         android:top="0dip" />  </shape> 

but have can add multiple borders same layout

you can use layer-list multiple color corner like-

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >     <item android:id="@+id/shape_1">         <shape  android:shape="rectangle" >              <solid android:color="@color/cardview_background"/>         </shape>     </item>     <item android:id="@+id/shape_2" android:bottom="1dp">         <shape  android:shape="rectangle" >              <solid android:color="@color/blue_main"/>         </shape>     </item>     <item android:id="@+id/shape_3" android:bottom="2dp">         <shape  android:shape="rectangle" >              <solid android:color="@color/cardview_background"/>         </shape>     </item>  </layer-list> 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -