Code example for ListFragment

Methods: getActivity, getArguments, getLoaderManager, onCreate, setListAdapter

0
  private ProviderInterface provider_;
  private String parent_key_;
   
  @Override 
  public void onCreate(Bundle saved_instance_state) {
    super.onCreate(saved_instance_state);
     
    adapter_ = new ItemAdapter(getActivity());
    setListAdapter(adapter_);
     
    Bundle arguments = getArguments();
     
    if (arguments == null) {
      // This is the top level view. 
      provider_ = Application.instance().provider_manager();
    } else { 
      provider_name_ = arguments.getString("provider_name");
      provider_ = Application.instance().provider_manager().ProviderByType(
          provider_name_);
      parent_key_ = arguments.getString("parent_key");
    } 
     
    getLoaderManager().initLoader(0, null, this);
  } 
   
  @Override 
  public void onViewCreated(View view, Bundle saved_instance_state) {
    super.onViewCreated(view, saved_instance_state);