I’m building a counter app with MVP design pattern in Android Studio. I want to hide my reset button when the value of the counter is 0 so where should I put my code for controlling it’s visibility? I have the following classes:
• MainActivity.kt (Class)
• MainActivityPresenter.kt (Class)
• MainActivityModel (Class)
• ContractInterface.kt (Interfaces)
google 1
f
Francisco Javier Ruiz Rodriguez
03/23/2020, 10:07 AM
The view must be "stupid", it only do the things presenter says. So presenter decides when to hide button, and view just changes its visibility
👍 3
k
Kashif
03/23/2020, 10:12 AM
I reconsidered my answer and removed it and your answer seems more promising 👍