내 이미지가 내 이미지보기 범위 내에 있지 않은 이유를 파악하는 데 문제가 있습니다. 대신, 그것은 왼쪽으로 떠돌아 다니고 숨겨져 있습니다. 이것은 그래픽 인터페이스가 보여주지 않기 때문입니까?이미지가 이미지보기 범위를 벗어납니다.
는 편집 :
: 나는 (내가 이미지가 빨간색 상자에 표시 할) 더 명확하게 나는 데 문제를 보여 원래의 코드를 편집하고 사진을 추가<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:id="@+id/top_container"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:gravity="center"
>
<LinearLayout
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
>
<View
android:layout_height="fill_parent"
android:layout_width="0dp"
android:layout_weight="195"
android:background="#00FF00"/>
<ImageView
android:id="@+id/img"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="#ff0000"
android:src="@drawable/img" />
<View
android:layout_height="fill_parent"
android:layout_width="0dp"
android:layout_weight="1"
android:background="#0000FF"
/>
</LinearLayout>
</LinearLayout>
의 일부에서 속성을 추가했다. 어쩌면 내가 뭔가를 이해하지 못하겠습니까?나는 체중을 늘릴 필요가있다. 이미지가 경계에 있어야하지 않습니까? – prostock
시도해 보셨습니까? 문제를 복제하고 ImageView의 무게를 늘려서 문제를 해결했습니다. – styler1972