Code example for Fragment

Methods: getActivityonActivityCreated

0
                ProgressPanelDemoFragment.getArguments(ProgressPanelDemoFragment.ProgressPanelType.CUSTOM))); 
    } 
 
    @Override 
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
 
        adapter = new SimpleAdapter(getActivity(), demos, android.R.layout.simple_list_item_1, new String[]{"label"},
                new int[]{android.R.id.text1});
 
        listView.setAdapter(adapter);
        listView.setOnItemClickListener(this);
    } 
 
    @Override 
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        if (activity instanceof OnDemoSelectedListener) {
            demoSelectedListener = (OnDemoSelectedListener) activity;
        } 
    }