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

map v2 view 전환(?)

0 추천

 

 

안녕하세요.. 개발 초보입니다.. 도무지 해결이 안되어서 질문드립니다..ㅜㅜ!

 

지금 만들고 있는 프로젝트의 메인화면은 google map v2이며 상단의 이미지버튼으로 만들어진 '고정'메뉴가 있습니다.

상단의 메뉴 중 누르는 버튼에 따라 상단 메뉴는 고정되서 다시 로딩이 되지 않게 한 채로 view만 다르게 뜨게 하려고 합니다.

( 2개의 메뉴버튼은 map이 사라지고 아예 다른 view를 보여주고,

1개의 메뉴버튼은 누르면 검색창이 떠서 map화면의 윗부분 일부분에 겹쳐서

검색창과 map화면 두 개 다 보이게 하려고 합니다.)

 

 

현재 main의 xml 소스입니다. 

 

map화면인 빨간 부분의 소스를 빼면 잘 돌아갑니다.

근데 메인에 들어갈 map화면을 넣고(빨간 부분) 돌리면 오류는 안 뜨는데 실행이 되지 않습니다..

초보라 뭔가 실수를 하고 있는 것 같은데 검색을 해봐도 도무지 해결이 안 되어서 질문드립니다ㅜㅜ!!

 

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
 
// 상단에 고정된 이미지버튼의 메뉴. 버튼에 따라 다른 view가 떠도 다시 로딩되지 않음.
    <fragement
        android:id="@+id/fragment_top"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        class="com.example.nighthos.MenuTopFragment" />
 
// 버튼에 따라 다르게 뜨는 view를 보이게 함.
    <FrameLayout
        android:id="@+id/framelayout_main"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/fragment_top" >
    </FrameLayout>
 
// 메인에 들어갈 map화면 . 이 부분만 들어가면 오류는 안 뜨나 실행이 되지 않음.
    <!-- mapactivity 화면 -->
 
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent" >
 
        <fragment
            android:id="@+id/map"
            android:name="com.google.android.gms.maps.SupportMapFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_centerHorizontal="true" />
    </FrameLayout>
 
 
 
    <SlidingDrawer
        android:id="@+id/drawer"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:content="@+id/content"
        android:handle="@+id/handle"
        android:topOffset="250dip" >
 
        <ImageButton
            android:id="@+id/handle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@android:color/transparent"
            android:src="@drawable/handle_btn" />
 
        <TwoLineListItem
            android:id="@+id/content"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#808080"
            android:orientation="vertical" >
 
            <ScrollView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:textColor="#000000" />
        </TwoLineListItem>
    </SlidingDrawer>
 
</LinearLayout>

 

 

익명사용자 님이 2013년 10월 11일 질문

1개의 답변

0 추천
건방진프로그래머 (26,630 포인트) 님이 2013년 10월 12일 답변
답변 감사합니다! 참고해서 수정했는데도 여전히 해결이 안되네요ㅜㅜ
에러로그를 알아야 자세한답변가능요
...