public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mQueryHandler = new AsyncQueryHandler(getActivity().getContentResolver()) {}; code = getArguments().getString(ProfileActivity.PROFILE_CODE); if (code == null) code = AccountUtils.getActiveUserCode(getActivity()); // You can't friend yourself if (code.equals(AccountUtils.getActiveUserCode(getActivity()))) friend.setVisibility(View.GONE); else getActivity().getSupportLoaderManager().initLoader(FRIEND_LOADER, null, new FriendChecker()); getActivity().getSupportLoaderManager().initLoader(PROFILE_LOADER, null, this); }
@Override protected void onRepeat() { super.onRepeat(); setRefreshActionItemState(true); SigarraSyncAdapterUtils.syncProfile( AccountUtils.getActiveUserName(getActivity()), code, SifeupAPI.EMPLOYEE_TYPE); }
public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == R.id.menu_refresh) { setRefreshActionItemState(true); SigarraSyncAdapterUtils.syncProfile( AccountUtils.getActiveUserName(getActivity()), code, SifeupAPI.EMPLOYEE_TYPE); return true; } return super.onOptionsItemSelected(item); }
@Override public Loader<Cursor> onCreateLoader(int loaderId, Bundle options) { return new CursorLoader( getActivity(), SigarraContract.Friends.CONTENT_URI, SigarraContract.Friends.FRIENDS_COLUMNS, SigarraContract.Friends.FRIEND_SELECTION, SigarraContract.Friends.getFriendSelectionArgs( AccountUtils.getActiveUserCode(getActivity()), code), null); }
@Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); personCode = getArguments().getString(PROFILE_CODE); if (personCode == null) personCode = AccountUtils.getActiveUserCode(getActivity()); if (savedInstanceState != null) { final Parcelable[] storedFiles = savedInstanceState.getParcelableArray(FILES_KEY); if (storedFiles == null) { task = DynamicEmailUtils.getDynamicEmailFiles(personCode, this, getActivity()); } else { files = new DynamicMailFile[storedFiles.length]; for (int i = 0; i < storedFiles.length; ++i) files[i] = (DynamicMailFile) storedFiles[i]; if (populateList()) showMainScreen(); } } else task = DynamicEmailUtils.getDynamicEmailFiles(personCode, this, getActivity()); }