title: kotlin - Problem with my if statement and operator
body: <p>This is my goal : user click on minus button the amount decrease by one and there is a if statement to not allow the amount go lower than 0 .</p>
  <p>This is my Code :</p>
  <pre><code>   var number = 0
          view.text_amount.visibility = View.GONE
  
          view.plus_btn.setOnClickListener {
  
              if (number == 5) {
                  Toast.makeText(
                      requireContext(),
                      &quot;Limit in order&quot;,
                      Toast.LENGTH_SHORT
                  ).show()
              } else {
                  view.text_amount.visibility = View.VISIBLE
                  number++
                  view.text_amount.text = number.toString()
              }
          }
          view.minus_btn.setOnClickListener {
              if (number &lt;= 0) {
                  view.text_amount.visibility = View.GONE
              } else {
                  number--
                  view.text_amount.text = number.toString()
  
              }
  
          }
  </code></pre>
  <p>there is problem with code : I don't want the amount be visible after getting to 0 . it's better experience when the amount is equal to 0 not be visible .</p>
  <p>I think it has a simple solution but I can't see it .
  do you have any idea ?</p>