title: I'm creating Android layout but after running on my real device i'm getting unique view of same layout
body: <p>I have an main activity in which I have creating layout in XML in Android Studio and setting width and height properly as per my need but after executing my code on my device I'm getting a different view of the same layout.</p>
  
  <p>And also I want to do scroll up my layout when my keyboard is active but after adding <code>android:windowSoftInputMode="adjustResize"</code> not help me.        </p>
  
  <pre><code>        &lt;RelativeLayout
              android:id="@+id/lay_zcrt_img"
              android:layout_width="match_parent"
              android:layout_height="fill_parent"
              android:background="@drawable/splash1"&gt;
  
              &lt;RelativeLayout
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_centerHorizontal="true"
                  android:layout_marginTop="45dp"
                  android:background="@drawable/login_layout_border"&gt;
  
                  &lt;ImageView
                      android:layout_width="250dp"
                      android:layout_height="120dp"
                      android:layout_margin="4dp"
                      android:src="@drawable/login_logo" /&gt;
              &lt;/RelativeLayout&gt;
  
              &lt;android.support.v7.widget.CardView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_centerHorizontal="true"
                  android:layout_marginLeft="35dp"
                  android:layout_marginTop="230dp"
                  android:layout_marginRight="35dp"
                  android:background="@drawable/lay_login_border"
                  app:cardCornerRadius="14dp"&gt;
  
                  &lt;RelativeLayout
                      android:layout_width="350dp"
                      android:layout_height="300dp"
                      android:layout_gravity="center"&gt;
  
                      &lt;TextView
                          android:id="@+id/txt_title"
                          android:layout_width="match_parent"
                          android:layout_height="wrap_content"
                          android:layout_centerHorizontal="true"
                          android:layout_marginTop="15dp"
                          android:gravity="center"
                          android:text="Login"
                          android:textColor="#000"
                          android:textSize="25dp" /&gt;
  
                      &lt;EditText
                          android:id="@+id/edt_phone_number"
                          android:layout_width="300dp"
                          android:layout_height="65dp"
                          android:layout_marginTop="55dp"
                          android:layout_below="@+id/txt_title"
                          android:layout_centerHorizontal="true"
                          android:gravity="center_horizontal|center_vertical"
                          android:hint="Mobile"
                          android:inputType="number"
                          android:maxLength="10" /&gt;
  
                      &lt;Button
                          android:id="@+id/btn_login"
                          android:layout_width="300dp"
                          android:layout_height="55dp"
                          android:layout_alignParentBottom="true"
                          android:layout_centerHorizontal="true"
                          android:layout_marginLeft="25dp"
                          android:layout_marginRight="25dp"
                          android:layout_marginBottom="8dp"
                          android:background="@drawable/btn_corner"
                          android:gravity="center_horizontal|center_vertical"
                          android:text="Submit"
                          android:textAlignment="center"
                          android:textColor="#fff" /&gt;
  
                  &lt;/RelativeLayout&gt;
              &lt;/android.support.v7.widget.CardView&gt;
          &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Here you can see from images I search a lot on a community but not getting any single article related to this.</p>
  
  <p><a href="https://i.stack.imgur.com/40etr.jpg" rel="nofollow noreferrer">This is my android studio layout</a></p>
  
  <p><a href="https://i.stack.imgur.com/nntFO.jpg" rel="nofollow noreferrer">This is my real device view</a></p>