@Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    mContext = getActivity();

    filter = false;

    mainActivity = (MainActivity) getActivity();

    mainListView = (LinearLayout) inflater.inflate(R.layout.fragment_main_list, container, false);
    stub = (ViewStub) mainListView.findViewById(android.R.id.empty);
    stub.setLayoutResource(R.layout.task_empty_stub);

    header = (TextView) mainListView.findViewById(R.id.header);
    header.setText(R.string.tasks);

    setHasOptionsMenu(true);
    taskListAdapter = new TaskListAdapter(mContext, null, "Mine");
    taskListAdapter.setAutoload(false);
    setListAdapter(taskListAdapter);
    taskListAdapter.addOnQueryLoadListener(this);
    taskListAdapter.loadObjects();

    return mainListView;
  }
Exemplo n.º 2
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);
    View view = inflater.inflate(R.layout.fragment_visitor_list, container, false);

    getActivity().setTitle("Last Visitors");
    String[] from = {};
    int[] to = {};
    mLoader.initLoader(0, null, this);
    mAdapter = new VisitorsViewAdapter(getActivity(), R.layout.row_visitor, cur, from, to, this);
    setListAdapter(mAdapter);

    return view;
  }
Exemplo n.º 3
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    View view = inflater.inflate(R.layout.pod_fragment_layout, container, false);

    /* Add the 'All Podcasts' header and empty views. */

    ListView listView = (ListView) view.findViewById(android.R.id.list);
    listView.addHeaderView(allPodcasts);
    listView.setEmptyView(getLayoutInflater(getArguments()).inflate(R.layout.pod_list_empty, null));

    return view;
  }