简体   繁体   中英

MVP pattern where handle Textview?

I'm just starting with MVP and I want to know where should I setText on my TextView's ? I received object from Intent and i have to do something with it but I don't have idea where. Send it to presenter or just in onCreate after intent was received?

You need to pass object to presenter. Presenter decides to update view or not. For example it can call method view.showText(String text) and your activity in this method should call setText of your TextView

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM