Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to round the corner of one side of textview in android

I want to round the only one side of text-view like round from top left and one round from top right round and I use this code. But it not work.

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >

<solid android:color="@color/login_layout" />

<stroke
        android:width="1dp"
        android:color="@color/login_layout" />

<padding
        android:bottom="1dp"
        android:left="1dp"
        android:right="1dp"
        android:top="1dp" />

<corners
        android:bottomLeftRadius="0dip"
        android:bottomRightRadius="0dip"
        android:topLeftRadius="10dip"
        android:topRightRadius="10dip" />

</shape>
like image 745
Ashutosh Bansal Avatar asked Oct 09 '12 04:10

Ashutosh Bansal


1 Answers

sometimes It wont show in emulator and graphical layout try to run the code in a real device and check

like image 86
Syn3sthete Avatar answered Sep 17 '22 12:09

Syn3sthete