Example #1
0
  @Override
  public View onCreateView(
      @NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    ((AppCompatActivity) getActivity()).getSupportActionBar().show();

    getActivity().setTitle(R.string.meetings);
    contexto = inflater.getContext();
    getActivity().setTitle(R.string.meetings);
    if (ResourcesMan.getJuntas() == null) {
      ResourcesMan.initJuntas();
      SharedPreferences preferences = getActivity().getSharedPreferences("user", 0);
      new getMeetings(
              preferences.getInt(SMEDClient.KEY_ID_GROUP, -1),
              preferences.getInt(
                  SMEDClient.KEY_ID_PARENT,
                  -1) // si es maestro, parentId = -1, entonces se debera obtener todas las juntas
                      // del grupo
              )
          .execute();
    } else {
      adapter =
          new MeetingListAdapter(
              inflater.getContext(), R.layout.list_view_row_report_item, ResourcesMan.getJuntas());
      setListAdapter(adapter);
    }

    return super.onCreateView(inflater, container, savedInstanceState);
  }
Example #2
0
 protected void onPostExecute(Boolean res) {
   adapter =
       new MeetingListAdapter(
           contexto, R.layout.list_view_row_report_item, ResourcesMan.getJuntas());
   setListAdapter(adapter);
 }