This is my .xml file
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.Nestedsrollview xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="com.example.rushabh123453.attendancepict.Attendance">
<LinearLayout android:layout_weight="1" android:layout_height="0dp" android:layout_width="match_parent"
android:orientation="vertical"
android:background="@color/blue"
android:paddingBottom="24dp">
<TextView
android:id="@+id/tv_attfinal"
android:layout_width="match_parent"
android:layout_height="200dp"
android:text="78"
android:gravity="center"
android:textSize="120sp"
android:textColor="@color/yellow"
android:background="@color/blue"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="64dp"
android:text="Hello"
android:textColor="@color/yellow"
android:textSize="40sp"
android:background="@color/blue"
android:gravity="center"/>
</LinearLayout>
<LinearLayout android:layout_weight="1" android:layout_height="0dp" android:layout_width="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/drawer_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView>
</LinearLayout>
</android.support.v4.Nestedsrollview >
I want to scroll whole layout using nestedscrollview but its showing error of illegal statement:host only one child.
I have tried to make each child of that into wrap_content,but this also dint work
build.gradle(app level)
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.rushabh123453.attendancepict"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'org.jsoup:jsoup:1.7.3'
}