├── app
├── .gitignore
├── src
│ ├── main
│ │ ├── ic_launcher-web.png
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── layout
│ │ │ │ └── activity_main.xml
│ │ │ ├── drawable-v24
│ │ │ │ └── ic_launcher_foreground.xml
│ │ │ └── drawable
│ │ │ │ └── ic_launcher_background.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── jeroenmols
│ │ │ │ └── modularization
│ │ │ │ └── example
│ │ │ │ └── MainActivity.kt
│ │ └── AndroidManifest.xml
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── jeroenmols
│ │ └── modularization
│ │ └── example
│ │ └── AppFlowTest.kt
├── proguard-rules.pro
└── build.gradle
├── libraries
├── README.md
├── actions
│ ├── README.md
│ ├── src
│ │ ├── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ │ └── modularization
│ │ │ │ └── libraries
│ │ │ │ └── actions
│ │ │ │ ├── UserArgs.kt
│ │ │ │ └── Actions.kt
│ │ └── test
│ │ │ └── java
│ │ │ └── modularization
│ │ │ └── libraries
│ │ │ └── actions
│ │ │ └── UserArgsTest.kt
│ └── build.gradle
└── ui-components
│ ├── README.md
│ ├── src
│ ├── main
│ │ ├── AndroidManifest.xml
│ │ └── res
│ │ │ └── values
│ │ │ ├── dimens.xml
│ │ │ ├── colors.xml
│ │ │ ├── styles.xml
│ │ │ └── strings.xml
│ ├── androidTest
│ │ └── java
│ │ │ └── modularization
│ │ │ └── ui_components
│ │ │ └── MyCustomComponentUITest.kt
│ └── test
│ │ └── java
│ │ └── modularization
│ │ └── ui_components
│ │ └── MyCustomComponentTest.kt
│ └── build.gradle
├── features
├── login
│ ├── README.md
│ ├── src
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── modularization
│ │ │ │ └── features
│ │ │ │ └── login
│ │ │ │ └── MyBusinessLogicTest.kt
│ │ ├── main
│ │ │ ├── java
│ │ │ │ └── modularization
│ │ │ │ │ └── features
│ │ │ │ │ └── login
│ │ │ │ │ ├── LoginActivity.kt
│ │ │ │ │ ├── AvatarFragment.kt
│ │ │ │ │ ├── LoginFragment.kt
│ │ │ │ │ └── WelcomeFragment.kt
│ │ │ ├── AndroidManifest.xml
│ │ │ └── res
│ │ │ │ ├── layout
│ │ │ │ ├── activity_login.xml
│ │ │ │ ├── fragment_avatar.xml
│ │ │ │ ├── fragment_welcome.xml
│ │ │ │ └── fragment_login.xml
│ │ │ │ └── navigation
│ │ │ │ └── login_graph.xml
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── modularization
│ │ │ └── features
│ │ │ └── login
│ │ │ └── LoginFlowTest.kt
│ └── build.gradle
├── README.md
├── sharing
│ ├── README.md
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── values
│ │ │ │ │ └── strings.xml
│ │ │ │ ├── drawable
│ │ │ │ │ └── ic_send_black_24dp.xml
│ │ │ │ ├── layout
│ │ │ │ │ ├── item_person.xml
│ │ │ │ │ ├── item_photo.xml
│ │ │ │ │ ├── activity_sharing.xml
│ │ │ │ │ ├── fragment_contacts.xml
│ │ │ │ │ └── fragment_message.xml
│ │ │ │ └── navigation
│ │ │ │ │ └── sharing_graph.xml
│ │ │ ├── java
│ │ │ │ └── modularization
│ │ │ │ │ └── features
│ │ │ │ │ └── sharing
│ │ │ │ │ ├── SharingActivity.kt
│ │ │ │ │ ├── ContactsFragment.kt
│ │ │ │ │ └── MessageFragment.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── test
│ │ │ └── java
│ │ │ │ └── modularization
│ │ │ │ └── features
│ │ │ │ └── sharing
│ │ │ │ └── MyBusinessLogicTest.kt
│ │ └── androidTest
│ │ │ └── java
│ │ │ └── modularization
│ │ │ └── features
│ │ │ └── sharing
│ │ │ └── SharingFlowTest.kt
│ └── build.gradle
└── dashboard
│ ├── README.md
│ ├── src
│ ├── test
│ │ └── java
│ │ │ └── modularization
│ │ │ └── features
│ │ │ └── dashboard
│ │ │ └── MyBusinessLogicTest.kt
│ ├── main
│ │ ├── res
│ │ │ ├── layout
│ │ │ │ ├── item_photo.xml
│ │ │ │ ├── fragment_photos.xml
│ │ │ │ ├── fragment_albums.xml
│ │ │ │ ├── item_album.xml
│ │ │ │ ├── activity_dashboard.xml
│ │ │ │ └── fragment_social.xml
│ │ │ ├── drawable
│ │ │ │ ├── facebook.xml
│ │ │ │ ├── photos.xml
│ │ │ │ ├── albums.xml
│ │ │ │ ├── social.xml
│ │ │ │ ├── twitter.xml
│ │ │ │ └── envelope.xml
│ │ │ ├── menu
│ │ │ │ └── bottomnavigation_dashboard.xml
│ │ │ └── navigation
│ │ │ │ └── dashboard_graph.xml
│ │ ├── java
│ │ │ └── modularization
│ │ │ │ └── features
│ │ │ │ └── dashboard
│ │ │ │ ├── AlbumsFragment.kt
│ │ │ │ ├── PhotosFragment.kt
│ │ │ │ ├── SocialFragment.kt
│ │ │ │ └── DashboardActivity.kt
│ │ └── AndroidManifest.xml
│ └── androidTest
│ │ └── java
│ │ └── modularization
│ │ └── features
│ │ └── dashboard
│ │ └── DashboardFlowTest.kt
│ └── build.gradle
├── readme
├── graph_login.jpg
├── graph_sharing.jpg
├── graph_dashboard.jpg
└── modularized_architecture.png
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .idea
├── encodings.xml
├── codeStyles
│ ├── codeStyleConfig.xml
│ └── Project.xml
├── vcs.xml
├── runConfigurations.xml
├── misc.xml
└── modules.xml
├── settings.gradle
├── .gitignore
├── LICENSE
├── gradle.properties
├── README.md
├── gradlew.bat
└── gradlew
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/libraries/README.md:
--------------------------------------------------------------------------------
1 | # Libraries
2 | Functionality shared across multiple features
--------------------------------------------------------------------------------
/features/login/README.md:
--------------------------------------------------------------------------------
1 | # Login
2 | Allows the user to login or create a new account
--------------------------------------------------------------------------------
/features/README.md:
--------------------------------------------------------------------------------
1 | # Features
2 | Self contained UI level features including test automation
--------------------------------------------------------------------------------
/features/sharing/README.md:
--------------------------------------------------------------------------------
1 | # Sharing
2 | Allows to share photos via various social networks
--------------------------------------------------------------------------------
/libraries/actions/README.md:
--------------------------------------------------------------------------------
1 | # Actions
2 | Reusable Actions to decouple features using implicit intents
--------------------------------------------------------------------------------
/libraries/actions/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/readme/graph_login.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/readme/graph_login.jpg
--------------------------------------------------------------------------------
/features/dashboard/README.md:
--------------------------------------------------------------------------------
1 | # Dashboard
2 | Main screen of the app that displays photos, albums and social sharing
--------------------------------------------------------------------------------
/readme/graph_sharing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/readme/graph_sharing.jpg
--------------------------------------------------------------------------------
/readme/graph_dashboard.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/readme/graph_dashboard.jpg
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/features/sharing/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | sharing
3 |
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/readme/modularized_architecture.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/readme/modularized_architecture.png
--------------------------------------------------------------------------------
/libraries/ui-components/README.md:
--------------------------------------------------------------------------------
1 | # UI Components
2 | Reusable UI components as defined in the UX Style Guide that are reused across multiple features
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/JeroenMols/ModularizationExample/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/libraries/ui-components/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | include ':features:login'
3 | include ':features:dashboard'
4 | include ':features:sharing'
5 | include ':libraries:ui-components'
6 | include ':libraries:actions'
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/libraries/ui-components/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri May 24 21:15:53 CEST 2019
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/libraries/actions/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android-extensions'
3 | apply plugin: 'kotlin-android'
4 |
5 | androidExtensions {
6 | experimental = true
7 | }
8 |
9 | dependencies {
10 | implementation Deps.androidx_core
11 |
12 | testImplementation Deps.testlib_junit
13 | }
--------------------------------------------------------------------------------
/libraries/actions/src/main/java/modularization/libraries/actions/UserArgs.kt:
--------------------------------------------------------------------------------
1 | package modularization.libraries.actions
2 |
3 | import android.os.Parcelable
4 | import kotlinx.android.parcel.Parcelize
5 |
6 | const val EXTRA_USER = "com.jeroenmols.modularization.dashboard.extra.user"
7 |
8 | @Parcelize
9 | data class UserArgs(val userId: String) : Parcelable
--------------------------------------------------------------------------------
/libraries/ui-components/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 |
4 | dependencies {
5 | implementation Deps.androidx_material
6 |
7 | testImplementation Deps.testlib_junit
8 |
9 | androidTestImplementation Deps.testandroidx_runner
10 | androidTestImplementation Deps.testandroidx_espressocore
11 | }
--------------------------------------------------------------------------------
/features/login/src/test/java/modularization/features/login/MyBusinessLogicTest.kt:
--------------------------------------------------------------------------------
1 | package modularization.features.login
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | class MyBusinessLogicTest {
8 |
9 | @Test
10 | fun `custom businesslogic does what it should do`() {
11 | // TODO
12 | assertTrue(true)
13 | }
14 | }
--------------------------------------------------------------------------------
/features/sharing/src/test/java/modularization/features/sharing/MyBusinessLogicTest.kt:
--------------------------------------------------------------------------------
1 | package modularization.features.sharing
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | class MyBusinessLogicTest {
8 |
9 | @Test
10 | fun `custom businesslogic does what it should do`() {
11 | // TODO
12 | assertTrue(true)
13 | }
14 | }
--------------------------------------------------------------------------------
/features/dashboard/src/test/java/modularization/features/dashboard/MyBusinessLogicTest.kt:
--------------------------------------------------------------------------------
1 | package modularization.features.dashboard
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | class MyBusinessLogicTest {
8 |
9 | @Test
10 | fun `custom businesslogic does what it should do`() {
11 | // TODO
12 | assertTrue(true)
13 | }
14 | }
--------------------------------------------------------------------------------
/features/sharing/src/main/res/drawable/ic_send_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/features/sharing/src/main/res/layout/item_person.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/features/dashboard/src/main/res/layout/item_photo.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/features/sharing/src/main/res/layout/item_photo.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/features/dashboard/src/main/res/drawable/facebook.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/libraries/actions/src/test/java/modularization/libraries/actions/UserArgsTest.kt:
--------------------------------------------------------------------------------
1 | package modularization.libraries.actions
2 |
3 | import org.junit.Assert.assertTrue
4 | import org.junit.Test
5 |
6 | class UserArgsTest {
7 |
8 | @Test
9 | fun `test business logic of custom args classes`() {
10 | // if there is any business logic in the ***Args classes, it should be tested
11 | assertTrue(true)
12 | }
13 | }
--------------------------------------------------------------------------------
/features/login/src/main/java/modularization/features/login/LoginActivity.kt:
--------------------------------------------------------------------------------
1 | package modularization.features.login
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 |
6 | class LoginActivity : AppCompatActivity() {
7 |
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_login)
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/libraries/ui-components/src/androidTest/java/modularization/ui_components/MyCustomComponentUITest.kt:
--------------------------------------------------------------------------------
1 | package modularization.ui_components
2 |
3 | import org.junit.Assert
4 | import org.junit.Test
5 |
6 | class MyCustomComponentUITest {
7 |
8 | @Test
9 | fun customComponent_ui_doeswhatitshould() {
10 | // e.g. colors, displayed text, enabled/disabled states,...
11 | Assert.assertTrue(true)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/features/sharing/src/main/java/modularization/features/sharing/SharingActivity.kt:
--------------------------------------------------------------------------------
1 | package modularization.features.sharing
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 |
6 | class SharingActivity : AppCompatActivity() {
7 |
8 | override fun onCreate(savedInstanceState: Bundle?) {
9 | super.onCreate(savedInstanceState)
10 | setContentView(R.layout.activity_sharing)
11 | }
12 | }
--------------------------------------------------------------------------------
/libraries/ui-components/src/test/java/modularization/ui_components/MyCustomComponentTest.kt:
--------------------------------------------------------------------------------
1 | package modularization.ui_components
2 |
3 | import org.junit.Assert.assertTrue
4 | import org.junit.Test
5 |
6 | class MyCustomComponentTest {
7 |
8 | @Test
9 | fun `custom component businesslogic does what it should do`() {
10 | // e.g. Color conversions, data conversions (value to percent),...
11 | assertTrue(true)
12 | }
13 | }
--------------------------------------------------------------------------------
/features/dashboard/src/main/res/drawable/photos.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/features/dashboard/src/main/res/drawable/albums.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/libraries/ui-components/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #607D8B
5 | #455A64
6 | #CFD8DC
7 | #FFC107
8 | #212121
9 | #757575
10 | #FFFFFF
11 | #BDBDBD
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/jeroenmols/modularization/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.jeroenmols.modularization.example
2 |
3 | import android.os.Bundle
4 | import androidx.appcompat.app.AppCompatActivity
5 | import modularization.libraries.actions.Actions
6 |
7 | class MainActivity : AppCompatActivity() {
8 |
9 | override fun onCreate(savedInstanceState: Bundle?) {
10 | super.onCreate(savedInstanceState)
11 | setContentView(R.layout.activity_main)
12 |
13 | startActivity(Actions.openLoginIntent(this))
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/features/dashboard/src/main/java/modularization/features/dashboard/AlbumsFragment.kt:
--------------------------------------------------------------------------------
1 | package modularization.features.dashboard
2 |
3 | import android.os.Bundle
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import androidx.fragment.app.Fragment
8 |
9 | class AlbumsFragment : Fragment() {
10 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
11 | return inflater.inflate(R.layout.fragment_albums, container, false)
12 | }
13 | }
--------------------------------------------------------------------------------
/features/dashboard/src/main/java/modularization/features/dashboard/PhotosFragment.kt:
--------------------------------------------------------------------------------
1 | package modularization.features.dashboard
2 |
3 | import android.os.Bundle
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import androidx.fragment.app.Fragment
8 |
9 | class PhotosFragment : Fragment() {
10 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
11 | return inflater.inflate(R.layout.fragment_photos, container, false)
12 | }
13 | }
--------------------------------------------------------------------------------
/features/sharing/src/main/java/modularization/features/sharing/ContactsFragment.kt:
--------------------------------------------------------------------------------
1 | package modularization.features.sharing
2 |
3 | import android.os.Bundle
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import androidx.fragment.app.Fragment
8 |
9 | class ContactsFragment : Fragment() {
10 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
11 | return inflater.inflate(R.layout.fragment_contacts, container, false)
12 | }
13 | }
--------------------------------------------------------------------------------
/features/sharing/src/main/java/modularization/features/sharing/MessageFragment.kt:
--------------------------------------------------------------------------------
1 | package modularization.features.sharing
2 |
3 | import android.os.Bundle
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import androidx.fragment.app.Fragment
8 |
9 | class MessageFragment : Fragment() {
10 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
11 | return inflater.inflate(R.layout.fragment_message, container, false)
12 | }
13 | }
--------------------------------------------------------------------------------
/features/login/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/features/sharing/src/androidTest/java/modularization/features/sharing/SharingFlowTest.kt:
--------------------------------------------------------------------------------
1 | package modularization.features.sharing
2 |
3 | import androidx.test.rule.ActivityTestRule
4 | import org.junit.Assert.assertTrue
5 | import org.junit.Rule
6 | import org.junit.Test
7 |
8 | class SharingFlowTest {
9 |
10 | @Rule
11 | @JvmField
12 | var mActivityTestRule = ActivityTestRule(SharingActivity::class.java)
13 |
14 | @Test
15 | fun sharingFlowTest() {
16 | // TODO : test the sharing flow
17 | assertTrue(true)
18 | }
19 | }
20 |
21 |
22 |
--------------------------------------------------------------------------------
/features/sharing/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/features/dashboard/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/ui-components/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/features/login/src/main/res/layout/activity_login.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Generated files
2 | bin/
3 | gen/
4 | out/
5 |
6 | # Gradle files
7 | .gradle/
8 | build/
9 |
10 | # Local configuration file (sdk path, etc)
11 | local.properties
12 |
13 | # Android Studio Navigation editor temp files
14 | .navigation/
15 |
16 | # Android Studio captures folder
17 | captures/
18 |
19 | # IntelliJ
20 | *.iml
21 | .idea/workspace.xml
22 | .idea/tasks.xml
23 | .idea/gradle.xml
24 | .idea/assetWizardSettings.xml
25 | .idea/dictionaries
26 | .idea/libraries
27 | .idea/caches
28 |
29 | # External native build folder generated in Android Studio 2.2 and later
30 | .externalNativeBuild
31 | qaplug_profiles.xml
32 |
--------------------------------------------------------------------------------
/features/dashboard/src/main/res/drawable/social.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/features/dashboard/src/main/res/layout/fragment_photos.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/features/sharing/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android-extensions'
3 | apply plugin: 'kotlin-android'
4 |
5 | dependencies {
6 | implementation project(':libraries:ui-components')
7 |
8 | implementation Deps.androidx_constraintlayout
9 | implementation Deps.androidx_recyclerview
10 | implementation Deps.androidx_navigation_fragment
11 | implementation Deps.androidx_navigation_ui
12 |
13 | testImplementation Deps.testlib_junit
14 |
15 | androidTestImplementation Deps.testandroidx_runner
16 | androidTestImplementation Deps.testandroidx_rules
17 | androidTestImplementation Deps.testandroidx_espressocore
18 | }
--------------------------------------------------------------------------------
/libraries/ui-components/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Modularization Example
3 |
4 | Email
5 | Password
6 | Sign in or register
7 | Sign in
8 | "Welcome !"
9 | Not a valid username
10 | Password must be >5 characters
11 | "Login failed"
12 |
13 |
--------------------------------------------------------------------------------
/features/dashboard/src/main/res/drawable/twitter.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/features/login/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android-extensions'
3 | apply plugin: 'kotlin-android'
4 |
5 | dependencies {
6 | implementation project(':libraries:ui-components')
7 | implementation project(':libraries:actions')
8 |
9 | implementation Deps.androidx_material
10 | implementation Deps.androidx_constraintlayout
11 | implementation Deps.androidx_navigation_fragment
12 | implementation Deps.androidx_navigation_ui
13 |
14 | testImplementation Deps.testlib_junit
15 |
16 | androidTestImplementation Deps.testandroidx_runner
17 | androidTestImplementation Deps.testandroidx_rules
18 | androidTestImplementation Deps.testandroidx_espressocore
19 | }
20 |
--------------------------------------------------------------------------------
/features/dashboard/src/main/res/drawable/envelope.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
--------------------------------------------------------------------------------
/libraries/actions/src/main/java/modularization/libraries/actions/Actions.kt:
--------------------------------------------------------------------------------
1 | package modularization.libraries.actions
2 |
3 | import android.content.Context
4 | import android.content.Intent
5 |
6 | object Actions {
7 |
8 | fun openLoginIntent(context: Context) = internalIntent(context, "com.jeroenmols.modularization.login.open")
9 | fun openDashboardIntent(context: Context, userId: String) =
10 | internalIntent(context, "com.jeroenmols.modularization.dashboard.open")
11 | .putExtra(EXTRA_USER, UserArgs(userId))
12 |
13 | fun openSharingIntent(context: Context) = internalIntent(context,"com.jeroenmols.modularization.sharing.open")
14 |
15 | private fun internalIntent(context: Context, action: String) = Intent(action).setPackage(context.packageName)
16 | }
--------------------------------------------------------------------------------
/features/dashboard/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android-extensions'
3 | apply plugin: 'kotlin-android'
4 |
5 | dependencies {
6 | implementation project(':libraries:ui-components')
7 | implementation project(':libraries:actions')
8 |
9 | implementation Deps.androidx_material
10 | implementation Deps.androidx_constraintlayout
11 | implementation Deps.androidx_recyclerview
12 | implementation Deps.androidx_navigation_fragment
13 | implementation Deps.androidx_navigation_ui
14 |
15 | testImplementation Deps.testlib_junit
16 |
17 | androidTestImplementation Deps.testandroidx_runner
18 | androidTestImplementation Deps.testandroidx_rules
19 | androidTestImplementation Deps.testandroidx_espressocore
20 | }
21 |
--------------------------------------------------------------------------------
/features/sharing/src/main/res/layout/activity_sharing.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
--------------------------------------------------------------------------------
/features/login/src/main/java/modularization/features/login/AvatarFragment.kt:
--------------------------------------------------------------------------------
1 | package modularization.features.login
2 |
3 | import android.os.Bundle
4 | import android.view.LayoutInflater
5 | import android.view.View
6 | import android.view.ViewGroup
7 | import android.widget.Button
8 | import androidx.fragment.app.Fragment
9 | import modularization.libraries.actions.Actions
10 |
11 | class AvatarFragment : Fragment() {
12 | override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
13 | val view = inflater.inflate(R.layout.fragment_avatar, container, false)
14 | view.findViewById