Bir xml dosyası oluşturun, ör. your_rounded_shape.xml
, ve çekilebilir klasörde aşağıdaki kodu ekleyin:
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="#CCCCCC"/>
<stroke android:width="2dp"
android:color="#999999"/>
<padding android:left="2dp"
android:top="2dp"
android:right="2dp"
android:bottom="2dp"/>
<corners android:bottomRightRadius="8dp"
android:bottomLeftRadius="8dp"
android:topLeftRadius="8dp"
android:topRightRadius="8dp"/>
</shape>
Sonra FrameLayout
bir arka plan olarak your_rounded_shape.xml
kullanın. Böyle bir şey:
<FrameLayout
android:width="match_parent"
android:height="wrap_content"
android:background="your_rounded_shape"/>
Sadece FrameLayout öğesinin arka planı olarak elle hazırlanmış bir çizimde atılmıyor musunuz? – m02ph3u5
Bunu kontrol edin http://www.gadgetsaint.com/tips/rounded-corners-views-layouts-android/#.WPz2QVN97BI – ASP