2016-10-06 18 views
0

ProgressBarだけを含むフルスクリーンのダイアログがあります。ダイアログの背景は良い色で透明ですが、プログレスバーの後ろに透明な背景が設定されていてもオーバーレイがあります。透明な背景を持つAndroidの円形進行

このprogressBarには、ダイアログ?

(私はプライベートの部分の情報をブランク)

enter image description here

はい、私はカスタムビューを使用しますが、私はデフォルトのProgressBarおよびカスタム1の両方でテストされ、私は同じ動作を取得。活動中のダイアログの

私もDialogFragmentでテストし、同じ結果

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:background="@color/black_transparent" 
    android:gravity="center" 
    android:orientation="vertical"> 

    <com.wang.avi.AVLoadingIndicatorView 
     android:id="@+id/progressBar" 
     android:layout_width="@dimen/pop_button_height" 
     android:layout_height="@dimen/pop_button_height" 
     android:background="@color/black_transparent" 
     android:visibility="visible" 
     app:indicatorColor="@color/colorPrimaryDark" 
     app:indicatorName="BallSpinFadeLoaderIndicator" /> 

</LinearLayout> 

作成:

mProgressDialog = new Dialog(this); 
    View view = LayoutInflater.from(this).inflate(R.layout.dialog_loading_overlay, null); 
    mProgressDialog.setCancelable(false); 
    mProgressDialog.requestWindowFeature(Window.FEATURE_NO_TITLE); 
    mProgressDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); 
    mProgressDialog.setContentView(view); 
    mProgressDialog.show(); 

答えて

0

はこれを試してみてください、それはかもしれあなた

mProgressDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT)); 

のための作品編集

AVLoadingIndicatorViewでandroid:background="@color/black_transparent"を削除し、あなたが(警告が来た場合には)そのために背景を入れて、私はあなたの変更で私の質問を更新しました。このandroid:background="@android:color/transparent"

+0

を使用したい場合は

オプション

を試してみてください。透過性はありますが、背景レイアウトと同じではありません。 –

+0

結果はまだ暗いです。 –

関連する問題