在活动中,我有:
public class tabsmain extends Activity{
public static Context appContext;
public boolean lf_ch=false;
public void onCreate(Bundle savedInstanceState){
我想访问并可能更改来自 tabsmain 内部片段的 lf _ ch;
public class tabquests extends Fragment{
public CheckBox lc;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)//onCreateView
{
lc.setChecked(//set it to lf_ch);
但是,我似乎无法访问 lf _ ch 的值。