title: Having problems with RelativeLayout (Android Studio)
body: <p>I'm pretty new to android studio and app designing and I'm facing some problems in designing an app.</p>
  <p>I'm using relative Layout to set the position of different elements on a page but it is not working. I'm including my syntax and results below for your reference.</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;RelativeLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      xmlns:tools=&quot;http://schemas.android.com/tools&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;
      tools:context=&quot;.MainActivity&quot;&gt;
  
      &lt;TextView
          android:id=&quot;@+id/textView1&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:text=&quot;Quiz app&quot;
          android:textSize=&quot;40dp&quot;
          tools:layout_centerHorizontal=&quot;true&quot; /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/textView2&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:text=&quot;Name: &quot;
          android:textSize=&quot;20dp&quot;
          tools:layout_below=&quot;@id/textView1&quot;
          tools:layout_alignParentLeft=&quot;true&quot;
          tools:layout_marginLeft=&quot;15dp&quot;
          tools:layout_marginTop=&quot;40dp&quot;
          /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/textView3&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:text=&quot;Password: &quot;
          android:textSize=&quot;20dp&quot;
          tools:layout_below=&quot;@id/textView2&quot;
          tools:layout_alignParentLeft=&quot;true&quot;
          tools:layout_marginLeft=&quot;15dp&quot;
          tools:layout_marginTop=&quot;15dp&quot;/&gt;
  
      &lt;EditText
          android:id=&quot;@+id/fillblank1&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:ems=&quot;10&quot;
          android:inputType=&quot;textPersonName&quot;
          android:text=&quot;name&quot;
          android:textSize=&quot;20dp&quot;
          tools:layout_below=&quot;@id/textView1&quot;
          tools:layout_toRightOf=&quot;@id/textView2&quot;
          tools:layout_marginLeft=&quot;50dp&quot;
          tools:layout_marginTop=&quot;30dp&quot;/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  <p>But the result is coming as:</p>
  <p><a href="https://i.stack.imgur.com/ZJ8Ad.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZJ8Ad.png" alt="when I'm running the app" /></a></p>
  <p>Device: on Nexus 6P API 27 Oreo</p>
  <p>I did check out the other questions related to relative layout problems but I don't think they are as bad as this case so I asked this as a separate question.</p>