前阵子遇到项目需求,需要自己整一个纯数字密码输入键盘,所以也就整出来了,如下图:
其实也就是继承重写了popupwindow。
public class MyPopupWindow extends PopupWindow implements View.OnClickListener { public static final int Num_Zero = 0; public static final int Num_One = 1; public static final int Num_Two = 2; public static final int Num_Three = 3; public static final int Num_Four = 4; public static final int Num_Five = 5; public static final int Num_Six = 6; public static final int Num_Seven = 7; public static final int Num_Eight = 8; public static final int Num_Nine = 9; public static final int Btn_Dismiss = 10; public static final int Btn_Del =