2012-07-18 2 views
0

나는 3 개 개의 세그먼트를 포함하는 사용자 정의 세그먼트 막대를 사용하고 난 android:background="@android:drawable/alert_light_frame" 같은 배경으로 alert_light_frame을 설정하지만 2.2에서 세그먼트 줄 높이에 제대로 맞지 않고, 2.3.6에서의 지사. 배경의 높이가 세그먼트 막대 이상입니다. 어느 누구도이 문제를 해결할 수 있습니까?'alert_light_frame'을 백그라운드 레이아웃으로 올바르게 설정하는 방법은 무엇입니까?

여기 세그먼트 바의 내 XML 레이아웃 안드로이드의

<com.com.app.SegmentedRadioGroup 
       android:layout_width="wrap_content" android:layout_height="wrap_content" 
       android:orientation="horizontal" 
       android:id="@+id/segment_text" 
       android:background="@android:drawable/alert_light_frame" 
       android:checkedButton="@+id/button_one"> 
       <RadioButton android:id="@id/button_one" 
        android:minHeight="35dip" android:text="one" 
        android:textAppearance="?android:attr/textAppearanceSmall" 
        android:button="@null" android:gravity="center" android:textColor="@color/radio_colors" /> 
       <RadioButton android:id="@+id/button_two" 
        android:minHeight="35dip" android:text="two" 
        android:button="@null" android:gravity="center" 
        android:textAppearance="?android:attr/textAppearanceSmall" 
        android:textColor="@color/radio_colors" /> 
       <RadioButton android:id="@+id/button_three" 
        android:minHeight="35dip" android:text="three" 
        android:button="@null" android:gravity="center" 
        android:textAppearance="?android:attr/textAppearanceSmall" 
        android:textColor="@color/radio_colors" /> 
      </com.com.app.SegmentedRadioGroup> 
+0

코드를 넣을 수 있습니까? –

답변

0

다른 버전 드로어 블의 다른 버전이있을 수 있습니다.

당신은 안드로이드 드로어 블을 사용할

, (플랫폼/안드로이드-XX/데이터/입술 /) 당신의 SDK에서 찾을하고 프로젝트에 포함하는 것이 바람직하다.

따라서 대신 @android:drawable/alert_light_frame

앱이없이 실행되는 안드로이드 버전을 일치하지 않습니다 그런 식의 @drawable/your_alert_light_frame를 사용합니다. 2.3.6에서 당김이 잘 작동하는지

는 그래서, SDK에서 검색하고 사용합니다.

관련 문제