Android base project with registration

Related tags

Kotlin android-base
Overview

Android Base

The project contains the most used modules in Android applications developed by RST Software House.

Getting started

We are using the most common libraries and approaches available in the Android community like DataBinding or Dagger 2. Applications are written based on MVVM architecture - you can read more about this pattern here

Examples

ViewModel and ViewAccess classes are able to extend, you can prepare them in your individual way. Every class from View layer has to implement a ViewAccess class used in injected ViewModel.

public class LoginViewModel extends BaseViewModel {

    @Inject
    protected LoginViewAccess mViewAccess;

    @Inject
    public LoginViewModel() {
    }

    //{...}
}
public class LoginFragment extends Fragment implements LoginViewAccess {
    @Inject
    protected LoginViewModel mModel;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        SampleApplication.get(getActivity()).getAppComponent()
                .plus(new LoginModule(this))
                .inject(this);
    }

    @Override
    public @Nullable View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        FragmentLoginBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_login, null, false);
        binding.setModel(mModel);

        return binding.getRoot();
    }

    @Override
    public @NonNull String getLoginErrorMessage() {
        return getString(R.string.error_login);
    }

    @Override
    public @NonNull String getPasswordErrorMessage() {
        return getString(R.string.error_password);
    }
}

Prepare a module and a component to use your classes through Dagger:

@Module
public class LoginModule {
    private LoginFragment mLoginFragment;

    public LoginModule(@NonNull LoginFragment loginFragment) {
        mLoginFragment = checkNotNull(loginFragment);
    }

    @Provides
    @FragmentScope
    public LoginFragment providesLoginFragment() {
        return mLoginFragment;
    }

    @Provides
    @FragmentScope
    public LoginViewAccess providesLoginViewAccess(@NonNull LoginFragment loginFragment) {
        return loginFragment;
    }
}
@FragmentScope
@Subcomponent(modules = LoginModule.class)
public interface LoginComponent {
    LoginFragment inject(LoginFragment loginFragment);
}

Finally add your component to the main application component:

public interface AppComponent {
    LoginComponent plus(LoginModule module);
}

Please follow the sample application if you want to check how it looks in practice.

Installing

Versions are available on bintray jcenter / maven central.

repositories {
    jcenter()
}

dependencies {
    compile 'com.rst-it:android-base:1.0.2'
}

License

android-base is Copyright © 2018 SoftwareBrothers.co. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About SoftwareBrothers.co

We are a software company who provides web and mobile development and UX/UI services, friendly team that helps clients from all over the world to transform their businesses and create astonishing products.

  • We are available to hire.
  • If you want to work for us - checkout the career page.
You might also like...
An android boilerplate project using clean architecture

Android Clean Architecture Boilerplate Welcome 👋 We hope this boilerplate is not only helpful to other developers, but also that it helps to educate

Clay is an Android library project that provides image trimming which is originally an UI component of LINE Creators Studio
Clay is an Android library project that provides image trimming which is originally an UI component of LINE Creators Studio

Clay Clay is an Android library project that provides image trimming. Fully written in Kotlin, Clay is originally a UI component of LINE Creators Stud

An Android template project (in Kotlin) with boilerplate and current patterns.

android-starter-v4 An Android template project (in Kotlin) with boilerplate and plumbing, exploring current architecture patterns. A bit too much for

Android project setup files when developing apps from scratch. The codebase uses lates jetpack libraries and MVVM repository architecture for setting up high performance apps

Android architecture app Includes the following Android Respository architecture MVVM Jepack libraries Carousel view Kotlin Kotlin Flow and Livedata P

Introduction App Project For Android .

Installation Open Aide : Please at the first open AIDE app on your mobile . Download Libraries : At first turn on your filterBreaker and then download

Improved project template for Android Studio

Improved project template for Android Studio Unfortunately the default Android Studio template has a lot of unnecessary stuff that has to be removed e

Introduction App Project For Android .

Installation Open Aide : Please at the first open AIDE app on your mobile . Download Libraries : At first turn on your filterBreaker and then download

A simple project that describes the relationship between the view and it's viewmodel in android development
A simple project that describes the relationship between the view and it's viewmodel in android development

View-ViewModel-Communication A simple project that describes the relationship between the view and it's viewmodel in android development In MVVM archi

A Kotlin Multiplatform Project using TMDB Api. Currently supports Android,iOS,Desktop and web platforms
A Kotlin Multiplatform Project using TMDB Api. Currently supports Android,iOS,Desktop and web platforms

A Kotlin Multiplatform Project using TMDB Api(https://www.themoviedb.org/). Currently this project is implemented in following platforms Andr

Owner
Software Brothers
Software Brothers
Cleanarchitecture MVVM Hilt base - Android Clean Architecture example project

Android Clean Architecture example project Note: This is project based on MVVM c

Mohsin Javed 4 Aug 30, 2022
PraxisKmm - A Kotlin multiplatform base project

PraxisKMM Minimal Kotlin Multiplatform project with SwiftUI, Jetpack Compose, Co

Mutual Mobile 45 Nov 15, 2022
base url not included, rxJava, Retrofit

NewsFeed NewsFeed is an android sample application built using kotlin, androidx artifacts, kotlin-extensions in MVP pattern. Libraries Used Dagger 2 D

Sagar Raval 0 Dec 29, 2021
base url not included, rxJava, Retrofit

NewsFeed NewsFeed is an android sample application built using kotlin, androidx artifacts, kotlin-extensions in MVP pattern. Libraries Used Dagger 2 D

Sagar Raval 0 Dec 29, 2021
A fabric modding base for the latest Minecraft version.

Amber A fabric modding base for the latest Minecraft version. Setup Create a fabric mod using this repo as an example. Add this mod as a dependency vi

Redstonecrafter0 1 Apr 13, 2022
Base projects for Devpass' Dev Sprints

MVI Challenge - Space App ?? In this challenge, we will refactor an Android application that shows SpaceX's upcoming releases to MVI architecture. Con

Devpass 1 Oct 10, 2022
Skeleton project for show the architecture of Android project using MVVM, Clean Architecture and Kotlin coroutine Flow

ClearScoreDemo Skeleton project for showing the architecture of Android project using MVVM, Clean architecture and Kotlin coroutine Flow App Architect

Plabon Modak 1 Mar 6, 2022
Android Clean Architecture in Rorty is a sample project that presents modern, approach to Android application development using Kotlin and latest tech-stack.

Android Clean Architecture in Rorty is a sample project that presents modern, approach to Android application development using Kotlin and latest tech-stack.

Mr.Sanchez 176 Jan 4, 2023
Create kotlin android project with one line of command.

README This is an android application template project built with kotlin language and some useful libraries. It provides a creator script to quickly c

nekocode 1.6k Dec 20, 2022