如果mainXML里包含一个自定义view和一个button,如何在自定义view类里使用这个button,
用过findviewbyid,返回是null。
使用View view=LayoutInflater.from(context).inflate(R.layout.main, null); view.findviewbyid也是不行。
用过findviewbyid,返回是null。
使用View view=LayoutInflater.from(context).inflate(R.layout.main, null); view.findviewbyid也是不行。