Android ProgressBar .xml de Mise en page

J'ai ce pour une XML fichier:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <ProgressBar
        android:id="@+id/progressbar"
        style="?android:attr/progressBarStyleLarge"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical|center_horizontal"
        android:visibility="visible" />

    <WebView
        android:id="@+id/web_engine"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:visibility="gone" />

</LinearLayout>

Et je veux le ProgressBar à la Large style, et être centré au milieu de l'écran à la verticale et à l'horizontale... Quand je layout_width et height à fill_parent, il augmente la taille de l'effectif de chargement touche de navigation pour la totalité de l'écran... Comment puis-je faire la mise en page s'adapter à la totalité de l'écran et le centre de l'effectif de l'icône de chargement?

essayez android:layout_gravity="center"

OriginalL'auteur tcd | 2012-09-05