我下面的代码是用来创建 scollView,如何检查 if 语句中是否有存在一个 scrollView?
public void tickBox(int i){
//Create GUI
LinearLayout mainView = (LinearLayout) findViewById(R.id.MainLayout);
ScrollView sc = new ScrollView(this);
sc.setId(i + 100);
if (/*If statement to be made*/){
mainView.addView(sc);
}
//My other code
}