-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
StatusProvider
if(p instanceof FrameLayout){
this.container = (FrameLayout) p;
this.callback.onCreate(0, getStatusView());
}else{
throw new RuntimeException(contentView.getClass().getName() + "必须作为FrameLayout的子元素");
}
在 StatusProvider类的构造方法中添加了
this.callback.onCreate(0, getStatusView());
设置点击事件,无响应
public void onCreate(int status, View statusView) {
TextView tv = (TextView) statusView.findViewById(R.id.btn_retry);
tv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(MainActivity.this, "1231231321", Toast.LENGTH_LONG).show();
}
});
这里的点击事件无法监听。
不知道是怎么回事呢?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels