title: Android LayoutInflater not working
body: <p>I created an xml file (a dialog) and I wanted to reduce it with LayoutInflater but its always big almost as my screen. Here's the code:</p>
  
  <pre><code>protected Dialog onCreateDialog(int id) {
       switch(id) {
       case NICKNAME_DIALOG_ID:
           LayoutInflater inflater = (LayoutInflater) 
                   getSystemService(Context.LAYOUT_INFLATER_SERVICE);
               final View layout = inflater.inflate(R.layout.nickname_dialog, 
                   (ViewGroup) findViewById(R.id.linearLayout_root));
               final EditText nickname =   
                  (EditText)findViewById(R.id.editText_nickname);   
  
              AlertDialog.Builder nicknameBuilder = new AlertDialog.Builder(this);
              nicknameBuilder.setView(layout);
              nicknameBuilder.setTitle(R.string.nicname_dialog_title);
  
              nicknameBuilder.setNegativeButton(R.string.nickname_dialog_cancel, 
                  new DialogInterface.OnClickListener() {
                  @SuppressWarnings("deprecation")
          public void onClick(DialogInterface dialog, int whichButton) {                      
                      SettingsActivity.this.removeDialog(NICKNAME_DIALOG_ID);
                  }
              });
  
              nicknameBuilder.setPositiveButton(R.string.nickname_dialog_ok, 
                  new DialogInterface.OnClickListener() {
                  @SuppressWarnings("deprecation")
              public void onClick(DialogInterface dialog, int which) {
                      String text = nickname.getText().toString();
                      Editor editor = m_GameSettings.edit();
                      editor.putString(VolimHrvatsku.GAME_PREFERENCES_NICKNAME,
                              text);
                      editor.commit();
                      SettingsActivity.this.removeDialog(NICKNAME_DIALOG_ID);
                  }
              });
              AlertDialog nicknameDialog = nicknameBuilder.create();
              return nicknameDialog;
  
       }
  
      return null;
  
  }
  </code></pre>
  
  <p>nickname dialog 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:id="@+id/linearLayout_root"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@drawable/sahovnica"
  android:orientation="vertical" &gt;
  
  &lt;TextView
      android:id="@+id/textView_enter_nickname"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/settings_enter_nick"
      android:textColor="@color/dark_grey"
      android:textSize="@dimen/scores_text_dim"
      android:textStyle="bold" /&gt;
  
  &lt;EditText
      android:id="@+id/editText_nickname"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:ems="10" &gt;
  
      &lt;requestFocus /&gt;
  &lt;/EditText&gt;
  
  &lt;RelativeLayout
      android:id="@+id/relativeLayout_nickname"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" &gt;
  
  &lt;/RelativeLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>email dialog 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:id="@+id/linearLayout_email"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:background="@drawable/sahovnica"
  android:orientation="vertical" &gt;
  
  &lt;TextView
      android:id="@+id/textView_body"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="@string/email_dialog_text"
      android:textColor="@color/dark_grey"
      android:textSize="@dimen/scores_text_dim"
      android:textStyle="bold" /&gt;
  
  &lt;EditText
      android:id="@+id/editText_body"
      android:layout_width="match_parent"
      android:layout_height="150dp"
      android:ems="10" &gt;
  
      &lt;requestFocus /&gt;
  &lt;/EditText&gt;
  
  &lt;RelativeLayout
      android:id="@+id/relativeLayout_email"
      android:layout_width="match_parent"
      android:layout_height="wrap_content" &gt;
  
  &lt;/RelativeLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And I would like to ask btw, if it is possible to change the look of YES and NO buttons in AlertDialog?
  Thanks in advance...</p>