나는 이미 레이아웃 문제에 몇 시간을 보냈다. 다른 사람이 동일한 활동에서 이미지 및보기 스위처를 모두 표시하는 방법을 알려줄 수 있습니까?android xml 레이아웃 문제
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:myapp="http://schemas.android.com/apk/res/rg.client.muscle"
android:layout_width="fill_parent"
android:layout_height="fil_parent">
<ViewSwitcher
android:id="@+id/relative"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<!-- contains two relative layouts of same sizes
containing same elements just with switched positions -->
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<com.admob.android.ads.AdView
android:id="@+id/adv"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
myapp:backgroundColor="#000000"
myapp:primaryTextColor="#FFFFFF"
myapp:secondaryTextColor="#CCCCCC"
myapp:refreshInterval="30" >
</com.admob.android.ads.AdView>
<LinearLayout
android:id="@+id/linear"
android:orientation="horizontal"
android:weightSum="100"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/adv" >
<Button
android:id="@+id/but_prev2"
android:text="Previous"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="30" >
</Button>
<Button
android:id="@+id/but_more2"
android:text="More"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="40" >
</Button>
<Button
android:id="@+id/but_next2"
android:text="Next"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="30">
</Button>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<LinearLayout
android:id="@+id/linear2"
android:orientation="horizontal"
android:weightSum="100"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<Button
android:id="@+id/but_prev"
android:text="Previous"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="30">
</Button>
<Button
android:id="@+id/but_more"
android:text="More"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="40">
</Button>
<Button
android:id="@+id/but_next"
android:text="Next"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="30">
</Button>
</LinearLayout>
<com.admob.android.ads.AdView
android:id="@+id/adv2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/linear2"
myapp:backgroundColor="#000000"
myapp:primaryTextColor="#FFFFFF"
myapp:secondaryTextColor="#CCCCCC"
myapp:refreshInterval="30">
</com.admob.android.ads.AdView>
</RelativeLayout>
</ViewSwitcher>
<ImageView
android:id="@+id/image"
android:layout_above="@id/relative"
android:padding="2pt"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true" >
</ImageView>
</RelativeLayout>
내가 먼저 새로운 이미지 버튼이 사라지고 전체 레이아웃이 팽창 다시 것 같다로드 할 때마다 이미지 뷰를 넣으면
업데이트 :
레이아웃은 이미지보기를해야합니다 상단에는보기 전환기가 있습니다.
죄송합니다. 여기에 말씀하신 내용을 추가하지 않았습니다. 그러나 그들은 모두 코드에 설정되어 있습니다. – JehandadK
정확한 답변을 원할 경우 추가해야합니다. ViewSwitcher에'android : layout_below = "@ id/image"'를 추가하십시오. 레이아웃과 내용을 알지 못하면 말하기 어렵습니다. 또한 RelativeLayouts에는'android : orientation' 속성이 없으며 LinearLayout 만 있습니다. 그것들을 사용하면 RelativeLayout에 영향을 미치지 않습니다. – kcoppock
고정하고 이미지가 있어야하는 부분도 추가했습니다. – JehandadK