title: Dialog is not displaying textview & imageview
body: <p>I am new to android world and am working on dialog and in that I am trying to create a text view, button and imageview, but it is neither showing me error nor textview or imageview. It is showing a button. Here is the image:</p>
  
  <p><img src="https://i.stack.imgur.com/b5kXY.png" alt="dialouge">.</p>
  
  <p>But i am want to display my dialogue as follows </p>
  
  <p><img src="https://i.stack.imgur.com/osAno.png" alt="need as this"></p>
  
  <p>My xml file is as follows ....</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:id="@+id/RelativeLayout1"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="#FFFFFF"
      tools:context=".AddFriendsCustomActivity"&gt;
  
      &lt;ImageView
          android:id="@+id/add"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_above="@+id/submit_dialog"
          android:layout_alignParentRight="true"
          android:layout_marginRight="37dp"
          android:contentDescription="@string/add_Friend"
          android:src="@drawable/add" /&gt;
  
      &lt;Button
          android:id="@+id/submit_dialog"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerVertical="true"
          android:layout_marginRight="64dp"
          android:layout_toLeftOf="@+id/add"
          android:text="@string/submit" /&gt;
  
      &lt;EditText
          android:id="@+id/writename"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignBottom="@+id/add"
          android:layout_marginRight="17dp"
  
          android:layout_toLeftOf="@+id/add"
          android:ems="10" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I am calling it in java file as follows</p>
  
  <pre><code>dialog = new Dialog(context);
                       LayoutInflater li = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  
                          View view = li.inflate(R.layout.activity_add_friends_dialog, null, false);
                          dialog.setContentView(view);
                          dialog.setCancelable(true);
                      //dialog.setContentView(R.layout.activity_add_friends_dialog);
                      //dialog.setTitle("Add Friends");
                      add= (ImageView) dialog.findViewById(R.id.add);
                      friends1 = (TextView) dialog.findViewById(R.id.writename);
                      submit_dialog = (Button) dialog.findViewById(R.id.submit_dialog);
                      add.setOnClickListener(new OnClickListener() {
  
                          @Override
                          public void onClick(View arg0) {
  
                              try {
                                  friendsCount++;
                                              Log.d("addFriendsActivity", "ashish comes here ");
                              } catch (Exception e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                              }
  
  
                          }
                      });
  
                      submit_dialog.setOnClickListener(new OnClickListener() {
  
                          @Override
                          public void onClick(View arg0) {
  
                              Intent i = new Intent(AddFriendsActivity.this, DetailsFriendsActivity.class);
                              startActivity(i);
  
                          }
                      });
                      dialog.show();   
  </code></pre>
  
  <p>After some google I understand that the issues might be in r.java or you have imported android .r  but i have not done any thing in this ..
  Thanks in advance.... :)</p>