本实例弹出窗口主要是继承PopupWindow类来实现的弹出窗体,布局可以根据自己定义设计.弹出效果主要使用了translate和alpha样式实现,具体实习如下: 第一步:设计弹出窗口xml: Xml代码 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android&qu
参考网上文章: http://www.2cto.com/kf/201503/383397.html http://www.apkbus.com/android-176726-1-1.html public class CYTextView extends TextView { public static int m_iTextHeight; // 文本的高度 public static int m_iTextWidth;// 文本的宽度 private Paint mPaint = null;
public class MyDialog extends Dialog implements android.view.View.OnClickListener{ private Button cancel; Context context; View localView; private RelativeLayout clearallpan; protected MyDialog(Context context) { super(context); this.context = contex