title: How to change the height dynamically according to screen size?
body: <p>I have a RelativeLayout with a ViewPager and another LinearLayout. I have set the layout width of the ViewPager as <code>match_parent</code> and have given the layout height a fixed value of 250dp. </p>
  
  <p>However, when changing the screen sizes bigger and bigger, the height of the ViewPager gets smaller. </p>
  
  <p>How to make the height change according to screen size?</p>
  
  <p>If I set the height to <code>wrap_content</code> it almost takes up the whole screen except for a smaller bit reserved for the other layout.</p>
  
  <p>The code is posted below.</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/activity_main"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  tools:context="com.example.sloid.destinations.navigationdrawerfragments.aboutSLFragment"&gt;
  
  
  &lt;android.support.v4.view.ViewPager
      android:id="@+id/viewPager"
      android:layout_width="match_parent"
      android:layout_height="250dp"
      android:layout_marginBottom="8dp"/&gt;
  
  &lt;LinearLayout
      android:id="@+id/SliderDots"
      android:layout_below="@+id/viewPager"
      android:orientation="horizontal"
      android:gravity="center_vertical|center_horizontal"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"/&gt;
  
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>