마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

레이아웃 2개를 선언한상태에서 최상단 레이아웃 속의 이미지뷰가 두번째 레이아웃을 가릴수 있나요?

0 추천
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/MAINLAYOUT"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal"
    tools:context="com.example.layout.Content"
    android:gravity="center_vertical"
 >
 
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/MAINLAYOUT"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
 
  </LinearLayout>
 
<ImageView 
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:src="@drawable/ani_bg"
      />
 
</LinearLayout>

이런 식으로 이루워진 레이아웃인데  최상단 레이아웃에 이미지뷰 선언 후에 하위 레이아웃을 이미지뷰로 가릴수 있는지 궁금합니다. 프레임 레이아웃 없이 구현해야합니다.

CJ여비 (5,730 포인트) 님이 2014년 10월 30일 질문
CJ여비님이 2014년 10월 30일 수정

1개의 답변

0 추천
 
채택된 답변
겹치는게 아니라 가리는 거라면 setVisibillity로 레이아웃 gone, 이미지뷰 visible로 설정해서 위에 덮어씌운척 하실 수 있습니다.
hahohehi (1,250 포인트) 님이 2014년 10월 31일 답변
CJ여비님이 2014년 11월 3일 채택됨
...