@Override
  public void onStart() {
    super.onStart();
    if (!BaseApplication.isRegistered(this)) BaseApplication.register(this);
    cal = Calendar.getInstance();
    day = cal.get(Calendar.DAY_OF_MONTH);
    month = cal.get(Calendar.MONTH);
    year = cal.get(Calendar.YEAR);

    c = Calendar.getInstance();
    hour = c.get(Calendar.HOUR_OF_DAY);
    minute = c.get(Calendar.MINUTE);
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

    getActivity().invalidateOptionsMenu();
    getActivity().getActionBar().setTitle("To do");
    BaseApplication.register(this);
    layoutInflater = inflater;
    preferences = getActivity().getSharedPreferences("CurrentUser", getActivity().MODE_PRIVATE);
    currentMember =
        Member.createUserFromJson(
            createJsonElementFromString(preferences.getString("current_member", "")));
    GlobalVariables.menuDeep = 1;
    getActivity().onPrepareOptionsMenu(GlobalVariables.menu);
    return null;
  }
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    BaseApplication.register(this);

    SharedPreferences preferences =
        getActivity().getSharedPreferences("CurrentUser", getActivity().MODE_PRIVATE);
    currentUser =
        Member.createUserFromJson(
            createJsonElementFromString(preferences.getString("current_member", "")));
    accessToken = preferences.getString("access_token", "").replace("\"", "");

    PostsAdapter.lastClickedPosts = new ArrayList<Integer>();

    this.inflater = inflater;

    return null;
  }
Beispiel #4
0
  @Override
  public View onCreateView(
      LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    this.inflater = inflater;

    if (getArguments() != null)
      hubToDisplay = (Hub) getArguments().getSerializable(NEW_INSTANCE_HUB_KEY);

    SharedPreferences preferences =
        getActivity().getSharedPreferences("CurrentUser", getActivity().MODE_PRIVATE);
    currentMember =
        Member.createUserFromJson(
            createJsonElementFromString(preferences.getString("current_member", "")));
    accessToken = preferences.getString("access_token", "").replace("\"", "");
    GlobalVariables.menuDeep = 1;
    getActivity().onPrepareOptionsMenu(GlobalVariables.menu);
    BaseApplication.register(this);
    return null;
  }
 @Override
 public void onStop() {
   super.onStop();
   BaseApplication.unregister(this);
 }