protected void showpopupwindow() {
View contentView = LayoutInflater.from(context).inflate(R.layout.popup_view_layout, null);
popupWindow = new PopupWindow(contentView,
LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
...........................
...........................
...........................
}
网上的例子都是showpopupwindow()这样的函数调用 现在想把这个 函数写在一个类里面,实现多个类都可以调用这一个函数,想请教一下把此方法放在类中 View contentView = LayoutInflater.from(context).inflate(R.layout.popup_view_layout, null);这句话要如何修改呢