2013-07-19 4 views
3

나는 안드로이드 응용 프로그램을 개발하고있어 내가 디자인 레이아웃에 문제가 :이 레이아웃으로왜 회 전자가 너무 큽니까?

:

<LinearLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:layout_marginLeft="10dp" 
     android:layout_marginRight="10dp" > 

     <TextView 
      android:id="@+id/textUploadPhotos" 
      android:layout_width="0dp" 
      android:layout_height="wrap_content" 
      android:layout_weight="0.4" 
      android:text="@string/layout_upload_photos" 
      android:textAppearance="?android:attr/textAppearanceMedium" /> 

     <Spinner 
      android:id="@+id/spinUploadPhotos" 
      android:layout_width="0dp" 
      android:layout_height="wrap_content" 
      android:layout_weight="0.7" 
      android:background="@drawable/spin_selector" /> 

    </LinearLayout> 

그리고 spin_selector.xml :

<?xml version="1.0" encoding="utf-8"?> 
<selector xmlns:android="http://schemas.android.com/apk/res/android" > 
    <item android:drawable="@drawable/select" android:state_pressed="true"/> 
    <item android:drawable="@drawable/select" android:state_focused="true"/> 
    <item android:drawable="@drawable/select"/> 
</selector> 

을 나는이 얻을 :

enter image description here

@drawable/select이 하나입니다

enter image description here

방법 @drawable/select 높이로 회 전자의 크기를 설정할 수 있습니다?

+2

이제 당신은 ... – WarrenFaith

+0

@WarrenFaith, thanks. 이미지가 추가되었습니다. –

+0

'layout_weight' 속성없이 시도해도 될까요? – Gunaseelan

답변

0

이미지가 범인 것 같습니다. 9- 패치 PNG를 사용할 수없는 경우 회 전자의 높이 속성을 더 나은 값으로 설정하십시오. 아마, 지금 당장 wrap_content로 설정했습니다.

또는 이미지 자체의 높이를 낮추어보세요.

관련 문제