Demo entry 6717274

kj

   

Submitted by ys on Feb 24, 2018 at 07:00
Language: Java. Code size: 693 Bytes.

public class TabExample extends KJActivity {
	@BindView(id = R.id.bottombar_content1)
	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("widget clicked listener");
	}
	
	@Override
	public void widgetClick(View v) {
		super.widgetClick(v);
		switch (v.getId()) {
		case R.id.bottombar_content1:
		ViewInject.toast("clicked mRbtn1");
			break;
		case R.id.bottombar_content2:
		ViewInject.toast("clicked mRbtn2");
			break;
		}
	}
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).