Creating the login view

Now we have to work on LoginActivity. As we are building this application utilizing the MVP pattern, LoginActivity is effectively a view. Obviously, LoginActivity is quite different from any generic view. It is a view that is concerned with login procedures. We can identify a set of necessary behaviors that a view presenting a login interface to a user must possess. Such behaviors are:

  • It must show a progress bar to a user when the login is in progress
  • It must be capable of hiding the progress bar when the need arises
  • It must be able to show appropriate field errors to users when encountered
  • It must be able to navigate the user to his home screen
  • It must be able to navigate an unregistered user to a signup screen ...

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.