package com.arjinmc.widgets;

import android.app.AlertDialog;
import android.content.Context;
import android.os.Bundle;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
import android.view.WindowManager;

/**
 * ScaleProgressDialog
 * @description 
 * @author Eminem Lu
 * @email arjinmc@hotmail.com
 * @date 2015/6/18
 */
public class ScaleProgressDialog extends AlertDialog implements ScaleProgressBar.OnAnimationFinishListener{
	
	private Context mContext;
	private ScaleProgressBar spbProgressBar;
	public int MAX_PROGRESS;

	public ScaleProgressDialog(Context context) {
		super(context);
		this.mContext = context;
	}
	
	public ScaleProgressDialog(Context context, int theme) {
		super(context, theme);
		this.mContext = context;
	}
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		
        Window window = this.getWindow();
        //forbidden dialog drak background 
        WindowManager.LayoutParams lp = window.getAttributes();  
                 lp.dimAmount =0f;
        window.setAttributes(lp);    
        //forbidden dialog animatinon 
        window.setWindowAnimations(0);
        spbProgressBar = new ScaleProgressBar(mContext);
        //set this dailog for callback
        spbProgressBar.setDialog(this);
        MAX_PROGRESS = spbProgressBar.MAX_PROGRESS;
        //init scaleprogressdialog size
        LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
		spbProgressBar.setLayoutParams(params);
		setContentView(spbProgressBar);
	}
	
	public void setProgress(int progress){
		spbProgressBar.setProgress(progress);
	}

	@Override
	public void callDismiss() {
		dismiss();
	}

}

@@ -87,16 +87,95 @@
 ontext;%0A
+import android.graphics.Color;%0Aimport android.graphics.drawable.ColorDrawable;%0A
 import a
@@ -1282,16 +1282,137 @@
 ons(0);%0A
+        //set the dialog for full screen%0A        window.setLayout(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);%0A
         

fix dialog full screen