Package fi.sportti.app
Class ExerciseDialogOnClickSetter
- java.lang.Object
-
- fi.sportti.app.ExerciseDialogOnClickSetter
-
- All Implemented Interfaces:
android.view.View.OnClickListener
public class ExerciseDialogOnClickSetter extends java.lang.Object implements android.view.View.OnClickListener
Dialog utilities class for onClickEvents on popup layout in one place with complex if methods. Class for reducing code repetition, code rewritten from NewManualExerciseActivity to make it convergent SaveExerciseActivity uses this helper class.
-
-
Constructor Summary
Constructors Constructor Description ExerciseDialogOnClickSetter(android.view.View givePopUp, CounterUtility counterUtility, android.widget.TextView textViewPopUp, android.app.Dialog dialog, android.widget.TextView textViewForData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onClick(android.view.View view)
All of the onClickListeners listed under one method This is done by implementing View.OnClickListenervoid
openGiveAveragePulse()
void
openGiveCalories()
-
-
-
Constructor Detail
-
ExerciseDialogOnClickSetter
public ExerciseDialogOnClickSetter(android.view.View givePopUp, CounterUtility counterUtility, android.widget.TextView textViewPopUp, android.app.Dialog dialog, android.widget.TextView textViewForData)
- Parameters:
givePopUp
- This is view that is layout inflated, meaning it will be used to find views in layoutcounterUtility
- Utility to use image buttons inside of layout'stextViewPopUp
- TextView in the popup,dialog
-textViewForData
- Textview outside of layout, transferring layout data to SaveExerciseActivity
-
-
Method Detail
-
openGiveCalories
public void openGiveCalories()
-
openGiveAveragePulse
public void openGiveAveragePulse()
-
onClick
public void onClick(android.view.View view)
All of the onClickListeners listed under one method This is done by implementing View.OnClickListener- Specified by:
onClick
in interfaceandroid.view.View.OnClickListener
- Parameters:
view
- View that is clicked
-
-