2017-11-14 23 views
-2

にラベルの境界線を追加したいです。は、私はラベルが正確に</p> <p><a href="https://i.stack.imgur.com/JD8Xp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JD8Xp.jpg" alt="enter image description here"></a></p> <p>iphoneボタンのように見えるようにしたいレイアウトファイル

私の場合、私はアクティブを表示したいが、私は与えられたイメージのようなラベルの境界線が欲しい。 にはそのためのXMLコードが必要です。

答えて

1

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

     <padding android:left="10dip" android:right="10dip" android:top="5dip" android:bottom="5dip"/> 
     <corners android:bottomRightRadius="5dp" android:bottomLeftRadius="5dp" 
       android:topLeftRadius="5dp" android:topRightRadius="5dp"/> 

     <solid 
      android:color="#f5f5f5"/> 
     <stroke android:width="2dp" android:color="#42A5F5"/> 
    </shape> 
</item> 

を描画可能なフォルダにbutton_background.xmlを作成し、このコードを貼り付け
関連する問題

 関連する問題