我有一個複選框,當選中它時,它顯示一個微調器,但我無法加載微調器包含的數據。當複選框被選中時,顯示加載器微調器
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