public class TabExample extends KJActivity { @BindView(id = R.id.bottombar_content1, click = true) public RadioButton mRbtn1; @BindView(id = R.id.bottombar_content2, click = true) private RadioButton mRbtn2; @Override public void setRootView() { setContentView(R.layout.aty_tab_example); } @Override protected void initWidget() { super.initWidget(); mRbtn1.setText("控件已经初始化绑定并设置了监听"); } @Override public void widgetClick(View v) { super.widgetClick(v); switch (v.getId()) { case R.id.bottombar_content1: ViewInject.toast("点击了mRbtn1"); break; case R.id.bottombar_content2: ViewInject.toast("点击了mRbtn2"); break; } } }
setRootView();
@BindView
initDataFromThread();(异步调用,可做耗时操作)
threadDataInited();(initDataFromThread执行完成后才会回调)
initData();
initWidget();
registerBroadcast();
时间: 2024-10-22 22:35:35