2012-08-12 6 views
6

나는 라디오 그룹이 있습니다 RadioGroup 파딩과 함께 대시 스트로크 (boder?)를 추가하고 싶습니다.padding으로 안드로이드 점선 테두리

라디오 부톤 섬의 배경

<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> 
    <item android:drawable="@drawable/navigation"/> 
    <item > 
     <shape> 
      <solid android:color="#00000000"/> 
      <stroke android:color="#ffffff" 
        android:dashGap="5dp" 
        android:dashWidth="5dp"/> 
     </shape> 
    </item> 
</layer-list> 

두 번째 항목 것은 - 점선을 그려 내이 시도이다.

내가 뭘 잘못하고 있니?

답변

7

<stroke> 태그에 android:width="1dip"을 추가해보세요.

+0

패딩을 추가하는 방법을 알고 있습니까? 작동하지 않습니다. –

16

저는 이것이 당신을 도울 것이라고 생각합니다.

시도해보십시오.

<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > 
    <item> 
     <shape> 
      <solid android:color="#ffffff" /> 
      <stroke 
       android:dashGap="5dp" 
       android:dashWidth="5dp" 
       android:width="1dp" 
       android:color="#0000FF" /> 
      <padding 
       android:bottom="5dp" 
       android:left="5dp" 
       android:right="5dp" 
       android:top="5dp" /> 
     </shape> 
    </item> 
</layer-list> 
관련 문제