코드를 실행할 때 옆에 버튼이있는 이미지가 나타납니다. 버튼이없는 화면의 왼쪽에 이미지가 표시됩니다. 이미지가 첫 번째 또는 두 번째로 나열됩니다.버튼이 선형 레이아웃을 사용하는 앱에 표시되지 않음
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:gravity="bottom" >
<ImageView
android:id="@+id/imageView1"
android:layout_weight="5"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:contentDescription="@string/none"
android:src="@drawable/oxwichpointtest" />
<Button
android:id="@+id/button1"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:onClick="openGuide"
android:text="@string/button_text" />
</LinearLayout>
UPDATE : 모든 제안을 주셔서 감사합니다. 나는 그들 모두를 밖으로 시도했지만 내 애플 리케이션 레이아웃에 변화가 없어서 문제가 .java 파일에 이미지를 설정 한 방법에 있다고 생각된다. 이것을 바꾸려고 노력할 것이기를 바랍니다. 문제가 계속된다면 나중에 코드를 추가 할 수도 있습니다. 다시 한 번 감사드립니다. 적어도 레이아웃에 중대한 문제는 없음을 알았습니다.
사용'안드로이드 : = "1"'이미지 뷰 및 확인에 layout_weight. – Raghunandan
이 작품은 나를 위해 벌금! – Nargis
시작 : android : layout_width = "match_parent", android : orientation = "horizontal"및 xmlns : tools이 도구를 사용하고 있습니까? 또한 안드로이드를 배치하는 것이 좋을 것입니다 : weightSum = "6" –