Android自定义的弹窗
package com.microduino.qoobot.view; import android.app.Activity; import android.app.Dialog; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.Window; import android.view.WindowManager; import com.microduino.qoobot.R; /* * :Created by z on 2019/1/16 */ public abstract class BaseDialog { private Dialog dialog; private Activity activity; public BaseDialog(Activity activity,int res){ dialog = new Dialog(activity, R.style.BuildDialog); LayoutInflater inflater = LayoutInflater.from(activity); View view = inflater.inflate(res, null);