-
Notifications
You must be signed in to change notification settings - Fork 1
Project Structure
In this boilerplate project, you'll find some directory in app/src/main/java/<YOUR_PACKAGE_NAME>
:
├── App.kt
├── base
│ ├── AppViewModelFactory.kt
│ ├── BaseActivity.kt
│ ├── BaseFragment.kt
│ └── BaseViewModel.kt
├── data
│ ├── AppDatabase.kt
│ ├── DataManager.kt
│ ├── PreferencesHelper.kt
│ └── local
│ └── pokemon
│ ├── LocalPokemon.kt
│ └── LocalPokemonDao.kt
├── di
│ ├── component
│ │ └── AppComponent.kt
│ ├── modules
│ │ ├── AppModule.kt
│ │ ├── BuildersModule.kt
│ │ ├── FragmentBuildersModule.kt
│ │ ├── NetworkModule.kt
│ │ └── ViewModelModule.kt
│ └── scopes
│ ├── ActivityContext.kt
│ ├── ApplicationContext.kt
│ └── ViewModelKey.kt
├── feature
│ ├── detailpokemon
│ │ ├── DetailPokemonActivity.kt
│ │ ├── DetailPokemonViewModel.kt
│ │ ├── TabAdapter.kt
│ │ ├── TypeAdapter.kt
│ │ ├── basestat
│ │ │ ├── BaseStatAdapter.kt
│ │ │ ├── BaseStatFragment.kt
│ │ │ └── BaseStatViewModel.kt
│ │ └── moves
│ │ ├── MovesAdapter.kt
│ │ ├── MovesFragment.kt
│ │ └── MovesViewModel.kt
│ └── listpokemon
│ ├── ListPokemonActivity.kt
│ ├── ListPokemonAdapter.kt
│ ├── ListPokemonDataSource.kt
│ ├── ListPokemonRemoteMediator.kt
│ └── ListPokemonViewModel.kt
├── model
│ └── api
│ ├── detailpokemon
│ │ └── DetailPokemonResponse.kt
│ └── pokemon
│ ├── Pokemon.kt
│ └── PokemonResponse.kt
├── network
│ └── ApiService.kt
└── util
├── CommonUtil.kt
└── NetworkState.kt
Contains classes that used for abstraction used to provide a common interface and implementation for its subclasses. Which is for our case will be used to be implemented on our activities, fragments, and viewmodels.
Contains classes that responsible for accessing app data. DataManager class will have important role to give & manage access to local database, shared preferences, and API endpoint.
Contains classes that responsible to manage Dependency Injection using Dagger 2.
This directory will be the place that mostly we working on. It is should be contains sub directory that represents specific app feature such as authentication, home page, detail product, etc.
As the name suggest, all Model or Data classes should be stored here. Usually the data we get from the API.
Contains our implementations of the API endpoints defined by the service interface.
Contains helper class that we can used to make life simpler.