Class 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.OnClickListener
      void openGiveAveragePulse()  
      void openGiveCalories()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 layout
        counterUtility - Utility to use image buttons inside of layout's
        textViewPopUp - 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 interface android.view.View.OnClickListener
        Parameters:
        view - View that is clicked