Example #1
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_debtors, container, false);

    // Set the adapter
    mListView = (AbsListView) view.findViewById(android.R.id.list);
    ((AdapterView<ListAdapter>) mListView).setAdapter(mAdapter);

    // Set OnItemClickListener so we can be notified on item clicks
    mListView.setOnItemClickListener(this);
    mListView.setOnItemLongClickListener(this);
    mListView.setEmptyView(view.findViewById(android.R.id.empty));

    return view;
  }
Example #2
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_log, container, false);

    setHasOptionsMenu(true);

    // Set the adapter
    mListView = (AbsListView) view.findViewById(android.R.id.list);

    // Set OnItemClickListener so we can be notified on item clicks
    mListView.setOnItemClickListener(this);

    View emptyView = view.findViewById(R.id.internalEmpty);
    mListView.setEmptyView(emptyView);

    mListContainer = view.findViewById(R.id.listContainer);
    mProgressContainer = view.findViewById(R.id.progressContainer);
    mListShown = true;
    return view;
  }