CopyPastor

Detecting plagiarism made easy.

Score: 0.802290141582489; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2018-12-07
by Nilesh Rathod

Original Post

Original - Posted on 2016-07-11
by Vignesh Sundar



            
Present in both answers; Present only in the new answer; Present only in the old answer;

You need to add `android:fitsSystemWindows="true"` in your **`CoordinatorLayout`** , **`AppBarLayout`** and **`CollapsingToolbarLayout`** ,
Try this

<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout 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:fitsSystemWindows="true"> <android.support.design.widget.AppBarLayout android:id="@+id/appbar" android:layout_width="match_parent" android:layout_height="128dp" android:fitsSystemWindows="true"> <android.support.design.widget.CollapsingToolbarLayout android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" app:contentScrim="?attr/colorPrimary" app:layout_scrollFlags="scroll|enterAlways|exitUntilCollapsed" app:toolbarId="@+id/toolbar"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" app:layout_collapseMode="pin" app:title="@string/app_name"> </android.support.v7.widget.Toolbar> </android.support.design.widget.CollapsingToolbarLayout> </android.support.design.widget.AppBarLayout> <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:clipToPadding="false" app:layout_behavior="@string/appbar_scrolling_view_behavior"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/large_text" /> <Button android:id="@+id/continueButton" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="continue_text" /> </LinearLayout> </android.support.v4.widget.NestedScrollView> </android.support.design.widget.CoordinatorLayout>
Simply adding `recyclerView.setNestedScrollingEnabled(false);` before `setAdapter` itself worked for me. I didn't add `app:layout_behavior="@string/appbar_scrolling_view_behavior"` anywhere & didn't set any custom layout manager
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent">
<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/white" android:orientation="vertical">
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="15dp" android:layout_marginRight="15dp" android:orientation="vertical">
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:textColor="@color/white" android:text="Some Text..." android:padding="15dp" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:padding="15dp" android:layout_marginTop="10dp" android:layout_width="match_parent" android:layout_height="wrap_content">
<TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Quick Links" android:textColor="@color/black" android:textStyle="bold" android:textAllCaps="true" android:paddingLeft="20dp" android:drawableLeft="@drawable/ic_trending_up_black_24dp" android:drawablePadding="10dp" android:layout_marginBottom="10dp" android:textSize="16sp"/>
<View android:layout_width="fill_parent" android:layout_height="1dp" android:background="#efefef"/>
<android.support.v7.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/recyclerview" android:layout_width="match_parent" android:layout_height="match_parent" /> </LinearLayout>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>

        
Present in both answers; Present only in the new answer; Present only in the old answer;