title: Transparent background on custom Dialog
body: <p>I'm trying to get a transparent backgroud on my custon Dialog, but I can't get it done on android 4.4.4. It only works on an Android 5.1.</p>
  
  <p>The result I'm looking for is this: 
  <a href="http://www.americocarelli.com.br/android_5.1.png" rel="nofollow">http://www.americocarelli.com.br/android_5.1.png</a></p>
  
  <p>But I get this:<a href="http://www.americocarelli.com.br/android_4.4.4.png" rel="nofollow">http://www.americocarelli.com.br/android_4.4.4.png</a></p>
  
  <p>This is my custom layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/dialogo_layout_root"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@color/transparente"
      android:windowBackground="@color/transparente"&gt;
  
      &lt;TextView
          android:id="@+id/titulo_dialogo"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:gravity="center_horizontal"
          android:paddingStart="@dimen/paddingStartEnd"
          android:paddingEnd="@dimen/paddingStartEnd"
          android:paddingTop="@dimen/paddingTopBottom"
          android:paddingBottom="@dimen/paddingTopBottom"
          android:background="@color/fundoEscuro"
          android:textSize="@dimen/abc_text_size_title_material_toolbar"/&gt;
  
      &lt;ImageView
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/drawer_shadow_down"
          android:layout_below="@id/titulo_dialogo"
          android:contentDescription="@string/..."/&gt;
  
      &lt;TextView
          android:id="@+id/mensagem_dialogo"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/titulo_dialogo"
          android:paddingStart="@dimen/paddingStartEnd"
          android:paddingEnd="@dimen/paddingStartEnd"
          android:paddingTop="8dp"
          android:paddingBottom="@dimen/paddingTopBottom"
          android:background="@color/transparente"/&gt;
  
      &lt;TableLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_below="@id/mensagem_dialogo"
          android:layout_alignParentStart="true"
          android:shrinkColumns="*"
          android:stretchColumns="*"&gt;
  
          &lt;TableRow&gt;
              &lt;Button
                  android:id="@+id/BotaoNegativo"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:background="@drawable/button_shape"
                  android:textAllCaps="false"/&gt;
  
              &lt;Button
                  android:id="@+id/BotaoPositivo"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:background="@drawable/button_shape"
                  android:textAllCaps="false"/&gt;
          &lt;/TableRow&gt;
      &lt;/TableLayout&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>On my style.xml, I got this definition:</p>
  
  <pre><code>&lt;color name="transparente"&gt;#00FFFFFF&lt;/color&gt;
  </code></pre>
  
  <p>And this is the code:</p>
  
  <pre><code>public class Dialogos extends DialogFragment {
      private static final String PARAMETRO_TITULO = "titulo";
      private static final String PARAMETRO_MENSAGEM = "mensagem";
      private static final String PARAMETRO_TXT_BTN_POSITIVO = "txtBtnPositivo";
      private static final String PARAMETRO_TXT_BTN_NEGATIVO = "txtBtnNegativo";
  
      public Dialogos(){
      }
  
      public static Dialogos newInstance(int titulo, int mensagem, int txtBtnPositivo, int txtBtnNegativo) {
          Dialogos fragment = new Dialogos();
          Bundle args = new Bundle();
  
          args.putInt(PARAMETRO_TITULO, titulo);
          args.putInt(PARAMETRO_MENSAGEM, mensagem);
          args.putInt(PARAMETRO_TXT_BTN_POSITIVO, txtBtnPositivo);
          args.putInt(PARAMETRO_TXT_BTN_NEGATIVO, txtBtnNegativo);
  
          fragment.setArguments(args);
  
          return fragment;
      }
  
      @Override
      public Dialog onCreateDialog(Bundle savedInstanceState) {
          int titulo = getArguments().getInt(PARAMETRO_TITULO);
          int mensagem = getArguments().getInt(PARAMETRO_MENSAGEM);
          int txtBtnPositivo = getArguments().getInt(PARAMETRO_TXT_BTN_POSITIVO);
          int txtBtnNegativo = getArguments().getInt(PARAMETRO_TXT_BTN_NEGATIVO);
  
          Typeface fonte = Typeface.createFromAsset(getActivity().getAssets(), "Fonts/RegencieLightAlt.ttf");
  
          final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
  
          LayoutInflater inflater = getActivity().getLayoutInflater();
          View view = inflater.inflate(R.layout.mensagem_dialogo, null);
          TextView tvTitulo = (TextView) view.findViewById(R.id.titulo_dialogo);
          TextView tvMensagem = (TextView) view.findViewById(R.id.mensagem_dialogo);
  
          tvTitulo.setTypeface(fonte);
          tvMensagem.setTypeface(fonte);
  
          if (titulo != 0)
              tvTitulo.setText(titulo);
  
          Button btnPositivo = (Button) view.findViewById(R.id.BotaoPositivo);
          Button btnNegativo = (Button) view.findViewById(R.id.BotaoNegativo);
  
          tvMensagem.setText(mensagem);
  
          btnPositivo.setTypeface(fonte);
          btnNegativo.setTypeface(fonte);
  
          btnPositivo.setText(txtBtnPositivo);
          btnNegativo.setText(txtBtnNegativo);
  
          btnPositivo.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
              getTargetFragment().onActivityResult(getTargetRequestCode(), Activity.RESULT_OK, getActivity().getIntent());
              }
          });
  
          btnNegativo.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
              getTargetFragment().onActivityResult(getTargetRequestCode(), Activity.RESULT_CANCELED, getActivity().getIntent());
              }
          });
  
          builder.setView(view);
  
          return builder.create();
      }
  }
  </code></pre>