title: How can I fix the alignment issue in my android application
body: <p>I have created a login page with :
  1 small image,
  2 text boxes,
  1 button
  but I want them to align in all types of devices like when I tried on my device and it looks fine but not for the other devices that are bigger-smaller in screen-sizes</p>
  <p>Thanks in advance</p>
  <p>Here is the code :</p>
  <pre><code>&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;
  android:hardwareAccelerated=&quot;true&quot;
  android:background=&quot;@color/white&quot;
  tools:context=&quot;.MainActivity&quot;&gt;
  
  &lt;View
      android:id=&quot;@+id/view2&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_alignParentStart=&quot;true&quot;
      android:layout_alignParentTop=&quot;true&quot;
      android:layout_marginStart=&quot;0dp&quot;
      android:layout_marginTop=&quot;0dp&quot;
      android:hardwareAccelerated=&quot;true&quot; /&gt;
  
  
  &lt;ImageView
      android:id=&quot;@+id/imageView2&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_alignParentTop=&quot;true&quot;
      android:layout_centerHorizontal=&quot;true&quot;
      android:layout_marginTop=&quot;37dp&quot;
      android:background=&quot;@color/blend&quot;
      android:contentDescription=&quot;@string/todo&quot;
      app:srcCompat=&quot;@drawable/imagelogo&quot; /&gt;
  
  &lt;EditText
      android:id=&quot;@+id/editText&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_alignParentBottom=&quot;true&quot;
      android:layout_centerHorizontal=&quot;true&quot;
      android:layout_marginStart=&quot;58dp&quot;
      android:layout_marginBottom=&quot;294dp&quot;
      android:ems=&quot;10&quot;
      android:hint=&quot;@string/User_name&quot;
      android:inputType=&quot;text&quot; /&gt;
  
  &lt;EditText
      android:id=&quot;@+id/editText2&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_alignParentBottom=&quot;true&quot;
      android:layout_centerHorizontal=&quot;true&quot;
      android:layout_marginEnd=&quot;147dp&quot;
      android:layout_marginBottom=&quot;227dp&quot;
      android:ems=&quot;10&quot;
      android:hint=&quot;@string/Pass_word&quot;
      android:inputType=&quot;textPassword&quot; /&gt;
  
  &lt;Button
      android:id=&quot;@+id/button2&quot;
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:layout_alignParentBottom=&quot;true&quot;
      android:layout_centerHorizontal=&quot;true&quot;
      android:layout_marginStart=&quot;97dp&quot;
      android:layout_marginBottom=&quot;138dp&quot;
      android:ems=&quot;13&quot;
      android:background=&quot;@color/colorPrimary&quot;
      android:text=&quot;@string/login&quot; /&gt;
  </code></pre>
  
  <p>and the output :
  <a href="https://i.stack.imgur.com/sDqM5.png" rel="nofollow noreferrer">Design + Blueprint</a></p>
  <p>So i want all my things at same place in every type of devices</p>