How would I keep my content below my toolbar?












0















I need my toolbar to disappear while swiping up. My recyclerview works ok, but the content is first being displayed behind the toolbar until I scroll up. How can I keep my content below my toolbar so it is all displayed before swiping up? Please check my code below and let me know if you can point out what I am doing wrong. There were many SO posts that slightly addressed the issue, but after a couple hours I decided to ask.



activity_main.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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerViewId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp" />

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Light">

<android.support.v7.widget.Toolbar

android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

</android.support.v7.widget.Toolbar>

</android.support.design.widget.AppBarLayout>

</android.support.design.widget.CoordinatorLayout>


content_main.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
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="wrap_content"
app:cardBackgroundColor="#37474F"
app:cardElevation="0dp"
app:cardMaxElevation="0dp"
app:cardUseCompatPadding="true"
android:id="@+id/content_layout">

<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/main.appbar">

<ImageView
android:id="@+id/coin_icon"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/ic_launcher" />

<TextView
android:id="@+id/coin_symbol"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/BTC"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/coin_icon"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_divider"
android:layout_width="3dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="@string/divider"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/coin_symbol"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/Bitcoin"
android:textColor="#E8EAF6"
app:layout_constraintStart_toEndOf="@id/coin_divider"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_sign"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/money_sign"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/priceUsdText"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/priceUsdText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:text="@string/USD"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/oneHourText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="20dp"
android:text="@string/one_hour"
android:textColor="#E8EAF6"
app:layout_constraintStart_toEndOf="@id/coin_icon"
app:layout_constraintTop_toBottomOf="@+id/coin_symbol" />

<TextView
android:id="@+id/percentChange1hrText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="20dp"
android:textColor="@color/colorPrimary"
app:layout_constraintStart_toEndOf="@id/oneHourText"
app:layout_constraintTop_toBottomOf="@+id/coin_divider" />

<TextView
android:id="@+id/twentyFourHourText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="56dp"
android:layout_marginEnd="8dp"
android:text="@string/twenty_four_hr"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toEndOf="@+id/coin_icon"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/percentChange24hrText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/coin_icon"
tools:layout_editor_absoluteX="157dp"
tools:layout_editor_absoluteY="72dp" />

<TextView
android:id="@+id/sevenDayText"
android:name="@string/seven_day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="56dp"
android:layout_marginEnd="12dp"
app:layout_constraintEnd_toStartOf="@id/percentChange7dText"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/percentChange7dText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:textColor="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/coin_icon" />

</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>









share|improve this question























  • Just in case anyone runs into the same problem, I solved it by adding this to my recyclerview: app:layout_behavior="@string/appbar_scrolling_view_behavior"

    – AndroidDev20TX
    Nov 19 '18 at 23:31


















0















I need my toolbar to disappear while swiping up. My recyclerview works ok, but the content is first being displayed behind the toolbar until I scroll up. How can I keep my content below my toolbar so it is all displayed before swiping up? Please check my code below and let me know if you can point out what I am doing wrong. There were many SO posts that slightly addressed the issue, but after a couple hours I decided to ask.



activity_main.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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerViewId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp" />

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Light">

<android.support.v7.widget.Toolbar

android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

</android.support.v7.widget.Toolbar>

</android.support.design.widget.AppBarLayout>

</android.support.design.widget.CoordinatorLayout>


content_main.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
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="wrap_content"
app:cardBackgroundColor="#37474F"
app:cardElevation="0dp"
app:cardMaxElevation="0dp"
app:cardUseCompatPadding="true"
android:id="@+id/content_layout">

<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/main.appbar">

<ImageView
android:id="@+id/coin_icon"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/ic_launcher" />

<TextView
android:id="@+id/coin_symbol"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/BTC"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/coin_icon"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_divider"
android:layout_width="3dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="@string/divider"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/coin_symbol"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/Bitcoin"
android:textColor="#E8EAF6"
app:layout_constraintStart_toEndOf="@id/coin_divider"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_sign"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/money_sign"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/priceUsdText"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/priceUsdText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:text="@string/USD"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/oneHourText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="20dp"
android:text="@string/one_hour"
android:textColor="#E8EAF6"
app:layout_constraintStart_toEndOf="@id/coin_icon"
app:layout_constraintTop_toBottomOf="@+id/coin_symbol" />

<TextView
android:id="@+id/percentChange1hrText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="20dp"
android:textColor="@color/colorPrimary"
app:layout_constraintStart_toEndOf="@id/oneHourText"
app:layout_constraintTop_toBottomOf="@+id/coin_divider" />

<TextView
android:id="@+id/twentyFourHourText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="56dp"
android:layout_marginEnd="8dp"
android:text="@string/twenty_four_hr"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toEndOf="@+id/coin_icon"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/percentChange24hrText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/coin_icon"
tools:layout_editor_absoluteX="157dp"
tools:layout_editor_absoluteY="72dp" />

<TextView
android:id="@+id/sevenDayText"
android:name="@string/seven_day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="56dp"
android:layout_marginEnd="12dp"
app:layout_constraintEnd_toStartOf="@id/percentChange7dText"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/percentChange7dText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:textColor="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/coin_icon" />

</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>









share|improve this question























  • Just in case anyone runs into the same problem, I solved it by adding this to my recyclerview: app:layout_behavior="@string/appbar_scrolling_view_behavior"

    – AndroidDev20TX
    Nov 19 '18 at 23:31
















0












0








0








I need my toolbar to disappear while swiping up. My recyclerview works ok, but the content is first being displayed behind the toolbar until I scroll up. How can I keep my content below my toolbar so it is all displayed before swiping up? Please check my code below and let me know if you can point out what I am doing wrong. There were many SO posts that slightly addressed the issue, but after a couple hours I decided to ask.



activity_main.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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerViewId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp" />

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Light">

<android.support.v7.widget.Toolbar

android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

</android.support.v7.widget.Toolbar>

</android.support.design.widget.AppBarLayout>

</android.support.design.widget.CoordinatorLayout>


content_main.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
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="wrap_content"
app:cardBackgroundColor="#37474F"
app:cardElevation="0dp"
app:cardMaxElevation="0dp"
app:cardUseCompatPadding="true"
android:id="@+id/content_layout">

<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/main.appbar">

<ImageView
android:id="@+id/coin_icon"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/ic_launcher" />

<TextView
android:id="@+id/coin_symbol"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/BTC"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/coin_icon"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_divider"
android:layout_width="3dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="@string/divider"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/coin_symbol"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/Bitcoin"
android:textColor="#E8EAF6"
app:layout_constraintStart_toEndOf="@id/coin_divider"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_sign"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/money_sign"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/priceUsdText"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/priceUsdText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:text="@string/USD"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/oneHourText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="20dp"
android:text="@string/one_hour"
android:textColor="#E8EAF6"
app:layout_constraintStart_toEndOf="@id/coin_icon"
app:layout_constraintTop_toBottomOf="@+id/coin_symbol" />

<TextView
android:id="@+id/percentChange1hrText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="20dp"
android:textColor="@color/colorPrimary"
app:layout_constraintStart_toEndOf="@id/oneHourText"
app:layout_constraintTop_toBottomOf="@+id/coin_divider" />

<TextView
android:id="@+id/twentyFourHourText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="56dp"
android:layout_marginEnd="8dp"
android:text="@string/twenty_four_hr"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toEndOf="@+id/coin_icon"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/percentChange24hrText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/coin_icon"
tools:layout_editor_absoluteX="157dp"
tools:layout_editor_absoluteY="72dp" />

<TextView
android:id="@+id/sevenDayText"
android:name="@string/seven_day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="56dp"
android:layout_marginEnd="12dp"
app:layout_constraintEnd_toStartOf="@id/percentChange7dText"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/percentChange7dText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:textColor="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/coin_icon" />

</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>









share|improve this question














I need my toolbar to disappear while swiping up. My recyclerview works ok, but the content is first being displayed behind the toolbar until I scroll up. How can I keep my content below my toolbar so it is all displayed before swiping up? Please check my code below and let me know if you can point out what I am doing wrong. There were many SO posts that slightly addressed the issue, but after a couple hours I decided to ask.



activity_main.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"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerViewId"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp" />

<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Light">

<android.support.v7.widget.Toolbar

android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

</android.support.v7.widget.Toolbar>

</android.support.design.widget.AppBarLayout>

</android.support.design.widget.CoordinatorLayout>


content_main.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
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="wrap_content"
app:cardBackgroundColor="#37474F"
app:cardElevation="0dp"
app:cardMaxElevation="0dp"
app:cardUseCompatPadding="true"
android:id="@+id/content_layout">

<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/main.appbar">

<ImageView
android:id="@+id/coin_icon"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginLeft="16dp"
android:layout_marginTop="16dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/ic_launcher" />

<TextView
android:id="@+id/coin_symbol"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/BTC"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/coin_icon"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_divider"
android:layout_width="3dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:text="@string/divider"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@id/coin_symbol"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/Bitcoin"
android:textColor="#E8EAF6"
app:layout_constraintStart_toEndOf="@id/coin_divider"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/coin_sign"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_marginLeft="8dp"
android:layout_marginBottom="8dp"
android:text="@string/money_sign"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@id/priceUsdText"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/priceUsdText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginBottom="8dp"
android:text="@string/USD"
android:textColor="#E8EAF6"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/coin_icon" />

<TextView
android:id="@+id/oneHourText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="20dp"
android:text="@string/one_hour"
android:textColor="#E8EAF6"
app:layout_constraintStart_toEndOf="@id/coin_icon"
app:layout_constraintTop_toBottomOf="@+id/coin_symbol" />

<TextView
android:id="@+id/percentChange1hrText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginTop="20dp"
android:textColor="@color/colorPrimary"
app:layout_constraintStart_toEndOf="@id/oneHourText"
app:layout_constraintTop_toBottomOf="@+id/coin_divider" />

<TextView
android:id="@+id/twentyFourHourText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="56dp"
android:layout_marginEnd="8dp"
android:text="@string/twenty_four_hr"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.498"
app:layout_constraintStart_toEndOf="@+id/coin_icon"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/percentChange24hrText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/coin_icon"
tools:layout_editor_absoluteX="157dp"
tools:layout_editor_absoluteY="72dp" />

<TextView
android:id="@+id/sevenDayText"
android:name="@string/seven_day"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="56dp"
android:layout_marginEnd="12dp"
app:layout_constraintEnd_toStartOf="@id/percentChange7dText"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/percentChange7dText"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginLeft="8dp"
android:textColor="@color/colorPrimary"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/coin_icon" />

</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>






android






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 19 '18 at 23:12









AndroidDev20TXAndroidDev20TX

52




52













  • Just in case anyone runs into the same problem, I solved it by adding this to my recyclerview: app:layout_behavior="@string/appbar_scrolling_view_behavior"

    – AndroidDev20TX
    Nov 19 '18 at 23:31





















  • Just in case anyone runs into the same problem, I solved it by adding this to my recyclerview: app:layout_behavior="@string/appbar_scrolling_view_behavior"

    – AndroidDev20TX
    Nov 19 '18 at 23:31



















Just in case anyone runs into the same problem, I solved it by adding this to my recyclerview: app:layout_behavior="@string/appbar_scrolling_view_behavior"

– AndroidDev20TX
Nov 19 '18 at 23:31







Just in case anyone runs into the same problem, I solved it by adding this to my recyclerview: app:layout_behavior="@string/appbar_scrolling_view_behavior"

– AndroidDev20TX
Nov 19 '18 at 23:31














0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53383971%2fhow-would-i-keep-my-content-below-my-toolbar%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53383971%2fhow-would-i-keep-my-content-below-my-toolbar%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Guess what letter conforming each word

Port of Spain

Run scheduled task as local user group (not BUILTIN)