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, unregisterForContextMenu
private 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.Fragment
public void onCreate(Bundle savedInstanceState)
onCreate
in class android.support.v4.app.Fragment
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
onCreateView
in class android.support.v4.app.Fragment
setupProfile()
,
setupSwipeGesture()
private void setupProfile()
private void setupSwipeGesture()
public void onStart()
onStart
in class android.support.v4.app.Fragment
public void onResume()
onResume
in class android.support.v4.app.Fragment
private void listShowHide()
public void onPause()
onPause
in class android.support.v4.app.Fragment
public void onDetach()
onDetach
in class android.support.v4.app.Fragment
public void onOwnedChanged()
onOwnedChanged
in interface InSquareProfile.InSquareProfileListener
public void onFavChanged()
onFavChanged
in interface InSquareProfile.InSquareProfileListener
public void onRecentChanged()
onRecentChanged
in interface InSquareProfile.InSquareProfileListener