2012-08-26 6 views
0

수평있는 LinearLayout에 대한 XML 코드를 사용하여 미안 :이미지를 수평 선형 레이아웃으로 제거하는 방법은 무엇입니까?

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="wrap_content" 
    android:layout_height="60dip" 
    android:orientation="horizontal" 
    android:paddingLeft="5dip" 
    android:paddingRight="5dip" 
    android:layout_alignParentBottom="true" 
    android:background="@drawable/back1" 
    > 

    <ImageView 
     android:id="@+id/imageView1" 
     android:layout_width="wrap_content" 
     android:layout_height="60dip" 
     android:clickable="true" 
     android:contentDescription="@string/app_name" 
     android:src="@drawable/ca_18" 
     android:adjustViewBounds="true"/> 
</LinearLayout> 

와 이미지 뷰는 패딩 상단과 하단이있다. 패딩을 제거하려면 어떻게해야합니까?

+1

이것은 아마도 height 속성이 wrap_content가 아니기 때문일 수 있습니다. –

+0

android : layout_height = "match_parent"(ImageView에서)로 변경되었지만 아무 것도 변경되지 않았습니다. –

답변

2

layout_height 및 layout_width 특성을 하드 코딩하지 마십시오. 기기에서 정상적으로 보일 수 있습니다. 그러나 다른 사람에게는 못 생겨 보일 수 있습니다.

관련 문제