Skip to content

Simple example login page with 1 Button, 2 EditText and internet request: MVP(MOXY), ButterKnife, REST(Retrofit2)

Notifications You must be signed in to change notification settings

GssGuru/Login-Simple

Repository files navigation

Login page

Simple example login page with 1 Button, 2 EditText and internet request. We take the data from the input fields and when you click on the button, send a request to the server and wait for an answer

About the aplication

  • MVP(Moxy)
  • REST(Retrofit2)
  • ButterKnife

Preview

Code

Description of the application code

Open

Manifest

In the Manifest add permission on the Internet and initialize MyApp.class. Read the comments in the code

gradle

In the gradle add only dependencies on the Internet, ButterKnife , Moxy(MVP). Read the comments in the code

Aplication code

Aplication code - is the code with the mechanics of the application. Carefully read the code comments.

To make our code more flexible we apply the MVP architectural pattern. Divide application into parts:

  • model - here we will work with the business logic of the application
  • ui - here we will work with the UI "View-Presenter"
  • utils - here we will store our utilities
  • MyApp.class - root class in the application. Used for various flexible solutions and getting the context and any place of application

Package model. Divide package into parts:

  • interactors - Here we will work with entities.
  • repositories - here we work only with data. We take and place them in the database, internal storage or work with Internet requests

Package ui. Divide package into parts:

  • login - This package is called in accordance with the activation and in it are all the components necessary for the operation of this activit
  • utils - our utilities that only work with UI elements
  • BaseActivity.java - Activity from which we extends all our Activity. It is good to keep the methods involved in different Activity

Package login. Divide package into parts:

Resources code

Res Change only Application Name

About

Simple example login page with 1 Button, 2 EditText and internet request: MVP(MOXY), ButterKnife, REST(Retrofit2)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages