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

fragment로 리스트를 만들면 아래 버튼이 안보여요 ㅠㅠ

0 추천

원래 이렇게 아래에 검색할수있도록 나와야되는데요fragment로 리스트를 만드니까

이렇게 맨아래로 내려가면 아래에 저거랑 겹치기도하고 아예 안나오는거 같아요ㅠㅠ 저 검색창 나오게 할려면 어떡게하나요

<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="7">

    <fragment
        android:id="@+id/stunotepad_listview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        >
    </fragment>
</LinearLayout>


    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_weight="2"
        android:gravity="bottom"
        android:layout_gravity="bottom">

        <Spinner
            android:id="@+id/stunote_spinner"
            android:layout_width="100dp"
            android:layout_height="40dp"
            android:entries="@array/search">

        </Spinner>

        <EditText
            android:id="@+id/stunote_searchEdit"
            android:layout_width="160dp"
            android:layout_height="40dp" />

        <Button
            android:id="@+id/stunote_searchbtn"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_gravity="center"
            android:background="@drawable/serch" />

        <Button
            android:id="@+id/stunote_writebtn"
            android:layout_width="70dp"
            android:layout_height="40dp"
            android:layout_gravity="right"
            android:text="글쓰기" />

    </LinearLayout>

 

뱅이 (620 포인트) 님이 2017년 9월 8일 질문

1개의 답변

+1 추천
 
채택된 답변
weight 쓰실때는

height에 0dp을 넣어보세요

지금은 wrap으로 되어있고 fragment가 match로 되어있네여

 

<LinearLayout

        android:layout_width="match_parent"

        android:layout_height="0dp"

        android:layout_weight="7">
익명사용자 님이 2017년 9월 8일 답변
뱅이님이 2017년 10월 31일 채택됨
...