2017-10-29 4 views
-1

scrollView의 전체보기를 만들려고하지만 scrollView가 스크롤되지 않습니다.Android Scrollview가 스크롤되지 않습니다.

여기

내 XML 코드 : 제발 도와주세요 :

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

<LinearLayout 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:orientation="vertical" 
    android:paddingTop="40dp" 
    android:padding="20dp" 
    android:background="@android:color/white" 
    android:id="@+id/mainlayout" 
    > 

////some content here 

</LinearLayout> 

</ScrollView> 
+0

선형 레이아웃 내부의 내용은 무엇입니까? 그 안에 recyclerview가 있습니까? – ZeroOne

+0

그것의 : android.support.design.widget.TextInputLayout – user3693265

+0

scrollview는 장치보기를 초과하는보기가 선형보기 내부에있는 경우 더 많은보기를 넣으려고합니다. – ZeroOne

답변

0

변경하여 스크롤 뷰 android.support.v4.widget.NestedScrollView 및 부모를 일치하도록있는 ScrollView android:layout_height을 변경 match_parent

+0

전혀 스크롤하지 않습니다 – user3693265

+0

@ user3693265 전체 코드 붙여 넣기 –

1

height 속성을 설정 .

<?xml version="1.0" encoding="utf-8"?> 
<ScrollView 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:scrollbars="vertical">