30 lines
811 B
Java
30 lines
811 B
Java
package com.cege.games.release.dialog;
|
|
|
|
import android.app.Dialog;
|
|
import android.content.Context;
|
|
import android.view.Window;
|
|
import android.view.WindowManager;
|
|
|
|
import com.cege.games.release.R;
|
|
|
|
public class BaseDialog extends Dialog {
|
|
|
|
public BaseDialog(Context context, int themeResId) {
|
|
super(context, R.style.DialogStyle);
|
|
Window win = getWindow();
|
|
// win.setWindowAnimations(R.style.Dialog_bottom_enter_ani);
|
|
// win.getDecorView().setPadding(0, 0, 0, 0);
|
|
// win.setGravity(Gravity.BOTTOM);
|
|
WindowManager.LayoutParams lp = win.getAttributes();
|
|
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
|
|
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
|
win.setAttributes(lp);
|
|
}
|
|
|
|
public BaseDialog(Context context) {
|
|
this(context, 0);
|
|
}
|
|
|
|
|
|
}
|