title: why the button is not display and text view?
body: <p>I am new to android development . I've made a simple demo of login screen. I used Xml to do this and have checked my output on landscape and portrait mode. It looks fine in portrait mode, but on landscape my <strong>login</strong> button is not visible and I am not able to scroll my view. I used <strong>dp</strong> in my xml file and I think it is due to dp that I have this problem.</p>
  
  <p>Here are my screen shots to show what is displayed.<a href="https://i.stack.imgur.com/R9HCz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R9HCz.png" alt="enter image description here"></a></p>
  
  <p>This is portrait mode which is looking fine ..</p>
  
  <p><a href="https://i.stack.imgur.com/TlKxl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TlKxl.png" alt="enter image description here"></a></p>
  
  <p>When I rotate my device it moves to landscape, but it is not showing button and below text view? Can I add <strong>scroll view ?</strong> or <strong>can I add in % percentage instead of dp</strong>?</p>
  
  <p>Here is my code</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
      android:layout_height="match_parent"
     tools:context=".MainActivity"
      android:background="#223399"
      android:orientation="vertical"&gt;
  
      &lt;TextView
          android:layout_marginTop="20dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:textAppearance="?android:textAppearanceLarge"
          android:text="Login here"
          android:gravity="center"
          /&gt;
  
  
      &lt;EditText
          android:layout_marginTop="80dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:hint="Username"
          android:layout_marginLeft="20dp"
          android:layout_marginRight="20dp"
          /&gt;
      &lt;EditText
          android:layout_marginTop="20dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:hint="Password"
          android:layout_marginLeft="20dp"
          android:layout_marginRight="20dp"
          /&gt;
  
      &lt;Button
          android:layout_marginTop="80dp"
  
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Login"
          android:id="@+id/loginClick"
          android:layout_gravity="center"
          /&gt;
      &lt;TextView
          android:layout_marginTop="40dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:textAppearance="?android:textAppearanceMedium"
          android:text="New User?"
          android:textColor="#00eeff"
          android:gravity="center"
          android:id="@+id/regiester_id"
          /&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>java code</strong></p>
  
  <pre><code>   public static final String MyPREFERENCES = "MyPrefs" ;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  </code></pre>
  
  <p>How can I set the screen up so that it looks good in portrait as well as landscape mode?</p>
  
  <p><strong>Update code</strong></p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
      android:layout_height="match_parent"
     tools:context=".MainActivity"
      android:background="#223399"
      android:orientation="vertical"&gt;
      &lt;ScrollView
          android:layout_width="match_parent"
          android:layout_height="fill_parent"&gt;
  
      &lt;TextView
          android:layout_marginTop="20dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:textAppearance="?android:textAppearanceLarge"
          android:text="Login here"
          android:gravity="center"
          /&gt;
  
  
      &lt;EditText
          android:layout_marginTop="80dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:hint="Username"
          android:layout_marginLeft="20dp"
          android:layout_marginRight="20dp"
          /&gt;
      &lt;EditText
          android:layout_marginTop="20dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:hint="Password"
          android:layout_marginLeft="20dp"
          android:layout_marginRight="20dp"
          /&gt;
  
      &lt;Button
          android:layout_marginTop="80dp"
  
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Login"
          android:id="@+id/loginClick"
          android:layout_gravity="center"
          /&gt;
      &lt;TextView
          android:layout_marginTop="40dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:textAppearance="?android:textAppearanceMedium"
          android:text="New User?"
          android:textColor="#00eeff"
          android:gravity="center"
          android:id="@+id/regiester_id"
          /&gt;
      &lt;/ScrollView&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>