我有一个复选框,当选中它时,它显示一个微调器,但我无法加载微调器包含的数据。当复选框被选中时,显示加载器微调器
llF = (LinearLayout) view.findViewById(R.id.init_tour_foreign_producer_layout);
llF.setVisibility(View.INVISIBLE);
mySpinner = (Spinner)view.findViewById(R.id.spinner_init_tour);
mySpinner.setAdapter(new ArrayAdapter<Tour>(this.getActivity(), android.R.layout.simple_spinner_item, s.getUnstartedTours()));
/*---------- Managing the checkbox ----------*/
cbAllProducer = (CheckBox) view
.findViewById(R.id.enter_collection_check_other_tour);
cbAllProducer
.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton buttonView,
boolean isChecked) {
//checked = isChecked;
if(isChecked){
llF.setVisibility(View.VISIBLE);
//mySpinner.setSelection(1);
}
else{
llF.setVisibility(View.GONE);
}
}
});
getUnstartedTours是否返回任何东西? – 2014-12-02 09:29:08