Home > Blockchain >  how to make a curved design in constraintLayout as given below
how to make a curved design in constraintLayout as given below

Time:05-14

enter image description here

How to make this curved view having text inside, in constraint Layout

CodePudding user response:

Add a background to your parent layout of the textview like this

android:background="@drawable/my_bg"

and create my_bg.xml like this

<?xml version="1.0" encoding="utf-8"?>
<shape
    android:shape="rectangle"
    xmlns:android="http://schemas.android.com/apk/res/android">
    <!--Adjust the values as per your requirement-->
    <corners
        android:bottomLeftRadius="30dp"
        android:bottomRightRadius="30dp"/>
    <solid
        android:color="@color/your_color"/>

</shape>
  • Related