title: Changing a label based on boolean condition in Kivy application
body: <p>In an application I'm working on in Kivy Python, I'm trying to input a simple start/stop button.  Click to start what theoretically will be a timer, and then stop it when the activity is complete.  For proof of concept, I just wanted the start button to be clicked and changed to &quot;stop&quot; (and show a corresponding popup stating &quot;activity started&quot;), and subsequently the reverse when the stop button is clicked.</p>
  <p>Still being novice overall, I wanted to do this via a boolean condition with a variable called &quot;activity_choice&quot;.  The problem is, this logic will work once and then I can't change the label back and forth in subsequent clicks.  The likely issue is the Kivy application never knows that the boolean variable is actually changed (and does not update it in real-time).  Is there a better way to go about this versus a boolean variable?  Or is there a way to potentially refresh the application for it to realize the boolean has changed?</p>
  <p>.py file code:</p>
  <pre><code>    def activity_popup(self):
      if self.activity_choice == False:
          self.activity_choice == True
          activity_label = self.root.ids['add_workout_screen'].ids['activity_label']
          activity_label.text = &quot;Stop Activity&quot;
  
          
      if self.activity_choice == True:
          self.activity_choice == False
          activity_label = self.root.ids['add_workout_screen'].ids['activity_label']
          activity_label.text = &quot;Start Activity&quot;
  </code></pre>
  <p>.kv file code:</p>
  <pre><code>    GridLayout:             
          rows: 2
          pos_hint: {&quot;top&quot;: .55, &quot;right&quot;: 1.0}
          size_hint: 1, .26
          ImageButton:
              source: &quot;icons/power.png&quot;
              on_press: app.activity_popup()
  
          LabelButton:
              size_hint: .3, .2
              pos_hint: {&quot;top&quot;: .45, &quot;right&quot;: 1.0}
              text: &quot;Start Activity&quot;
              id: activity_label
              on_press: app.activity_popup()
  </code></pre>