public class HeadPopuWindow extends Dialog { Context context;//上下文 public HeadPopuWindow(Context context, View view) { super(context, R.style.processDialog); this.context = context; this.setContentView(view); Window window = this.getWindow(); window.setGravity(Gravity.BOTTOM); window.setWindowAnimations(R.style.bottomDialog); window.setLayout(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); }}
============================================================================================
LayoutInflater in = LayoutInflater.from(getApplicationContext()); View view = in.inflate(R.layout.popup_window_call, null); callWindow = new HeadPopuWindow(this, view); tv_callNum = (TextView) view.findViewById(R.id.tv_callNum); view.findViewById(R.id.btn_callNum).setOnClickListener(this); btn_cancleCall = (Button) view.findViewById(R.id.btn_cancleCall); btn_cancleCall.setOnClickListener(this);
点击拍照从下弹出框效果
最新推荐文章于 2020-04-15 10:37:15 发布