public class OrderForumActivity
extends android.support.v7.app.AppCompatActivity
Modifier and Type | Field and Description |
---|---|
static boolean |
currentBYO |
private Pizza |
currentPizza |
private java.util.HashMap<java.lang.String,java.lang.Integer> |
imageFinder |
private static int |
OFFSET |
private java.util.HashMap<java.lang.String,java.util.ArrayList<Topping>> |
pizzaToppings |
private java.util.HashMap<Topping,java.lang.Boolean> |
selectedToppings |
Constructor and Description |
---|
OrderForumActivity() |
Modifier and Type | Method and Description |
---|---|
void |
addTopping(Topping topping)
Adds a topping to the pizza.
|
private void |
changePizzaImage()
Helper method to change the current pizza image.
|
private void |
changeSize(java.lang.String size)
Helper method to change the size of the pizza.
|
boolean |
checkIfToppingUsed(Topping topping)
Determines if a topping has been used.
|
private void |
defaultPizzaCreate()
Helper method to create a default Pizza.
|
private void |
imageFinderSetup()
Helper method to set up the image search HashMap.
|
boolean |
maxToppings()
Determines if the max amount of toppings have been selected.
|
protected void |
onCreate(Bundle savedInstanceState)
Performs necessary setup when activity is created.
|
private void |
orderButtonSetup()
Helper method to set up the place order button.
|
private void |
pizzaTypeSpinnerSetup()
helper method to create the pizza-type chooser spinner.
|
void |
removeTopping(Topping topping)
Removes a topping from the pizza.
|
private void |
reset(java.lang.String pizzaType,
boolean isChicago)
Resets the page.
|
private void |
sizeSelectorSetup()
Helper method to set up the size selector radio buttons.
|
private void |
toppingSelectorSetup()
Helper method to set up the topping selector recyclerview.
|
private void |
updatePrice()
Helper method to update the current price.
|
addContentView, closeOptionsMenu, dispatchKeyEvent, findViewById, getDelegate, getDrawerToggleDelegate, getMenuInflater, getResources, getSupportActionBar, getSupportParentActivityIntent, invalidateOptionsMenu, onConfigurationChanged, onContentChanged, onCreateSupportNavigateUpTaskStack, onDestroy, onKeyDown, onMenuItemSelected, onMenuOpened, onPanelClosed, onPostCreate, onPostResume, onPrepareSupportNavigateUpTaskStack, onSaveInstanceState, onStart, onStop, onSupportActionModeFinished, onSupportActionModeStarted, onSupportContentChanged, onSupportNavigateUp, onTitleChanged, onWindowStartingSupportActionMode, openOptionsMenu, setContentView, setContentView, setContentView, setSupportActionBar, setSupportProgress, setSupportProgressBarIndeterminate, setSupportProgressBarIndeterminateVisibility, setSupportProgressBarVisibility, setTheme, startSupportActionMode, supportInvalidateOptionsMenu, supportNavigateUpTo, supportRequestWindowFeature, supportShouldUpRecreateTask
dump, getLastCustomNonConfigurationInstance, getLifecycle, getSupportFragmentManager, getSupportLoaderManager, getViewModelStore, onActivityResult, onAttachFragment, onBackPressed, onCreatePanelMenu, onCreateView, onCreateView, onLowMemory, onMultiWindowModeChanged, onNewIntent, onPause, onPictureInPictureModeChanged, onPrepareOptionsPanel, onPreparePanel, onRequestPermissionsResult, onResume, onResumeFragments, onRetainCustomNonConfigurationInstance, onRetainNonConfigurationInstance, onStateNotSaved, setEnterSharedElementCallback, setExitSharedElementCallback, startActivityForResult, startActivityForResult, startActivityFromFragment, startActivityFromFragment, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromFragment, supportFinishAfterTransition, supportPostponeEnterTransition, supportStartPostponedEnterTransition, validateRequestPermissionsRequestCode
public static boolean currentBYO
private Pizza currentPizza
private java.util.HashMap<java.lang.String,java.lang.Integer> imageFinder
private static final int OFFSET
private java.util.HashMap<java.lang.String,java.util.ArrayList<Topping>> pizzaToppings
private java.util.HashMap<Topping,java.lang.Boolean> selectedToppings
public void addTopping(Topping topping)
topping
- the topping.private void changePizzaImage()
private void changeSize(java.lang.String size)
size
- the size.public boolean checkIfToppingUsed(Topping topping)
topping
- the topping.private void defaultPizzaCreate()
private void imageFinderSetup()
public boolean maxToppings()
protected void onCreate(Bundle savedInstanceState)
onCreate
in class android.support.v7.app.AppCompatActivity
savedInstanceState
- the saved information from the last time the activity was accessed.private void orderButtonSetup()
private void pizzaTypeSpinnerSetup()
public void removeTopping(Topping topping)
topping
- the topping.private void reset(java.lang.String pizzaType, boolean isChicago)
pizzaType
- the type of the pizza.isChicago
- whether the pizza is of Chicago-type.private void sizeSelectorSetup()
private void toppingSelectorSetup()
private void updatePrice()