Android: Fragment de superposition, un autre fragment avec semi-transparent

Disons que j'ai 2 fragments, l'un contient une vue de liste et l'autre contient un texte de chargement. Je veux que lorsque je clique sur un élément de la liste, le chargement fragment de texte apparaît en haut de l'affichage de la liste. J'ai ajusté le niveau d'opacité du texte de chargement arrière-plan: android:background="#33FFFFFF" . Mais encore, il montre juste le texte de chargement sur un solide fond gris.

<?xml version="1.0" encoding="utf-8"?>
<ListView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@android:id/list"
    android:background="#e8e9ee"
    android:divider="#ccc"
    android:dividerHeight="1dp"/>

Fragment qui contient un textview:

<?xml version="1.0" encoding="utf-8"?>
<TextView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:text="@string/loadingText"
    android:id="@+id/loadingText"
    android:textColor="#e8e9ee"
    android:background="#33FFFFFF"
    android:layout_centerVertical="true"
    android:layout_centerHorizontal="true" />

Mon code java est fondamentalement quelque chose comme ceci: onItemClick:

 FragmentTransaction transaction=manager.beginTransaction();
 transaction.show(loadingFragment);
 transaction.commit();

OriginalL'auteur Great Question | 2014-10-10