public class ProfileFragment extends android.support.v4.app.Fragment implements InSquareProfile.InSquareProfileListener
| Modifier and Type | Field and Description |
|---|---|
private RecyclerProfileSquareAdapter |
adapterOwned |
private TextView |
emptyText |
private static ProfileFragment |
instance |
private BroadcastReceiver |
mMessageReceiver
Receives a notification whenever a square is deleted and updates the view if needed
|
private ImageView |
profileImage |
private android.support.v7.widget.RecyclerView |
squaresRecyclerView |
private static java.lang.String |
TAB_FAVOURITE |
private static java.lang.String |
TAB_OWNED |
private android.support.design.widget.TabLayout |
tabLayout |
private static java.lang.String |
TAG |
private TextView |
username |
| Constructor and Description |
|---|
ProfileFragment() |
| Modifier and Type | Method and Description |
|---|---|
private void |
listShowHide() |
static ProfileFragment |
newInstance() |
void |
onAttach(Context context) |
void |
onCreate(Bundle savedInstanceState) |
View |
onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState)
Initialized the view of this fragment setting the lists of favourite and owned squares
and the profile image(downloading it if not saved in the local storage)
|
void |
onDetach() |
void |
onFavChanged() |
void |
onOwnedChanged() |
void |
onPause() |
void |
onRecentChanged() |
void |
onResume() |
void |
onStart() |
private void |
setupProfile()
Loads, or eventually downlaods, and sets the profile image
|
private void |
setupSwipeGesture()
Manages the swipe on one card from the layout.
|
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isVisible, onActivityCreated, onActivityResult, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onDestroy, onDestroyOptionsMenu, onDestroyView, onHiddenChanged, onInflate, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPrepareOptionsMenu, onRequestPermissionsResult, onSaveInstanceState, onStop, onViewCreated, onViewStateRestored, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, toString, unregisterForContextMenuprivate static ProfileFragment instance
private static final java.lang.String TAG
private static final java.lang.String TAB_OWNED
private static final java.lang.String TAB_FAVOURITE
private android.support.v7.widget.RecyclerView squaresRecyclerView
private RecyclerProfileSquareAdapter adapterOwned
private ImageView profileImage
private TextView username
private TextView emptyText
private android.support.design.widget.TabLayout tabLayout
private BroadcastReceiver mMessageReceiver
public static ProfileFragment newInstance()
public void onAttach(Context context)
onAttach in class android.support.v4.app.Fragmentpublic void onCreate(Bundle savedInstanceState)
onCreate in class android.support.v4.app.Fragmentpublic View onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState)
onCreateView in class android.support.v4.app.FragmentsetupProfile(),
setupSwipeGesture()private void setupProfile()
private void setupSwipeGesture()
public void onStart()
onStart in class android.support.v4.app.Fragmentpublic void onResume()
onResume in class android.support.v4.app.Fragmentprivate void listShowHide()
public void onPause()
onPause in class android.support.v4.app.Fragmentpublic void onDetach()
onDetach in class android.support.v4.app.Fragmentpublic void onOwnedChanged()
onOwnedChanged in interface InSquareProfile.InSquareProfileListenerpublic void onFavChanged()
onFavChanged in interface InSquareProfile.InSquareProfileListenerpublic void onRecentChanged()
onRecentChanged in interface InSquareProfile.InSquareProfileListener