public class BottomNavActivity extends android.support.v7.app.AppCompatActivity implements BottomSheetItemAdapter.BottomSheetItemListener
Modifier and Type | Class and Description |
---|---|
private static class |
BottomNavActivity.TABS |
Modifier and Type | Field and Description |
---|---|
static int[] |
backgroundColors |
com.aurelhubert.ahbottomnavigation.AHBottomNavigation |
bottomNavigation |
private android.support.design.widget.BottomSheetDialog |
bottomSheetDialog |
android.support.design.widget.CoordinatorLayout |
coordinatorLayout |
static java.lang.String |
INITIALS_COLOR_TAG |
static java.lang.String |
INITIALS_TAG |
FrameLayout |
mainContentFrame |
private BroadcastReceiver |
mMessageReceiver
The broadcast receiver which receives the notification and calls calculateNotification() to elaborate the view
|
private InSquareProfile |
mProfile |
private com.aurelhubert.ahbottomnavigation.AHBottomNavigation.OnTabSelectedListener |
mTabSelectedListener |
private static int |
PLAY_SERVICES_RESOLUTION_REQUEST |
private static java.lang.String |
TAG |
Constructor and Description |
---|
BottomNavActivity() |
Modifier and Type | Method and Description |
---|---|
private void |
calculateNotifications()
Shows in the bottom bar how many notification are unread by the user
|
private boolean |
checkPlayServices()
Check the device to make sure it has the Google Play Services APK.
|
private java.util.List<BottomSheetItem> |
instantiateListMenu(Square square)
Creates the menu items for a given square
|
void |
onActivityResult(int requestCode,
int resultCode,
Intent data) |
void |
onBackPressed() |
void |
onBottomMenuItemClick(BottomSheetItem item,
RecyclerSquareAdapter fragmentListElementAdapter,
int listHolderPosition)
Manages the long press on a Square from the ProfileFragment, FavSquaresFragment or RecentSquaresFragment giving the user the possibility to share the Square
or to mute the notification for that particular square
|
protected void |
onCreate(Bundle savedInstanceState)
Sets up the buttons and loads the MapFragment: the first fragment which will be shown to the user.
|
void |
onDestroy() |
void |
onNewIntent(Intent intent) |
void |
onResume() |
void |
onStop() |
private void |
setupBottomNavigation()
Sets up the icons for the bottom navigation bar and manages the tap on those buttons
|
void |
showBottomSheetDialog(Square square,
RecyclerSquareAdapter adapter,
int viewHolderPosition)
It shows the bottom sheet dialog corresponding to the long press of an element in the RecyclerView.
|
addContentView, dispatchKeyEvent, findViewById, getDelegate, getDrawerToggleDelegate, getMenuInflater, getSupportActionBar, getSupportParentActivityIntent, invalidateOptionsMenu, onConfigurationChanged, onContentChanged, onCreateSupportNavigateUpTaskStack, onMenuItemSelected, onMenuOpened, onPanelClosed, onPostCreate, onPostResume, onPrepareSupportNavigateUpTaskStack, onSaveInstanceState, onSupportActionModeFinished, onSupportActionModeStarted, onSupportContentChanged, onSupportNavigateUp, onTitleChanged, onWindowStartingSupportActionMode, setContentView, setContentView, setContentView, setSupportActionBar, setSupportProgress, setSupportProgressBarIndeterminate, setSupportProgressBarIndeterminateVisibility, setSupportProgressBarVisibility, setTheme, startSupportActionMode, supportInvalidateOptionsMenu, supportNavigateUpTo, supportRequestWindowFeature, supportShouldUpRecreateTask
dump, getLastCustomNonConfigurationInstance, getSupportFragmentManager, getSupportLoaderManager, getSupportMediaController, onAttachFragment, onCreatePanelMenu, onKeyDown, onLowMemory, onPause, onPrepareOptionsPanel, onPreparePanel, onRequestPermissionsResult, onResumeFragments, onRetainCustomNonConfigurationInstance, onRetainNonConfigurationInstance, onStart, onStateNotSaved, setEnterSharedElementCallback, setExitSharedElementCallback, setSupportMediaController, startActivityForResult, startActivityFromFragment, startActivityFromFragment, supportFinishAfterTransition, supportPostponeEnterTransition, supportStartPostponedEnterTransition, validateRequestPermissionsRequestCode
private static final java.lang.String TAG
public static final java.lang.String INITIALS_TAG
public static final java.lang.String INITIALS_COLOR_TAG
public static int[] backgroundColors
public com.aurelhubert.ahbottomnavigation.AHBottomNavigation bottomNavigation
public FrameLayout mainContentFrame
public android.support.design.widget.CoordinatorLayout coordinatorLayout
private android.support.design.widget.BottomSheetDialog bottomSheetDialog
private com.aurelhubert.ahbottomnavigation.AHBottomNavigation.OnTabSelectedListener mTabSelectedListener
private InSquareProfile mProfile
private static final int PLAY_SERVICES_RESOLUTION_REQUEST
private BroadcastReceiver mMessageReceiver
calculateNotifications()
protected void onCreate(Bundle savedInstanceState)
onCreate
in class android.support.v7.app.AppCompatActivity
MapFragment
,
ChatService
public void onNewIntent(Intent intent)
onNewIntent
in class android.support.v4.app.FragmentActivity
public void onResume()
onResume
in class android.support.v4.app.FragmentActivity
public void onStop()
onStop
in class android.support.v7.app.AppCompatActivity
public void onActivityResult(int requestCode, int resultCode, Intent data)
onActivityResult
in class android.support.v4.app.FragmentActivity
private void calculateNotifications()
private boolean checkPlayServices()
private java.util.List<BottomSheetItem> instantiateListMenu(Square square)
square
- private void setupBottomNavigation()
public void showBottomSheetDialog(Square square, RecyclerSquareAdapter adapter, int viewHolderPosition)
square
- the element that's being pressedadapter
- the RecyclerView adapter that refers to this elementviewHolderPosition
- position in the RecyclerViewpublic void onDestroy()
onDestroy
in class android.support.v7.app.AppCompatActivity
public void onBottomMenuItemClick(BottomSheetItem item, RecyclerSquareAdapter fragmentListElementAdapter, int listHolderPosition)
onBottomMenuItemClick
in interface BottomSheetItemAdapter.BottomSheetItemListener
ProfileFragment
,
FavSquaresFragment
,
RecentSquaresFragment
public void onBackPressed()
onBackPressed
in class android.support.v4.app.FragmentActivity