コード例 #1
0
  @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);
  }
コード例 #2
0
  @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;
  }
コード例 #3
0
  @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;
  }
コード例 #4
0
ファイル: OneHubFragment.java プロジェクト: cmoissam/cafe_AMI
  @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;
  }
コード例 #5
0
 @Override
 public void onStop() {
   super.onStop();
   BaseApplication.unregister(this);
 }