Code example for ListFragment

Methods: setArguments

0
        MainListFragment f = new MainListFragment();
         
        // Supply index input as an argument 
        Bundle args = new Bundle();
        args.putInt("mExampleId", regionId);
        f.setArguments(args);
         
        return f;
    } 
 
    /** 
     * make sure the activity has implemented the fragmentupdatelistener 
     * @param activity our activity 
     */ 
    @Override 
    public void onAttach(Activity activity) {
        super.onAttach(activity);
 
        try { 
            mCallback = (SecondListFragment.OnFragmentUpdateListener) activity;
        } catch (ClassCastException e) {