title: UI Alignment - Could not resolve
body: <p>I have tried many ways and i could not get this alignment issue resolved . And i am not sure that where i am going wrong . </p>
  
  <p>My XML :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:gravity="center"
      android:orientation="vertical"
      android:background="@color/popover"&gt;
  
          &lt;TextView
              android:id="@+id/textView1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Large Text"
              android:textColor="#000000"
              android:layout_marginTop="15dp"
              android:layout_marginBottom="2dp"
              android:layout_marginLeft="5dp"
              android:layout_marginRight="5dp"
              android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
          &lt;TextView
              android:id="@+id/textView2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Large Text"
              android:textColor="#000000"
              android:layout_marginLeft="5dp"
              android:layout_marginRight="5dp"
              android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
          &lt;TextView
              android:id="@+id/textView3"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Large Text"
              android:textColor="#000000"
              android:layout_marginTop="2dp"
              android:layout_marginBottom="5dp"
              android:layout_marginLeft="5dp"
              android:layout_marginRight="5dp"
              android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
          &lt;TextView
              android:id="@+id/textView4"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Medium Text"
              android:textColor="#000000"
              android:paddingLeft="20dp"
              android:paddingRight="20dp"
              android:layout_margin="5dp"
              android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
          &lt;TextView
              android:id="@+id/textView5"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Small Text"
              android:textColor="#000000"
              android:layout_margin="5dp"
              android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
          &lt;TextView
              android:id="@+id/textView6"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Small Text"
              android:textColor="#000000"
              android:layout_marginLeft="5dp"
              android:layout_marginRight="5dp"
              android:textAppearance="?android:attr/textAppearanceSmall" /&gt;
  
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:orientation="horizontal"
              android:layout_marginTop="15dp"
              android:layout_marginBottom="10dp"
              android:layout_marginLeft="5dp"
              android:layout_marginRight="5dp" &gt;
  
              &lt;ImageButton
                  android:id="@+id/locationalert_dont"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginLeft="5dp"
                  android:layout_marginRight="5dp"
                  android:background="@drawable/dontallow_btnaction" /&gt;
  
              &lt;ImageButton
                  android:id="@+id/locationalert_ok"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginRight="5dp"
                  android:background="@drawable/ok_btnaction" /&gt;
  
          &lt;/LinearLayout&gt;
  
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And the class file :</p>
  
  <pre><code>public void showLocationDialog()
      {
  
          Dialog dialog = new Dialog(Homescreen.this);
          dialog.setContentView(R.layout.locationalert);
  
          TextView tv1 = (TextView)dialog.findViewById(R.id.textView1);
  
          TextView tv2 = (TextView)dialog.findViewById(R.id.textView2);
  
          TextView tv3 = (TextView)dialog.findViewById(R.id.textView3);
  
          TextView tv4 = (TextView)dialog.findViewById(R.id.textView4);
  
          TextView tv5 = (TextView)dialog.findViewById(R.id.textView5);
  
          TextView tv6 = (TextView)dialog.findViewById(R.id.textView6);
  
          ImageButton ok = (ImageButton)dialog.findViewById(R.id.locationalert_ok);
  
          ImageButton dont = (ImageButton)dialog.findViewById(R.id.locationalert_dont);
  
          dialog.show();
  
      }
  </code></pre>
  
  <p>Actually i have a button in a class and click on it pop-ups this dialog . But the dialog appears as</p>
  
  <p><img src="https://i.stack.imgur.com/hSJ7y.png" alt="enter image description here"></p>
  
  <p>In the Screenshot , i am getting a header black bar along with the pop-up dialog and i am not sure how to remove it .</p>
  
  <p>Any related answers are advisable . Thanks in advance . </p>