메인 액티비티에서 버튼 누르면 "gone" 상태에 있던 레이아웃이 그 위에 나타나되, 뒷 배경에 메인 액티비티가 여전히 보이게 만들었습니다.(새로 뜨는 레이아웃의 height은 200dp정도) 프레임레이아웃을 사용했는데, 위에 있는 레이아웃에서 터치를 해도 밑의 레이아웃이 반응합니다 ㅠㅠㅠㅠㅠㅠㅠㅠ
framelayout에서 두번째 뷰에(나중에 나타나는) clickable 당근 했구요, 아래 뷰의 touch listener에서 false 줘서 다음 뷰로 터치 넘기라고 해서 그것도 해봣는데 다 안되요ㅠㅠㅠㅠㅠ미치겠어요 좀 도와주세요
글자수 제한 때문에 세세한 content들은 생략했습니다. friends_list 누르면 두번째 레이아웃 뜨는 형식입니다.
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_height="match_parent"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<LinearLayout//첫번째 레이아웃!!!
android:visibility="visible"
android:id="@+id/mapsLayout"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical"
tools:context=".MainActivity"
>
<fragment >
</fragment>
<RelativeLayout
android:id="@+id/friends_list"
android:layout_marginRight="5dp"
android:layout_marginTop="7dp"
android:layout_marginLeft="5dp"
android:layout_marginBottom="5dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/shape_color">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="친구 관리"
android:textAlignment="center"
android:textSize="15dp"
android:gravity="center"/>
<ImageView/>
</RelativeLayout>
</LinearLayout
>
<LinearLayout//두번째 레이아웃!!
android:background="#ffffff"
android:visibility="gone"
android:id="@+id/friendsListLayout"
android:clickable="true"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="300dp">
<LinearLayout
/>
<ImageView
/>
<ListView
/>
<LinearLayout
<ImageView/>
<ImageView/>
</LinearLayout>
</LinearLayout>
</FrameLayout>
ImageView arrowUp=(ImageView)findViewById(R.id.arrowUp);
arrowUp.setOnClickListener(new View.OnClickListener() {//첫번째 레이아웃 : mapsLayout, 두번째 레이아웃 : friendsListLayout
@Override
public void onClick(View v) {
friendsListLayout.setVisibility(View.VISIBLE);
friendsListLayout.startAnimation(setAnimUp);
mapsLayout.setClickable(false);
friendsListLayout.setClickable(true);
mapsLayout.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return false;
}
});
friendsListLayout.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
Toast.makeText(getApplicationContext(), "aa", Toast.LENGTH_SHORT).show();
return true;
}
});
..생략
}
});