한 행에 세 개의 이미지가 있고 그 아래에 Video 또는 두 개의 이미지가 있어야합니다. 지금까지 상대 이미지 레이아웃을 통해 세 이미지를 올바르게 배치 할 수 없었습니다.이 RelativeLayout의 문제점은 무엇입니까?
내가 기대하는 것과는 완전히 다른 동작을합니다 ... 하나의 그림 만 FrameLayout처럼 보여줍니다. 이미지가 제 위치에 있음을 확신 할 수 있습니다. 그리고 자바 코드는 단순한 OnCreate뿐입니다 - super.OnCreate, setContentView (R.layout.component_name). 이 상대 레이아웃에 어떤 문제가 있습니까?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/previous_frame"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/previous_frame" />
<ImageView
android:id="@+id/catch_frame"
android:layout_toLeftOf="@+id/previous_frame"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/catch_frame"
/>
<ImageView
android:id="@+id/next_frame"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:src="@drawable/next_frame"
android:layout_toLeftOf="@id/catch_frame"
/>
</RelativeLayout>
아악. 믿을 수 없는. 대신에 왼쪽으로 또는 오른쪽으로 사용했습니다. – George