Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

andriod studio make border & radius?

make a card shape border and radius
I have no idea how to make border!

create view

<View
    android:id="@+id/view"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:layout_marginTop="5dp"/>

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Add xml file

<View
    android:id="@+id/view"
    android:layout_width="0dp"
    android:layout_height="0dp"
    android:layout_marginTop="5dp"
    android:background="@drawable/card_round"/>

Create a drawable resource file
card_round

And past the code…

Maybe your problem solve

<?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
  <solid android:color="#00FFFFFF" />
  <stroke android:width="1dip" android:color="#000000"/>
  <corners android:radius="20dp"/>
</shape>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading