2011-06-18 17 views
1

我在asynctask中有一個progressdialog,我在飛濺佈局上顯示。如何更改progressdialog的整體大小 - 我想將其縮小爲整體更小。另外,如何移動progressdialog,以便它更直接地顯示在我的佈局底部而不是中間。我已經在另一個應用程序中看到了這一點,但我不確定他們是如何做到的。預先感謝您的幫助。縮小progressdialog

@Override 
protected void onPreExecute() { 
    // TODO Auto-generated method stub 
    super.onPreExecute(); 

    dialog = ProgressDialog.show(Splash.this, 
     getResources().getString(R.string.splashCheckInterenetConnection), 
     getResources().getString(R.string.splashPleaseWait), true); 
} 

佈局:

<?xml version="1.0" encoding="utf-8"?> 
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    > 
    <ImageView 
     android:id="@+id/splashImage" 
     android:src="@drawable/splash" 
     android:adjustViewBounds="true" 
     android:gravity="center_vertical" 
     android:scaleType="fitXY" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
    /> 
</FrameLayout> 

回答

0

#7819235

播放與Android進度風格

<ProgressBar android:layout_width="wrap_content" 
android:layout_height="wrap_content" 
style="?android:attr/progressBarStyleSmall" <-- play with this 
android:layout_gravity="center" /> 

mProgressDialog.setProgressStyle(android.R.attr.progressBarStyleSmall);