title: Custom dialog in android not working
body: <p>I have to implement a custom dialog in my application, But my codes seems not working.
  Please help me.</p>
  
  <p>Thanks in advance.</p>
  
  <p>This is my code:</p>
  
  <pre><code>Context mContext = getApplicationContext();
  Dialog dialog = new Dialog(mContext);
  
  dialog.setContentView(R.layout.custom_dialog);
  dialog.setTitle("Custom Dialog");
  
  TextView text = (TextView) dialog.findViewById(R.id.text);
  text.setText("Hello, this is a custom dialog!");
  ImageView image = (ImageView) dialog.findViewById(R.id.image);
  image.setImageResource(R.drawable.android);
  </code></pre>
  
  <p>And this is my layout</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:id="@+id/layout_root"
                android:orientation="horizontal"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:padding="10dp"
                &gt;
      &lt;ImageView android:id="@+id/image"
                 android:layout_width="wrap_content"
                 android:layout_height="fill_parent"
                 android:layout_marginRight="10dp"
                 /&gt;
      &lt;TextView android:id="@+id/text"
                android:layout_width="wrap_content"
                android:layout_height="fill_parent"
                android:textColor="#FFF"
                /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>