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

전체 스크롤 문의드립니다.

0 추천

아래와 같이 화면을 구성했는데요,,

현재는 RecyclerView 안에서만 스크롤이 동작되는데 빨간색처럼 전체 스크롤을 구현하고 싶습니다. 

ScrollView 나 NestedScrollVIew 를 써봤는데 그럼 RecyclerView 가 안나오더라구요;;;

전체 스크롤을 구현하려면 어떠방법을 써야하는지 조언좀 부탁드립니당,,,

 

 

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!--<android.support.v4.widget.NestedScrollView-->
        <!--android:layout_width="match_parent"-->
        <!--android:layout_height="match_parent"-->
        <!--android:clipToPadding="true">-->

        <!--<LinearLayout-->
            <!--android:layout_width="match_parent"-->
            <!--android:layout_height="match_parent"-->
            <!--android:orientation="vertical">-->

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="180dp"
                android:layout_marginBottom="5dp">

                <android.support.v4.view.ViewPager
                    android:id="@+id/topPager"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"/>

                <kr.showgate.kt.fitdance.custom.CirclePageIndicator
                    android:id="@+id/indicator"
                    android:layout_height="30dp"
                    android:layout_width="match_parent"
                    android:paddingTop="10dp"
                    android:background="@drawable/indicator_bg"
                    android:layout_alignParentBottom="true"/>

            </RelativeLayout>

            <android.support.v7.widget.RecyclerView
                android:id="@+id/recycler_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

        <!--</LinearLayout>-->
    <!--</android.support.v4.widget.NestedScrollView>-->

</LinearLayout>

 

개발자 님이 2016년 3월 28일 질문

1개의 답변

0 추천
scrollview

  linear

    relative

        viewpager

        indicator

    recycler

 

형태로 scrollview 이외의 view는 height 를 wrap_content 로 설정하세요

일단은 view 에 대한 이해도를 높이는게 필요해 보입니다.
aucd29 (218,390 포인트) 님이 2016년 3월 28일 답변
...