popview

默认主控制器

我是研究僧i 提交于 2020-12-10 11:30:32
// // WYBaseViewController.swift // live // // Created by 王武 on 2020/12/7. // import UIKit class WYBaseViewController: UIViewController { // 状态栏背景色 lazy var statusView: UIView = { let view = UIView() view.backgroundColor = kMainOrangeColor view.frame = CGRect(x: 0, y: 0, width: kScreenW, height: kScreenH) // 设置背景渐变 let gradientLayer: CAGradientLayer = CAGradientLayer() gradientLayer.colors = kGradientColors //(这里的起始和终止位置就是按照坐标系,四个角分别是左上(0,0),左下(0,1),右上(1,0),右下(1,1)) //渲染的起始位置 gradientLayer.startPoint = CGPoint.init(x: 0, y: 0) //渲染的终止位置 gradientLayer.endPoint = CGPoint.init(x: 1, y: 0) /

安卓中的PopupWindow弹框

為{幸葍}努か 提交于 2020-08-07 21:13:24
PopupWindow View pop_view = LayoutInflater.from(MoviePlayActivity.this).inflate(R.layout.moviedetail_pop,null);//PopupWindow对象 //获取当前activity的布局 popupWindow=new PopupWindow(MoviePlayActivity.this);//初始化PopupWindow对象 popupWindow.setContentView(pop_view);//设置PopupWindow布局文件 popupWindow.setWidth(ViewGroup.LayoutParams.MATCH_PARENT);//设置PopupWindow宽 popupWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);//设置PopupWindow高 // 在外边可以点击,并让popWindow消失 popupWindow.setOutsideTouchable(true); popupWindow.setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); popupWindow.showAsDropDown(mVideoView,