title: Getting different bitmap size on same device when creating from different screen
body: <p>I am getting different bitmap size from the same device .
  First, I am creating from activity and another I am creating from item click in recylerview.</p>
  
  <p><a href="https://i.stack.imgur.com/Dm8hZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dm8hZ.png" alt="Recylerview screen from where I am creating bitmap to share "></a></p>
  
  <p>Here I am getting height around 1350.</p>
  
  <p>Below is acitivity screen shot.</p>
  
  <p><img src="https://i.stack.imgur.com/YYnyD.png" alt="Activity Screen[2]"></p>
  
  <p>Here I am getting bitmap of height around 1425. On same device moto g4.
  And I am using same java class as well as same xml class.
  Below is my xml code.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:card_view="http://schemas.android.com/apk/res-auto"
      android:layout_width="match_parent"
      android:id="@+id/parentLL"
      android:layout_height="wrap_content"&gt;
  
      &lt;RelativeLayout
          android:id="@+id/parentRL"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="#ffffff"
          android:orientation="vertical"
          android:padding="10dp"
         &gt;
  
          &lt;android.support.v7.widget.CardView
              android:id="@+id/cardLayout"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:background="#ffffff"
              card_view:cardCornerRadius="4dp"
  
              card_view:cardElevation="4dp"
              card_view:cardUseCompatPadding="true"&gt;
  
              &lt;FrameLayout
                  android:id="@+id/imageFL"
                  android:layout_width="match_parent"
                  android:layout_height="300dp"&gt;
  
                  &lt;ImageView
                      android:id="@+id/featuredCellImageView"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:scaleType="fitXY"
                      android:src="@drawable/placeholder_default_image" /&gt;
  
                  &lt;RelativeLayout
                      android:layout_width="match_parent"
  
                      android:layout_height="match_parent"
                      android:layout_gravity="center"&gt;
  
                      &lt;ImageView
                          android:id="@+id/featuredCellCentreImageView"
                          android:layout_width="match_parent"
                          android:layout_height="match_parent"
                          android:layout_alignParentLeft="true"
                          android:layout_alignParentTop="true"
                          android:layout_marginLeft="2dp"
                          android:layout_marginTop="2dp"
                          android:adjustViewBounds="true"
                          android:scaleType="fitCenter"
                          android:src="@drawable/placeholder_default_image" /&gt;
                  &lt;/RelativeLayout&gt;
  
                  &lt;RelativeLayout
                      android:id="@+id/topBannerRL"
                      android:layout_width="match_parent"
                      android:layout_height="80dp"
                      android:layout_gravity="top"
                      android:background="#90000000"&gt;
  
                      &lt;ImageView
                          android:id="@+id/logoIV"
                          android:layout_width="120dp"
                          android:layout_height="40dp"
                          android:layout_margin="15dp"
                          android:src="@drawable/splash_text" /&gt;
                  &lt;/RelativeLayout&gt;
              &lt;/FrameLayout&gt;
          &lt;/android.support.v7.widget.CardView&gt;
  
          &lt;LinearLayout
              android:id="@+id/rl_title"
              android:layout_below="@+id/cardLayout"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_margin="2dp"
  
              android:background="#ffffff"
              android:orientation="vertical"&gt;
  
              &lt;TextView
                  android:id="@+id/featuredCellTitle"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="2dp"
                  android:ellipsize="end"
                  android:maxLines="3"
                  android:padding="2dp"
                  android:textColor="#000000"
                  android:textSize="20sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/description"
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="5dp"
                  android:layout_marginTop="5dp"
                  android:layout_marginRight="5dp"
                  android:ellipsize="end"
                  android:maxLines="6"
                  android:textColor="#000000"
                  android:textSize="14sp" /&gt;
  
              &lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:visibility="visible"
                  android:id="@+id/logosLL"
                  android:gravity="center|right"&gt;
  
                  &lt;ImageView
                      android:id="@+id/imageView"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
  
                      android:layout_marginRight="4dp"
                      android:src="@drawable/ios_app_store" /&gt;
  
                  &lt;ImageView
                      android:id="@+id/playIV"
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:layout_marginRight="4dp"
                      android:src="@drawable/google_play" /&gt;
              &lt;/LinearLayout&gt;
          &lt;/LinearLayout&gt;
      &lt;/RelativeLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Below <strong>logoLL linearlayout</strong> creating problem. when i dont use it then i get same height of bitmap in both cases.</p>