Skip to Main Content
50 Android Hacks
book

50 Android Hacks

by Carlos Sessa
June 2013
Intermediate to advanced content levelIntermediate to advanced
216 pages
6h 3m
English
Manning Publications
Content preview from 50 Android Hacks

Chapter 5. Patterns

In this chapter, you’ll read about different development patterns you can use inside Android.

Hack 20 The Model-View-Presenter pattern: Android v1.6+

You’ve most likely heard of the MVC (Model-View-Controller) pattern, and you’ve probably used it in different frameworks. When I was trying to find a better way to test my Android code, I learned about the MVP (Model-View-Presenter) pattern. The basic difference between MVP and MVC is that in MVP, the presenter contains the UI business logic for the view and communicates with it through an interface.

In this hack, I’ll show you how to use MVP inside Android and how it improves the testability of the code. To see how it works, we’ll build a splash screen. A splash screen is ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Android Security

Android Security

Anmol Misra, Abhishek Dubey

Publisher Resources

ISBN: 9781617290565Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link