NestedScrollView is not working with ViewPager
Here is my code. Can you please suggest or help me. when i try NestedScrollView without ViewPager its working on other page. here is my layout file.
this RelativeLayout can be removed if needed as i have added this
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="#color/colorAccent">
<ImageView
android:id="#+id/back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/back"
android:layout_marginLeft="10dp"
android:layout_centerVertical="true"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="मेरी प्रोफाइल"
android:textColor="#ffffff"
android:textSize="17sp"
android:layout_centerInParent="true"/>
</RelativeLayout>
NestedScrollView is used
<androidx.core.widget.NestedScrollView
android:id="#+id/nest_scrollview"
android:fillViewport="true"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:nestedScrollingEnabled="true"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="true"
>
<com.test.utils.RoundedImageView
android:id="#+id/iv_user_image"
android:layout_width="100dp"
android:layout_height="100dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:src="#drawable/uploadphoto"
android:tint="#color/colorPrimary"
android:layout_margin="10dp"/>
<TextView
android:id="#+id/tv_user_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="#+id/iv_user_image"
app:layout_constraintLeft_toRightOf="#+id/iv_user_image"
android:layout_marginTop="10dp"
android:layout_marginLeft="20dp"
android:textColor="#color/black"
android:textSize="18sp"
android:textAlignment="center"
android:text="Hitesh"/>
<TextView
android:id="#+id/tv_user_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="#+id/tv_user_name"
app:layout_constraintLeft_toRightOf="#+id/iv_user_image"
android:textAlignment="center"
android:layout_marginTop="5dp"
android:layout_marginLeft="20dp"
android:textColor="#color/quantum_orange"
android:textSize="15sp"/>
<TextView
android:id="#+id/tv_address"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="#+id/iv_user_image"
app:layout_constraintLeft_toLeftOf="#+id/iv_user_image"
android:layout_marginTop="20dp"
android:textColor="#color/black"
android:drawableLeft="#drawable/gglocation"
android:text="Hitesh"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="#+id/cl_referral"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="#+id/tv_address"
android:background="#drawable/border_home_blue"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="20dp"
android:padding="5dp">
<ImageView
android:id="#+id/iv_referral"
android:layout_width="15dp"
android:layout_height="15dp"
android:src="#drawable/ic_trophy"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"/>
<TextView
android:id="#+id/tv_referral_code"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="#+id/iv_referral"
android:textColor="#color/black"
android:layout_marginLeft="5dp"
android:textAllCaps="true"
android:gravity="center"
android:textSize="18sp"
android:text="Hitesh"/>
<TextView
android:id="#+id/tv_hint"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toRightOf="#+id/tv_referral_code"
app:layout_constraintRight_toLeftOf="#+id/iv_whatsapp"
android:layout_margin="10dp"
android:textAllCaps="true"
android:textSize="12sp"
android:text="अपना रेफरल कोड शेयर करे"/>
<ImageView
android:id="#+id/iv_whatsapp"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="#drawable/ic_whatsapp"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.cardview.widget.CardView
android:id="#+id/rateus"
app:cardCornerRadius="6dp"
android:layout_margin="10dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
app:layout_constraintTop_toBottomOf="#+id/cl_referral"
app:layout_constraintLeft_toLeftOf="parent"
android:nestedScrollingEnabled="true">
<ImageView
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_centerVertical="true"
android:src="#drawable/rateus"
/>
</androidx.cardview.widget.CardView>
<com.google.android.material.tabs.TabLayout
android:id="#+id/tab_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="#+id/rateus"
app:tabSelectedTextColor="#color/colorPrimary"
app:tabTextColor="#color/black"
app:tabIndicatorColor="#color/colorPrimary"
android:layout_marginTop="5dp"
android:nestedScrollingEnabled="true"
/>
this is my view pages
<androidx.viewpager.widget.ViewPager
android:id="#+id/pager"
android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintTop_toBottomOf="#id/tab_layout"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
android:nestedScrollingEnabled="true"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</LinearLayout>
Should be solved by setFillViewport (true):
<android.support.v4.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:id="#+id/nest_scrollview"
android:layout_height="match_parent"
app:layout_behavior="#string/appbar_scrolling_view_behavior"
tools:context="mio.kon.yyb.nestedscrollviewbug.ScrollingActivity"
tools:showIn="#layout/activity_scrolling">
<android.support.v4.view.ViewPager
android:id="#+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
And in your activity set:
NestedScrollView scrollView = (NestedScrollView) findViewById (R.id.nest_scrollview);
scrollView.setFillViewport (true);
Related
enter image description here
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<com.google.android.material.appbar.AppBarLayout
android:id="#+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
android:id="#+id/myToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:theme="?attr/actionBarTheme"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:title="Doctor Appointment"
app:titleTextColor="#fff"
tools:ignore="MissingConstraints" />
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="4dp"
android:background="#color/blue"
android:drawableLeft="#drawable/ic_action_logout"
android:text="Logout"
android:textColor="#color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="#+id/myToolbar"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager.widget.ViewPager
android:id="#+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="#string/appbar_scrolling_view_behavior">
<com.google.android.material.tabs.TabLayout
android:id="#+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,SpeakableTextPresentCheck" />
</androidx.viewpager.widget.ViewPager>
<RelativeLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="match_parent">
<ScrollView
android:id="#+id/scrollView"
android:layout_width="411dp"
android:layout_height="712dp"
tools:ignore="MissingConstraints">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="MissingConstraints">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="#+id/button"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_marginLeft="60dp"
android:layout_marginTop="70dp"
android:background="#drawable/my_border"
android:text="save"
android:textColor="#color/blue"
tools:ignore="MissingConstraints" />
<Button
android:id="#+id/button2"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_marginLeft="230dp"
android:layout_marginTop="70dp"
android:background="#drawable/my_border"
android:text="close"
android:textColor="#color/blue" />
</RelativeLayout>
<RadioGroup
android:id="#+id/G1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="10dp">
<RadioButton
android:id="#+id/R1"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="By Speciality" />
<RadioButton
android:id="#+id/R2"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="By Doctor"/>
</RadioGroup>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/img2"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginStart="10dp"
android:layout_marginTop="25dp"
android:layout_marginEnd="25dp"
android:layout_marginBottom="25dp"
android:src="#drawable/female_doctor" />
<TextView
android:id="#+id/Name1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_toEndOf="#+id/img2"
android:text="Dr. J. Anitha Ponmalar"
android:textColor="#000000"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="#+id/degree1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/Name1"
android:layout_marginTop="15dp"
android:layout_toEndOf="#+id/img2"
android:text="M.B.B.S., DCH, MD physiology"
android:textColor="#000000"
android:textSize="14sp" />
<TextView
android:id="#+id/branch1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/degree1"
android:layout_marginTop="15dp"
android:layout_toEndOf="#+id/img2"
android:text="Dermatology"
android:textColor="#000000"
android:textSize="14sp" />
<TextView
android:id="#+id/time1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="190dp"
android:layout_marginTop="99dp"
android:layout_toEndOf="#+id/img2"
android:text="Fee : 309" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
How to implement Scroll View clickable and while clicking the Scroll View I need to navigate to another activity.Here I have attached the image ,I have used an image and text in Scroll View.In java file I have used radio button click.Can you help me to make Scroll View clickable with java code? I have tried implementing the scroll view as clickable using on click Listener but it doesn't work.
Add an id in the linearlayout like in the code below:
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity">
<com.google.android.material.appbar.AppBarLayout
android:id="#+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
android:id="#+id/myToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimary"
android:minHeight="?attr/actionBarSize"
android:theme="?attr/actionBarTheme"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:title="Doctor Appointment"
app:titleTextColor="#fff"
tools:ignore="MissingConstraints" />
<Button
android:id="#+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="4dp"
android:background="#color/blue"
android:drawableLeft="#drawable/ic_action_logout"
android:text="Logout"
android:textColor="#color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="#+id/myToolbar"
tools:ignore="MissingConstraints" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.AppBarLayout>
<androidx.viewpager.widget.ViewPager
android:id="#+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="#string/appbar_scrolling_view_behavior">
<com.google.android.material.tabs.TabLayout
android:id="#+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:ignore="SpeakableTextPresentCheck,SpeakableTextPresentCheck" />
</androidx.viewpager.widget.ViewPager>
<RelativeLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:gravity="center"
android:layout_height="match_parent">
<ScrollView
android:id="#+id/scrollView"
android:layout_width="411dp"
android:layout_height="712dp"
tools:ignore="MissingConstraints">
<LinearLayout
android:id="#+id/llMyScrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:ignore="MissingConstraints">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<Button
android:id="#+id/button"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_marginLeft="60dp"
android:layout_marginTop="70dp"
android:background="#drawable/my_border"
android:text="save"
android:textColor="#color/blue"
tools:ignore="MissingConstraints" />
<Button
android:id="#+id/button2"
android:layout_width="140dp"
android:layout_height="wrap_content"
android:layout_marginLeft="230dp"
android:layout_marginTop="70dp"
android:background="#drawable/my_border"
android:text="close"
android:textColor="#color/blue" />
</RelativeLayout>
<RadioGroup
android:id="#+id/G1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="10dp">
<RadioButton
android:id="#+id/R1"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="By Speciality" />
<RadioButton
android:id="#+id/R2"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:text="By Doctor"/>
</RadioGroup>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/img2"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginStart="10dp"
android:layout_marginTop="25dp"
android:layout_marginEnd="25dp"
android:layout_marginBottom="25dp"
android:src="#drawable/female_doctor" />
<TextView
android:id="#+id/Name1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_toEndOf="#+id/img2"
android:text="Dr. J. Anitha Ponmalar"
android:textColor="#000000"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="#+id/degree1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/Name1"
android:layout_marginTop="15dp"
android:layout_toEndOf="#+id/img2"
android:text="M.B.B.S., DCH, MD physiology"
android:textColor="#000000"
android:textSize="14sp" />
<TextView
android:id="#+id/branch1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/degree1"
android:layout_marginTop="15dp"
android:layout_toEndOf="#+id/img2"
android:text="Dermatology"
android:textColor="#000000"
android:textSize="14sp" />
<TextView
android:id="#+id/time1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="190dp"
android:layout_marginTop="99dp"
android:layout_toEndOf="#+id/img2"
android:text="Fee : 309" />
</RelativeLayout>
</LinearLayout>
</ScrollView>
</RelativeLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
And change your onclick listener to this:
LinearLayout llayout = findViewById(R.id.llMyScrollView);
llayout.setOnClickListener(new View.OnClickListener() {
#Override public void onClick(View v) {
Intent intent = new Intent(Dermatology.this,Spec_Derm.class);
startActivity(intent);
}
});
I'm trying to add a horizantal recyclerview at the bottom in linearlayout but it always starts from top of linearlayout , here is my code
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<androidx.fragment.app.FragmentContainerView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/fragment_container_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.cardview.widget.CardView
android:id="#+id/cardView"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:layout_marginRight="16dp"
android:background="#color/white"
android:divider="#android:color/transparent"
android:elevation="100dp"
android:foreground="?android:attr/selectableItemBackground"
android:orientation="vertical"
app:cardBackgroundColor="#android:color/white"
app:cardCornerRadius="6dp"
app:cardElevation="66dp"
app:cardPreventCornerOverlap="false"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.076"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="#+id/menu_image_view"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="center_vertical"
android:layout_marginStart="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="#drawable/menu_icon" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="5dp"
android:layout_marginRight="5dp"
android:layout_weight="1"
android:layoutDirection="ltr"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="#+id/frameLayout2"
app:layout_constraintStart_toEndOf="#+id/menu_image_view"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="#+id/medfast_linear_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:layoutDirection="ltr"
android:orientation="horizontal"
android:visibility="visible">
<com.plus.medfast.customViews.views.CustomRegularTextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:text="#string/be_healthy" />
</LinearLayout>
<LinearLayout
android:id="#+id/zinc_linear_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:gravity="center"
android:layoutDirection="ltr"
android:orientation="horizontal"
android:visibility="gone">
<ImageView
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_weight="1.3"
android:src="#drawable/medfast_word_only" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="3dp"
android:layout_marginRight="-2dp"
android:layout_weight="1.7"
android:gravity="center">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="#drawable/ic_deal" />
</LinearLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:src="#drawable/zinc" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.9">
<FrameLayout
android:id="#+id/frameLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_weight="1.1"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="#+id/medfast_ads_image_view"
android:layout_width="40dp"
android:layout_height="50dp"
android:layout_gravity="left"
android:src="#drawable/ic_logo"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="#+id/medfast_ads_text_view"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_gravity="top|end"
android:layout_marginTop="24dp"
android:background="#drawable/circle_view_white_solid"
android:gravity="center"
android:text="10"
android:textColor="#color/white"
android:textSize="10dp"
app:layout_constraintBottom_toTopOf="#+id/medfast_ads_image_view"
app:layout_constraintEnd_toEndOf="#+id/medfast_ads_image_view"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
<FrameLayout
android:id="#+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_weight="1.3"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="#+id/normal_ads_image_view"
android:layout_width="30dp"
android:layout_height="40dp"
android:layout_gravity="left"
android:src="#drawable/ic_notification"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="#+id/normal_ads_text_view"
android:layout_width="15dp"
android:layout_height="15dp"
android:layout_gravity="top|end"
android:layout_marginTop="16dp"
android:background="#drawable/circle_view_white_solid"
android:gravity="center"
android:text="10"
android:textColor="#color/white"
android:textSize="10dp"
app:layout_constraintBottom_toTopOf="#+id/normal_ads_image_view"
app:layout_constraintEnd_toEndOf="#+id/normal_ads_image_view"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
</LinearLayout>
</LinearLayout>
</androidx.cardview.widget.CardView>
<ProgressBar
android:id="#+id/progressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:layout_width="match_parent"
android:gravity="bottom"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="#+id/focused_service_name_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<androidx.recyclerview.widget.RecyclerView
android:id="#+id/services_recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false" />
</LinearLayout>
<com.plus.medfast.customViews.views.CustomBoldTextView
android:id="#+id/focused_service_name_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:gravity="center"
android:textColor="#color/colorPrimary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<com.google.android.material.navigation.NavigationView
android:id="#+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="#layout/nav_header_maps_navigation_drawer"
app:menu="#menu/core_activity_navigation_drawer" />
</androidx.drawerlayout.widget.DrawerLayout>
but the result as shown bellow, i need the recyclerview be in bottom because i wan't to translate Y axis of the view to up
Everything in my xml is well written.
after adding marginTop=20 to the recycler view item it works well
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/root_view"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_marginTop="20dp"
android:layout_marginBottom="20dp"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="80dp"
android:layout_height="80dp"
android:background="#drawable/circle_view_red"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="#+id/service_image_view"
android:layout_width="50dp"
android:layout_height="50dp"
android:padding="5dp" />
<com.plus.medfast.customViews.views.CustomBoldTextView
android:id="#+id/service_name_text_view"
android:layout_width="60dp"
android:layout_height="match_parent"
android:layout_marginTop="-5dp"
android:gravity="center"
android:text="Test"
android:textColor="#color/white"
android:textSize="10dp"
android:visibility="visible" />
</LinearLayout>
</LinearLayout>
I have a FoodCardFragment that has a CardView at the bottom. I want the CardView to have a height of at least 120dp and fill the rest of the space (so I set its layout_weight to 1).
The FoodCardFragment is put in the RandomFragment (the first tab of MainAcitivity), and also has its layout_weight set to 1 as I want it to fill the rest of the space.
However, as you can tell from the image I posted below, the yellow CardView I mentioned above doesn't fill the rest of the space. How can I achieve my goal?
In case the links won't work:
Code for FoodCardFragment:
<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:orientation="vertical"
android:padding="20dp"
android:background="#android:color/white">
<android.support.v7.widget.CardView
android:id="#+id/food_card"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:elevation="2dp">
<android.support.constraint.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageView
android:id="#+id/food_image"
android:layout_width="320dp"
android:layout_height="320dp"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="#drawable/food_image_place_holder" />
<ImageView
android:id="#+id/liked_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="4dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="#drawable/ic_undo_like" />
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="10dp">
<TextView
android:id="#+id/food_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textSize="24sp"
android:textStyle="bold"
android:layout_weight="1"
android:maxLines="1"
android:ellipsize="end"
android:layout_marginEnd="4dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="#id/food_card" />
<ImageButton
android:id="#+id/more_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="#android:color/transparent"
android:src="#drawable/ic_dropdown" />
</LinearLayout>
<FrameLayout
android:id="#+id/tags_frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginVertical="10dp" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:minHeight="120dp">
<TextView
android:id="#+id/food_note_back"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/food_note_background"
android:scrollbars="vertical"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingHorizontal="8dp" />
<TextView
android:id="#+id/food_note_front"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/food_note_background"
android:scrollbars="vertical"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:paddingHorizontal="8dp" />
</android.support.v7.widget.CardView>
</LinearLayout>
Code for RandomFragment:
<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:orientation="vertical"
android:background="#color/whiteSmoke">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/colorBackgroundFloating"
android:elevation="2dp">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="#+id/title_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="#string/random"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageButton
android:id="#+id/filter_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="15dp"
android:background="#android:color/transparent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="#id/menu_button"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="#drawable/ic_filter" />
<ImageButton
android:id="#+id/menu_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:background="#android:color/transparent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="#drawable/ic_menu" />
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.Toolbar>
<android.support.v7.widget.CardView
android:id="#+id/food_card_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="center"
android:layout_weight="1"
android:layout_marginHorizontal="20dp"
android:layout_marginTop="30dp"
android:background="#android:color/white"
app:cardCornerRadius="4dp"
app:cardElevation="4dp">
<FrameLayout
android:id="#+id/food_card_frame"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</android.support.v7.widget.CardView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:padding="10dp">
<ImageButton
android:id="#+id/check_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#android:color/transparent"
android:padding="8dp"
app:srcCompat="#drawable/ic_check" />
<ImageButton
android:id="#+id/cross_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#android:color/transparent"
android:padding="8dp"
app:srcCompat="#drawable/ic_cross" />
<ImageButton
android:id="#+id/refresh_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#android:color/transparent"
android:padding="8dp"
app:srcCompat="#drawable/ic_refresh" />
</LinearLayout>
</LinearLayout>
I have AppBarLayout inside CoordinatorLayout while scrolling from AppBarLayout area from top to bottom then some time suddenly scrolls up.
here is the result1 result2
Layout :
<?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.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#color/white"
android:orientation="vertical"
app:elevation="0dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include layout="#layout/layout_header_title_list_item_listing" />
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll">
<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="#+id/imgThumbDetails"
android:layout_width="0dp"
android:layout_height="0dp"
android:adjustViewBounds="true"
android:visibility="invisible"
app:layout_constraintDimensionRatio="W,1:1.5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<cn.jzvd.JZVideoPlayerStandard
android:id="#+id/videoplayerDetails"
android:layout_width="0dp"
android:layout_height="0dp"
android:visibility="invisible"
app:layout_constraintDimensionRatio="W,1:1.5"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.videosgifsimages.smallbang.SmallBangView
android:id="#+id/like_heart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:clickable="false"
android:visibility="invisible"
app:circle_end_color="#00000000"
app:circle_start_color="#00000000"
app:dots_primary_color="#c60d2c"
app:dots_secondary_color="#e9cf0b"
app:layout_constraintBottom_toBottomOf="#+id/videoplayerDetails"
app:layout_constraintEnd_toEndOf="#+id/videoplayerDetails"
app:layout_constraintStart_toStartOf="#+id/videoplayerDetails"
app:layout_constraintTop_toTopOf="#+id/videoplayerDetails">
<ImageView
android:id="#+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:src="#drawable/ic_like_animate" />
</com.videosgifsimages.smallbang.SmallBangView>
</android.support.constraint.ConstraintLayout>
<include
layout="#layout/layout_bottom_list_item_listing"
android:layout_width="match_parent"
android:layout_height="54dp"
app:layout_scrollFlags="scroll" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:background="#f2f2f2"
app:layout_scrollFlags="scroll">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="ad"
android:textColor="#565656"
android:textSize="12sp"
android:textStyle="normal" />
</FrameLayout>
</LinearLayout>
</FrameLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="#+id/recyclerViewDetails"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/white"
app:layout_behavior="#string/appbar_scrolling_view_behavior" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_gravity="bottom"
android:background="#ecf0f1"
android:orientation="horizontal"
android:padding="10dp">
<EditText
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:layout_weight="1"
android:background="#drawable/rounded_edittext_post_comment"
android:hint="Comment"
android:inputType="textPersonName"
android:paddingEnd="15dp"
android:paddingStart="15dp" />
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_gravity="center"
android:layout_marginStart="17dp"
android:background="#drawable/circle_background_post_comment_btn"
android:scaleType="centerInside"
android:src="#drawable/ic_post_comment" />
</LinearLayout>
<View
android:id="#+id/viewDimBgForBottomSheet"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#99000000"
android:visibility="gone" />
<include layout="#layout/bottom_sheet" />
</android.support.design.widget.CoordinatorLayout>
The collapsing toolbar gets stuck in mid way, when i restore the fragment(containing the collapsing toolbar) from back stack. It is collapsing perfectly initially, but when i put the fragment in back-stack, move to next fragment and come back to this fragment then it gets stuck mid-way
XML
<?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:orientation="vertical">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:minHeight="0dp"
app:elevation="0dp">
<android.support.design.widget.CollapsingToolbarLayout
android:id="#+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleMarginEnd="64dp"
app:expandedTitleMarginStart="48dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="200dp"
android:transitionName="frame_layout"
app:layout_collapseMode="parallax"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<TextView
android:id="#+id/tiffin_service_initials_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:background="#color/colorPrimary"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:text="AB"
android:textColor="#color/md_white_1000"
android:textSize="40sp"
android:transitionName="text_view" />
</FrameLayout>
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways"
app:titleTextColor="#color/md_white_1000" />
</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"
app:layout_behavior="#string/appbar_scrolling_view_behavior">
<LinearLayout
android:id="#+id/linear_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
app:cardCornerRadius="0dp"
app:cardElevation="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:foreground="?selectableItemBackground"
android:gravity="center"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="#drawable/ic_star" />
<TextView
android:id="#+id/rating_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:text="4.7"
android:textSize="20sp" />
</LinearLayout>
<View
android:layout_width="0.2dp"
android:layout_height="match_parent"
android:alpha="0.5"
android:background="#android:color/darker_gray" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:foreground="?selectableItemBackground"
android:gravity="center"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
android:layout_width="28dp"
android:layout_height="28dp"
android:scaleType="centerCrop"
android:src="#drawable/ic_call"
android:tint="#color/colorAccent" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:text="#string/call"
android:textSize="20sp" />
</LinearLayout>
<View
android:layout_width="0.2dp"
android:layout_height="match_parent"
android:alpha="0.5"
android:background="#android:color/darker_gray" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:clickable="true"
android:foreground="?selectableItemBackground"
android:gravity="center"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:scaleType="centerCrop"
android:src="#drawable/ic_chat"
android:tint="#color/md_blue_500" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:text="Chat"
android:textSize="20sp" />
</LinearLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
app:cardCornerRadius="0dp"
app:cardElevation="2dp">
<LinearLayout
android:id="#+id/menu_linear_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="vertical"
android:padding="16dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.5"
android:text="#string/menu"
android:textSize="20sp" />
<ProgressBar
android:id="#+id/progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="16dp" />
<android.support.v7.widget.RecyclerView
android:id="#+id/menu_recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:visibility="gone">
</android.support.v7.widget.RecyclerView>
</LinearLayout>
</android.support.v7.widget.CardView>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
app:cardCornerRadius="0dp"
app:cardElevation="2dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
android:alpha="0.5"
android:text="#string/address"
android:textSize="20sp" />
<com.google.android.gms.maps.MapView
android:id="#+id/map_view"
android:layout_width="match_parent"
android:layout_height="200dp">
</com.google.android.gms.maps.MapView>
<TextView
android:id="#+id/address_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:textSize="12sp" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
</android.support.v4.widget.NestedScrollView>
</android.support.design.widget.CoordinatorLayout>