title: BottomSheetDialog with collapsable toolbar
body: <p>Hi I am trying to make a dialog which appears from the bottom of the screen in android. On searching I found out I can use BottomSheetDialog. Now I want a collapsable toolbar with an imageview in my BottomSheetDialog. I want to show DETAILS
  ( like name, information, mobile number etc. as simple textviews) when my image collapses on scrolling up. 
  <br>My problem is :
    <br> 1.When I add layout NestedScrollView to display DETAILS, the text overlaps the image initially, but when image is collapsed, the text no longer overlaps the image. The text position remains fixed,it doesn't move up as the image collapses when scrolling up, and the scrolling experience is very very very poor.
    <br> 2. When I add linear layout to display DETAILS, the text comes on my image of collapsable toolbar.</p>
  
  <p>Here is my layout file for dialog: 
  <pre><code>    &lt;?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="match_parent"
          app:layout_behavior="android.support.design.widget.BottomSheetBehavior"></p>
  
  <pre><code>    &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/app_bar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:fitsSystemWindows="true"
          android:theme="@style/AppTheme.AppBarOverlay"&gt;
  
          &lt;android.support.design.widget.CollapsingToolbarLayout
              android:id="@+id/profile_activity_collapsing_toolbar"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:fitsSystemWindows="true"
              app:contentScrim="?attr/colorPrimary"
              app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed"&gt;
  
              &lt;ImageView
                  android:id="@+id/panel_profile_picture"
                  android:layout_width="match_parent"
                  android:layout_height="400dp"
                  android:adjustViewBounds="true"
                  android:scaleType="centerCrop"
                  app:layout_collapseMode="parallax"
                  app:layout_collapseParallaxMultiplier="0.7" /&gt;
  
              &lt;!--&lt;android.support.v7.widget.Toolbar--&gt;
                  &lt;!--android:id="@+id/toolbar"--&gt;
                  &lt;!--android:layout_width="match_parent"--&gt;
                  &lt;!--android:layout_height="?attr/actionBarSize"--&gt;
                  &lt;!--app:layout_collapseMode="parallax"--&gt;
                  &lt;!--app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;--&gt;
          &lt;/android.support.design.widget.CollapsingToolbarLayout&gt;
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;!--&lt;ADD A LAYOUT HERE TO SHOW TEXTVIEW FOR DETAILS LIKE NAME,INFORMATION ETC&gt;--&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>
  
  <p></pre></code></p>
  
  <p><br>The bottomSheetDialog appear when a card is touched in the activity.Here is my code which shows the bottomSheetDialog:</p>
  
  <pre><code>            convertView = mlayoutInflator.inflate(R.layout.panel_details_list_item, null);
              /* setting texts in convertView */
              convertView.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View view) {
                  Log.d("Card touched","Card touched at " + position);
                  mBottomSheetDialog = new BottomSheetDialog(mContext);
                  bottomSheetView = mlayoutInflator.inflate(R.layout.panel_more_detail_item,null);
                  mBottomSheetDialog.setContentView(bottomSheetView);
                  mbottomSheetBehavior = BottomSheetBehavior.from((View) bottomSheetView.getParent());
                  bottomSheetInterviewerImage = bottomSheetView.findViewById(R.id.panel_profile_picture);
                  bottomSheetInterviewerImage.setImageDrawable(drawableList.get(position));
                  mBottomSheetDialog.show();
              }
          });
  </code></pre>
  
  <p>What should I use to show my DETAILS nicely without compromising with the collapsable toolbar? I want that as my image collapses and moves up, the texviews appear and also move up when scrolled up.</p>
  
  <p>PS: Please comment if anything not clear or more related code needs to be posted. TIA</p>