This is a basic application where a user signs up or registers, its details will be stored in the database. I have used everyone's favourite SQLite databse to store the data. Next, in the login activity, when a user types the username and password, it'll will search for that username and find respective password. If the typed password matches with this one then user will successfully register, else it will show a toast error message.
NOTE:- This is not a full-fledged Android application in which after registering and logging, you expect to see your profile! This is only meant and developed to understand the SQLite database easily and to implement the same in other project(s). If you want to make your own changes to the app; be it UI specific or anything else, you can always read how to do that here in GitHub.