I want to scroll the ‘상단 타이틀’ space, but the position cannot considered ‘scrolling space’
The first scroll position starts with Relative layout.
The style i used (layoutMain uses layout_height: 0dp, and the other styles(layoutTitle, tvTopTitle, tvSubTitle uses layout_height: wrap_content).
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorWhite"
android:orientation="vertical">
<androidx.core.widget.NestedScrollView style="@style/svMain"
android:background="@color/red">
<LinearLayout
style="@style/layoutMain">
<!--상단 타이틀-->
<LinearLayout style="@style/layoutTitle"
android:background="@color/transparent">
<com.kftc.mobileapi.core.kmutil.KmUtilTextView
android:id="@+id/tvTopTitle"
style="@style/title2"
android:text="계좌해지 서비스 이용 동의" />
<com.kftc.mobileapi.core.kmutil.KmUtilTextView
android:id="@+id/tvSubTitle"
style="@style/subTitle2"
android:text="아래 사항을 반드시 확인 후 해지신청을 하시기 바랍니다." />
</LinearLayout>
//The scroll starts with this point. Why????
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="24dp"
android:background="@drawable/shape_vertical_divider_1dp_gray200" />
<LinearLayout
android:id="@+id/layoutCaution"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="20dp"
android:paddingTop="10dp"
android:paddingBottom="24dp"
android:visibility="visible">
<com.kftc.mobileapi.core.kmutil.KmUtilTextView
android:id="@+id/tvCaution"
style="@style/cautionTextRegularGray500"
android:text="@string/c221"
app:wordBreak="keepAll" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<CheckBox
android:id="@+id/cbAll"
style="@style/check_box"
android:layout_marginStart="20dp"
android:paddingStart="8dp"
android:text="전체 동의"
android:textColor="@color/colorGray900"
android:textSize="14dp" />
</LinearLayout>
<!-- 하단버튼 -->
<LinearLayout
android:id="@+id/layoutBottomBtn"
style="@style/layoutBottomBtn"
android:layout_marginTop="28dp">
<Button
android:id="@+id/btnNext"
style="@style/main03_btn"
android:enabled="false"
android:text="다음" />
</LinearLayout>
</LinearLayout>
I searched the problem with keyword ‘linearlayout scroll problem with scrollview(or nestedscrollview)’
But i cant find in my case..
i also tried viewPort=true, but not worked
New contributor
안은노 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.