├── app
├── .gitignore
├── src
│ ├── test
│ │ └── resources
│ │ │ └── mockito-extensions
│ │ │ └── org.mockito.plugins.MockMaker
│ └── main
│ │ ├── res
│ │ ├── font
│ │ │ ├── poppins_bold.ttf
│ │ │ └── poppins.xml
│ │ ├── drawable
│ │ │ ├── ic_launcher.png
│ │ │ └── header_bg.xml
│ │ ├── 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
│ │ ├── layout
│ │ │ ├── custom_layout_fragment_activity.xml
│ │ │ ├── switch_item.xml
│ │ │ ├── loading_indicator.xml
│ │ │ ├── header_view.xml
│ │ │ ├── footer_view.xml
│ │ │ ├── basic_component_example.xml
│ │ │ ├── activity_main.xml
│ │ │ └── data_item_view.xml
│ │ ├── menu
│ │ │ └── main_menu.xml
│ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── styles.xml
│ │ │ └── strings.xml
│ │ ├── assets
│ │ └── fonts
│ │ │ └── poppins_bold.ttf
│ │ └── java
│ │ └── com
│ │ └── xfinity
│ │ └── blueprint_sample
│ │ ├── BlueprintSampleApplication.kt
│ │ ├── mvp
│ │ ├── model
│ │ │ ├── FooterModel.kt
│ │ │ ├── HeaderModel.kt
│ │ │ ├── DynamicScreenModel.kt
│ │ │ ├── DataItemModel.kt
│ │ │ └── StaticScreenModel.kt
│ │ ├── view
│ │ │ ├── StaticScreenView.kt
│ │ │ ├── CustomScreenView.kt
│ │ │ ├── LoadingIndicator.kt
│ │ │ ├── FooterView.kt
│ │ │ ├── BasicComponentExample.kt
│ │ │ ├── HeaderView.kt
│ │ │ └── DynamicScreenView.kt
│ │ └── presenter
│ │ │ ├── FooterPresenter.kt
│ │ │ ├── HeaderPresenter.kt
│ │ │ ├── DataItemPresenter.kt
│ │ │ └── StaticScreenPresenter.kt
│ │ └── LauncherActivity.kt
└── proguard-rules.pro
├── bootstrap
├── .gitignore
├── src
│ ├── test
│ │ └── resources
│ │ │ └── mockito-extensions
│ │ │ └── org.mockito.plugins.MockMaker
│ └── main
│ │ ├── java
│ │ └── com
│ │ │ └── xfinity
│ │ │ └── blueprint_bootstrap
│ │ │ ├── utils
│ │ │ ├── Launcher.kt
│ │ │ └── Scheduler.kt
│ │ │ ├── model
│ │ │ └── api
│ │ │ │ └── CurrentWeather.kt
│ │ │ ├── component
│ │ │ ├── model
│ │ │ │ └── SimpleTextModel.kt
│ │ │ ├── presenter
│ │ │ │ └── HelloComponentPresenter.kt
│ │ │ └── view
│ │ │ │ └── HelloComponent.kt
│ │ │ ├── dagger
│ │ │ ├── Qualifiers.kt
│ │ │ ├── ApplicationComponent.kt
│ │ │ ├── Scopes.kt
│ │ │ └── ActivityModules.kt
│ │ │ ├── screen
│ │ │ └── model
│ │ │ │ └── MainScreenModel.kt
│ │ │ ├── ApiClient.kt
│ │ │ ├── webservices
│ │ │ ├── ApiKeyInterceptor.kt
│ │ │ └── OpenApiWeatherMapService.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── MainToolbarActivity.kt
│ │ │ └── BootstrapApplication.kt
│ │ ├── 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
│ │ ├── values
│ │ │ ├── dimens.xml
│ │ │ ├── colors.xml
│ │ │ ├── styles.xml
│ │ │ └── strings.xml
│ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── drawable
│ │ │ ├── ic_home_black_24dp.xml
│ │ │ ├── ic_dashboard_black_24dp.xml
│ │ │ └── ic_notifications_black_24dp.xml
│ │ ├── menu
│ │ │ ├── toolbar_actions.xml
│ │ │ └── navigation.xml
│ │ └── layout
│ │ │ └── hello_component.xml
│ │ └── AndroidManifest.xml
└── proguard-rules.pro
├── architecture
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ └── layout
│ │ │ │ └── screen_view.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── xfinity
│ │ │ └── blueprint
│ │ │ └── architecture
│ │ │ ├── ScreenManager.kt
│ │ │ ├── ToolbarContracts.kt
│ │ │ ├── activity
│ │ │ └── BlueprintSetupExtensions.kt
│ │ │ ├── MessageView.kt
│ │ │ └── component
│ │ │ └── BasicComponentModel.kt
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── dapp
│ │ └── blueprint_architecture
│ │ └── ExampleInstrumentedTest.java
└── proguard-rules.pro
├── library
├── .gitignore
├── src
│ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── xfinity
│ │ │ │ └── blueprint
│ │ │ │ ├── presenter
│ │ │ │ ├── PauseResumeHandler.kt
│ │ │ │ ├── ScreenPresenter.kt
│ │ │ │ ├── ComponentPresenter.kt
│ │ │ │ ├── DefaultComponentPresenter.kt
│ │ │ │ ├── EventEmittingComponentPresenter.kt
│ │ │ │ ├── ComponentEventHandler.kt
│ │ │ │ └── EventHandlingScreenPresenter.kt
│ │ │ │ ├── event
│ │ │ │ ├── ComponentEvent.kt
│ │ │ │ └── ComponentEventManager.kt
│ │ │ │ ├── view
│ │ │ │ ├── ComponentView.kt
│ │ │ │ └── ScreenView.kt
│ │ │ │ └── model
│ │ │ │ └── Component.kt
│ │ ├── res
│ │ │ └── values
│ │ │ │ └── strings.xml
│ │ └── AndroidManifest.xml
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── xfinity
│ │ │ └── blueprint
│ │ │ └── ExampleUnitTest.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── xfinity
│ │ └── blueprint
│ │ └── ExampleInstrumentedTest.java
└── proguard-rules.pro
├── sample-library
├── .gitignore
├── src
│ ├── test
│ │ └── resources
│ │ │ └── mockito-extensions
│ │ │ └── org.mockito.plugins.MockMaker
│ └── main
│ │ ├── 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
│ │ ├── drawable
│ │ │ └── header_bg.xml
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ ├── menu
│ │ │ └── main_menu.xml
│ │ └── layout
│ │ │ ├── switch_item.xml
│ │ │ ├── loading_indicator.xml
│ │ │ ├── header_view.xml
│ │ │ ├── data_item_view.xml
│ │ │ ├── footer_view.xml
│ │ │ ├── activity_main.xml
│ │ │ └── launcher_activity.xml
│ │ ├── java
│ │ └── com
│ │ │ └── xfinity
│ │ │ └── blueprint_sample_library
│ │ │ ├── BlueprintSampleApplication.kt
│ │ │ ├── mvp
│ │ │ ├── model
│ │ │ │ ├── FooterModel.kt
│ │ │ │ ├── HeaderModel.kt
│ │ │ │ ├── DynamicScreenModel.kt
│ │ │ │ ├── DataItemModel.kt
│ │ │ │ └── StaticScreenModel.kt
│ │ │ ├── view
│ │ │ │ ├── StaticScreenView.kt
│ │ │ │ ├── LoadingIndicator.kt
│ │ │ │ ├── FooterView.kt
│ │ │ │ ├── HeaderView.kt
│ │ │ │ ├── DynamicScreenView.kt
│ │ │ │ └── DataItemView.kt
│ │ │ └── presenter
│ │ │ │ ├── FooterPresenter.kt
│ │ │ │ ├── HeaderPresenter.kt
│ │ │ │ ├── DataItemPresenter.kt
│ │ │ │ └── StaticScreenPresenter.kt
│ │ │ └── LauncherActivity.kt
│ │ └── AndroidManifest.xml
└── proguard-rules.pro
├── blueprint-annotations
├── .gitignore
└── src
│ └── main
│ └── java
│ └── com
│ └── xfinity
│ └── blueprint_annotations
│ ├── DefaultPresenterConstructor.kt
│ ├── ComponentViewClass.kt
│ ├── ComponentViewHolder.kt
│ └── DefaultPresenter.kt
├── sample-library-app
├── .gitignore
├── src
│ ├── test
│ │ └── resources
│ │ │ └── mockito-extensions
│ │ │ └── org.mockito.plugins.MockMaker
│ └── main
│ │ ├── 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
│ │ ├── drawable
│ │ │ └── header_bg.xml
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ └── styles.xml
│ │ ├── menu
│ │ │ └── main_menu.xml
│ │ └── layout
│ │ │ ├── switch_item.xml
│ │ │ ├── loading_indicator.xml
│ │ │ ├── header_view.xml
│ │ │ ├── data_item_view.xml
│ │ │ ├── footer_view.xml
│ │ │ ├── activity_main.xml
│ │ │ └── launcher_activity.xml
│ │ └── java
│ │ └── com
│ │ └── xfinity
│ │ └── blueprint_sample_library_app
│ │ ├── BlueprintSampleApplication.kt
│ │ ├── mvp
│ │ ├── model
│ │ │ ├── FooterModel.kt
│ │ │ ├── HeaderModel.kt
│ │ │ ├── DynamicScreenModel.kt
│ │ │ └── StaticScreenModel.kt
│ │ ├── view
│ │ │ ├── StaticScreenView.kt
│ │ │ ├── LoadingDotsView.kt
│ │ │ ├── FooterView.kt
│ │ │ ├── HeaderView.kt
│ │ │ ├── DynamicScreenView.kt
│ │ │ └── DataItemView.kt
│ │ └── presenter
│ │ │ ├── FooterPresenter.kt
│ │ │ ├── HeaderPresenter.kt
│ │ │ └── DataItemPresenter.kt
│ │ └── LauncherActivity.kt
└── proguard-rules.pro
├── .gitignore
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── settings.gradle
├── compiler
└── src
│ └── main
│ ├── java
│ └── com
│ │ └── xfinity
│ │ └── blueprint_compiler
│ │ ├── extension-utils.kt
│ │ ├── UnnamedPackageException.kt
│ │ └── Messager.kt
│ └── resources
│ └── META-INF
│ └── services
│ └── javax.annotation.processing.Processor
├── CONTRIBUTING
├── NOTICE
├── rmvp.iml
└── gradle.properties
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | *.iml
--------------------------------------------------------------------------------
/bootstrap/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/architecture/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/library/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | *.iml
--------------------------------------------------------------------------------
/sample-library/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | *.iml
--------------------------------------------------------------------------------
/blueprint-annotations/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | *.iml
--------------------------------------------------------------------------------
/sample-library-app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 | *.iml
--------------------------------------------------------------------------------
/app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker:
--------------------------------------------------------------------------------
1 | mock-maker-inline
--------------------------------------------------------------------------------
/bootstrap/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker:
--------------------------------------------------------------------------------
1 | mock-maker-inline
2 |
--------------------------------------------------------------------------------
/sample-library-app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker:
--------------------------------------------------------------------------------
1 | mock-maker-inline
--------------------------------------------------------------------------------
/sample-library/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker:
--------------------------------------------------------------------------------
1 | mock-maker-inline
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | build/
3 | .gradle/
4 | local.properties
5 | *.iml./gradle.properties
6 | *.iml
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/font/poppins_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/font/poppins_bold.ttf
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/drawable/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/assets/fonts/poppins_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/assets/fonts/poppins_bold.ttf
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/architecture/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | blueprint-architecture
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':library', ':compiler', ':blueprint-annotations', ':architecture', ':sample-library', ':sample-library-app'
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/utils/Launcher.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint_bootstrap.utils
2 |
3 | class Launcher() {
4 | }
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/bootstrap/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/bootstrap/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/bootstrap/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/bootstrap/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/bootstrap/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/bootstrap/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/bootstrap/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample-library/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-library/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-library/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/bootstrap/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/bootstrap/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/bootstrap/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library-app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library-app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-library/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-library/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/architecture/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library-app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library-app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-library/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample-library/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library-app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-library/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample-library/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample-library/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library-app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library-app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library-app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library-app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/comcast/blueprint/master/sample-library-app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/library/src/main/java/com/xfinity/blueprint/presenter/PauseResumeHandler.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint.presenter
2 |
3 | interface PauseResumeHandler {
4 | fun pause()
5 | fun resume()
6 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/BlueprintSampleApplication.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint_sample
2 |
3 | import android.app.Application
4 |
5 | @Suppress("unused")
6 | class BlueprintSampleApplication : Application()
--------------------------------------------------------------------------------
/blueprint-annotations/src/main/java/com/xfinity/blueprint_annotations/DefaultPresenterConstructor.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint_annotations
2 |
3 | @Target(AnnotationTarget.CONSTRUCTOR)
4 | annotation class DefaultPresenterConstructor
5 |
--------------------------------------------------------------------------------
/architecture/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/BlueprintSampleApplication.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint_sample_library
2 |
3 | import android.app.Application
4 |
5 | @Suppress("unused")
6 | class BlueprintSampleApplication : Application()
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/BlueprintSampleApplication.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint_sample_library_app
2 |
3 | import android.app.Application
4 |
5 | @Suppress("unused")
6 | class BlueprintSampleApplication : Application()
--------------------------------------------------------------------------------
/app/src/main/res/font/poppins.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Wed Oct 19 09:42:11 EDT 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/blueprint-annotations/src/main/java/com/xfinity/blueprint_annotations/ComponentViewClass.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint_annotations
2 |
3 | import kotlin.reflect.KClass
4 |
5 | @Target(AnnotationTarget.CLASS, AnnotationTarget.FILE)
6 | annotation class ComponentViewClass(val viewHolderClass: KClass<*>)
7 |
--------------------------------------------------------------------------------
/blueprint-annotations/src/main/java/com/xfinity/blueprint_annotations/ComponentViewHolder.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint_annotations
2 |
3 |
4 | @Target(AnnotationTarget.CLASS, AnnotationTarget.FILE)
5 | annotation class ComponentViewHolder(val viewType: String)
6 |
7 | @Target(AnnotationTarget.CLASS, AnnotationTarget.FILE)
8 | annotation class BasicComponent
9 |
--------------------------------------------------------------------------------
/blueprint-annotations/src/main/java/com/xfinity/blueprint_annotations/DefaultPresenter.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint_annotations
2 |
3 | import kotlin.reflect.KClass
4 |
5 | @Target(AnnotationTarget.CLASS, AnnotationTarget.FILE)
6 | annotation class DefaultPresenter(val viewClass: KClass<*>)
7 |
8 | //TODO if the 'library' project were a straight java project, we could enforce stricter rules on this annotation,
9 | // i.e. val viewClass: KClass
10 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/custom_layout_fragment_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
--------------------------------------------------------------------------------
/compiler/src/main/java/com/xfinity/blueprint_compiler/extension-utils.kt:
--------------------------------------------------------------------------------
1 | @file:JvmName("Utils")
2 |
3 | package com.xfinity.blueprint_compiler
4 |
5 | import javax.lang.model.element.TypeElement
6 | import javax.lang.model.util.Elements
7 |
8 | @Throws(UnnamedPackageException::class)
9 | fun Elements.getPackageName(type: TypeElement): String {
10 | val pkg = this.getPackageOf(type)
11 |
12 | if (pkg.isUnnamed) {
13 | throw UnnamedPackageException(type)
14 | }
15 |
16 | return pkg.qualifiedName.toString()
17 | }
18 |
--------------------------------------------------------------------------------
/CONTRIBUTING:
--------------------------------------------------------------------------------
1 | Contributing Guidelines
2 |
3 | If you would like to contribute code to this project you can do so through GitHub by forking the repository and sending a pull request. Before Comcast merges your code into the project you must sign the Comcast Contributor License Agreement (CLA): https://tinyurl.com/comcast-cla. If you haven't previously signed a Comcast CLA, you'll automatically be asked to when you open a pull request. Alternatively, we can e-mail you a PDF that you can sign and scan back to us. Please send us an e-mail or create a new GitHub issue to request a PDF version of the CLA.
4 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | Copyright 2017 Comcast Cable Communications Management, LLC
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
15 |
16 | This product includes software developed at Comcast ( http://www.comcast.com/).
17 |
--------------------------------------------------------------------------------
/compiler/src/main/resources/META-INF/services/javax.annotation.processing.Processor:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2017 Comcast Cable Communications Management, LLC
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | # Unless required by applicable law or agreed to in writing, software
7 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | # See the License for the specific language governing permissions and
9 | # limitations under the License.
10 | #
11 |
12 | com.xfinity.blueprint_compiler.BlueprintProcessor
--------------------------------------------------------------------------------
/library/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 | recycler_mvp
14 |
15 |
--------------------------------------------------------------------------------
/architecture/src/main/java/com/xfinity/blueprint/architecture/ScreenManager.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint.architecture
2 |
3 | import androidx.recyclerview.widget.RecyclerView
4 |
5 | class RecyclerViewScreenManager(private val recyclerView: androidx.recyclerview.widget.RecyclerView) : ScreenManager {
6 | override fun setBackgroundColor(color: Int) {
7 | recyclerView.setBackgroundColor(color)
8 | }
9 |
10 | override fun scrollToBottom() {
11 | recyclerView.adapter?.let {
12 | recyclerView.smoothScrollToPosition(it.itemCount - 1)
13 | }
14 | }
15 |
16 | override fun scrollToTop() {
17 | recyclerView.smoothScrollToPosition(0)
18 | }
19 | }
20 |
21 | interface ScreenManager {
22 | fun setBackgroundColor(color: Int)
23 | fun scrollToBottom()
24 | fun scrollToTop()
25 | }
--------------------------------------------------------------------------------
/architecture/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/bootstrap/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/library/src/main/java/com/xfinity/blueprint/event/ComponentEvent.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint.event
13 |
14 | interface ComponentEvent
15 |
16 | interface ComponentEventListener {
17 | fun onComponentEvent(componentEvent: ComponentEvent) : Boolean
18 | }
19 |
--------------------------------------------------------------------------------
/sample-library/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
16 |
17 |
--------------------------------------------------------------------------------
/rmvp.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/architecture/src/androidTest/java/com/dapp/blueprint_architecture/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.dapp.blueprint_architecture;
2 |
3 | import android.content.Context;
4 | import androidx.test.InstrumentationRegistry;
5 | import androidx.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.dapp.blueprint_architecture.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/library/src/main/java/com/xfinity/blueprint/presenter/ScreenPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint.presenter
13 |
14 | import com.xfinity.blueprint.view.ScreenView
15 |
16 | interface ScreenPresenter {
17 | fun attachView(screenView: T)
18 | fun present()
19 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/model/FooterModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.model
13 |
14 | import com.xfinity.blueprint.model.ComponentModel
15 |
16 | class FooterModel : ComponentModel {
17 | val footer : String = "This is the footer"
18 | var enabled = false
19 | }
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/model/api/CurrentWeather.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap.model.api
16 |
17 | data class CurrentWeather(val weather: List)
18 | data class Weather(val main: String, val description: String)
19 |
--------------------------------------------------------------------------------
/compiler/src/main/java/com/xfinity/blueprint_compiler/UnnamedPackageException.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_compiler
13 |
14 | import javax.lang.model.element.TypeElement
15 |
16 | internal class UnnamedPackageException(typeElement: TypeElement) : Exception("The package of ${typeElement.simpleName} is unnamed")
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/model/HeaderModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.model
13 |
14 | import com.xfinity.blueprint.model.ComponentModel
15 |
16 | open class HeaderModel : ComponentModel {
17 | open var header : String = "this is a header"
18 | open var enabled : Boolean = false
19 | }
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/component/model/SimpleTextModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap.component.model
16 |
17 | import com.xfinity.blueprint.model.ComponentModel
18 |
19 | data class SimpleTextModel(val text: CharSequence) : ComponentModel
--------------------------------------------------------------------------------
/app/src/main/res/drawable/header_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/model/FooterModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.model
13 |
14 | import com.xfinity.blueprint.model.ComponentModel
15 |
16 | class FooterModel : ComponentModel {
17 | val footer : String = "This is the footer"
18 | var enabled = false
19 | }
--------------------------------------------------------------------------------
/bootstrap/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
16 |
17 | 16dp
18 | 16dp
19 |
20 |
--------------------------------------------------------------------------------
/bootstrap/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 | #3F51B5
18 | #303F9F
19 | #FF4081
20 |
21 |
--------------------------------------------------------------------------------
/sample-library/src/main/res/drawable/header_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/library/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
16 |
17 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/model/FooterModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.model
13 |
14 | import com.xfinity.blueprint.model.ComponentModel
15 |
16 | class FooterModel : ComponentModel {
17 | val footer : String = "This is the footer"
18 | var enabled = false
19 | }
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/drawable/header_bg.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/view/StaticScreenView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.view
13 |
14 | import com.xfinity.blueprint.view.ScreenView
15 | import com.xfinity.blueprint.view.ScreenViewDelegate
16 |
17 | class StaticScreenView(val screenViewDelegate: ScreenViewDelegate) :
18 | ScreenView by screenViewDelegate
--------------------------------------------------------------------------------
/library/src/main/java/com/xfinity/blueprint/presenter/ComponentPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint.presenter
13 |
14 | import com.xfinity.blueprint.model.ComponentModel
15 | import com.xfinity.blueprint.view.ComponentView
16 |
17 | interface ComponentPresenter, M : ComponentModel> {
18 | fun present(view: V, model: M)
19 | }
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/model/HeaderModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.model
13 |
14 | import com.xfinity.blueprint.model.ComponentModel
15 |
16 | open class HeaderModel : ComponentModel {
17 | open var header : String = "this is a header"
18 | open var enabled : Boolean = false
19 | }
--------------------------------------------------------------------------------
/app/src/main/res/menu/main_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/model/HeaderModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.model
13 |
14 | import com.xfinity.blueprint.model.ComponentModel
15 |
16 | open class HeaderModel : ComponentModel {
17 | open var header : String = "this is a header"
18 | open var enabled : Boolean = false
19 | }
--------------------------------------------------------------------------------
/sample-library/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 | Blueprint Sample
14 | Static Screen Example
15 | Dynamic Screen Example
16 | Blueprint Architecture Lib Example
17 |
18 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 | Blueprint Sample
14 | Static Screen Example
15 | Dynamic Screen Example
16 | Blueprint Architecture Lib Example
17 |
18 |
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/view/StaticScreenView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.view
13 |
14 | import com.xfinity.blueprint.view.ScreenView
15 | import com.xfinity.blueprint.view.ScreenViewDelegate
16 |
17 | class StaticScreenView(val screenViewDelegate: ScreenViewDelegate) :
18 | ScreenView by screenViewDelegate
--------------------------------------------------------------------------------
/sample-library/src/main/res/menu/main_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/menu/main_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/view/CustomScreenView.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint_sample.mvp.view
2 |
3 | import com.google.android.material.floatingactionbutton.FloatingActionButton
4 | import com.xfinity.blueprint.architecture.*
5 | import com.xfinity.blueprint.view.ScreenViewDelegate
6 |
7 | class CustomScreenView(private val fab: FloatingActionButton?, screenViewDelegate: ScreenViewDelegate,
8 | errorView: MessageView, refreshHandler: RefreshHandler, screenManager: ScreenManager) :
9 | DefaultScreenView(screenViewDelegate, errorView, refreshHandler, screenManager), FabView {
10 |
11 | override fun setFabOnClickedBehavior(behavior: () -> Unit) {
12 | fab?.setOnClickListener { behavior.invoke() }
13 | }
14 |
15 | override fun setFabSource(sourceId: Int) {
16 | fab?.setImageResource(sourceId)
17 | }
18 | }
19 |
20 | interface FabView {
21 | fun setFabOnClickedBehavior(behavior: () -> Unit)
22 | fun setFabSource(sourceId: Int)
23 | }
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/view/StaticScreenView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.view
13 |
14 | import com.xfinity.blueprint.view.ScreenView
15 | import com.xfinity.blueprint.view.ScreenViewDelegate
16 |
17 | class StaticScreenView(val screenViewDelegate: ScreenViewDelegate) :
18 | ScreenView by screenViewDelegate
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/mdappo200/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/bootstrap/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/library/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/mdappo200/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/library/src/main/java/com/xfinity/blueprint/presenter/DefaultComponentPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint.presenter
13 |
14 | import com.xfinity.blueprint.model.ComponentModel
15 | import com.xfinity.blueprint.view.ComponentView
16 |
17 | open class DefaultComponentPresenter : ComponentPresenter, ComponentModel> {
18 | override fun present(view: ComponentView<*>, model: ComponentModel) {}
19 | }
--------------------------------------------------------------------------------
/sample-library/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/mdappo200/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/sample-library-app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in /Users/mdappo200/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/sample-library/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 | #3F51B5
15 | #303F9F
16 | #FF4081
17 | #909090
18 | #cccccc
19 | #ffffff
20 |
21 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 | #3F51B5
15 | #303F9F
16 | #FF4081
17 | #909090
18 | #cccccc
19 | #ffffff
20 |
21 |
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/dagger/Qualifiers.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap.dagger
16 |
17 | import javax.inject.Qualifier
18 |
19 | @Qualifier
20 | @MustBeDocumented
21 | @Retention(AnnotationRetention.RUNTIME)
22 | annotation class ActivityContext
23 |
24 | @Qualifier
25 | @MustBeDocumented
26 | @Retention(AnnotationRetention.RUNTIME)
27 | annotation class ApplicationContext
--------------------------------------------------------------------------------
/app/src/main/res/layout/switch_item.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
16 |
17 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 | #3F51B5
15 | #303F9F
16 | #FF4081
17 | #909090
18 | #cccccc
19 | #ffffff
20 | #ff0000
21 |
22 |
--------------------------------------------------------------------------------
/bootstrap/src/main/res/drawable/ic_home_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
20 |
23 |
24 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/layout/switch_item.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
16 |
17 |
22 |
23 |
--------------------------------------------------------------------------------
/sample-library/src/main/res/layout/switch_item.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
16 |
17 |
22 |
23 |
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/model/DynamicScreenModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.model
13 |
14 | open class DynamicScreenModel {
15 | open var headerModel: HeaderModel = HeaderModel()
16 | var footerModel: FooterModel = FooterModel()
17 | open var dataItemModels: MutableList = mutableListOf(DataItemModel(), DataItemModel(), DataItemModel(),
18 | DataItemModel(), DataItemModel(), DataItemModel())
19 | }
--------------------------------------------------------------------------------
/architecture/src/main/res/layout/screen_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
12 |
13 |
17 |
18 |
19 |
20 |
27 |
28 |
--------------------------------------------------------------------------------
/bootstrap/src/main/res/drawable/ic_dashboard_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
20 |
23 |
24 |
--------------------------------------------------------------------------------
/bootstrap/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
16 |
17 |
18 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/library/src/test/java/com/xfinity/blueprint/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint;
13 |
14 | import org.junit.Test;
15 |
16 | import static org.junit.Assert.*;
17 |
18 | /**
19 | * Example local unit test, which will execute on the development machine (host).
20 | *
21 | * @see Testing documentation
22 | */
23 | public class ExampleUnitTest {
24 | @Test
25 | public void addition_isCorrect() throws Exception {
26 | assertEquals(4, 2 + 2);
27 | }
28 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/model/DynamicScreenModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.model
13 |
14 | import com.xfinity.blueprint_sample.R
15 |
16 | open class DynamicScreenModel {
17 | open var headerModel: HeaderModel = HeaderModel()
18 | var footerModel: FooterModel = FooterModel()
19 | open var dataItemModels: MutableList = mutableListOf(DataItemModel(), DataItemModel(), DataItemModel(),
20 | DataItemModel(), DataItemModel(resourceId = R.drawable.ic_launcher), DataItemModel())
21 | }
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 |
2 | # Project-wide Gradle settings.
3 |
4 | # IDE (e.g. Android Studio) users:
5 | # Gradle settings configured through the IDE *will override*
6 | # any settings specified in this file.
7 |
8 | # For more details on how to configure your build environment visit
9 | # http://www.gradle.org/docs/current/userguide/build_environment.html
10 |
11 | # Specifies the JVM arguments used for the daemon process.
12 | # The setting is particularly useful for tweaking memory settings.
13 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
14 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
15 |
16 | # When configured, Gradle will run in incubating parallel mode.
17 | # This option should only be used with decoupled projects. More details, visit
18 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
19 | # org.gradle.parallel=true
20 |
21 | signing.keyId=
22 | signing.password=
23 | signing.secretKeyRingFile=
24 |
25 | android.injected.testOnly=false
26 | org.gradle.jvmargs=-Xmx4608m
27 |
28 | sonatypeUsername=
29 | sonatypePassword=
30 | android.useAndroidX=true
31 | android.enableJetifier=true
32 |
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/utils/Scheduler.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap.utils
16 |
17 | import io.reactivex.Scheduler
18 | import io.reactivex.android.schedulers.AndroidSchedulers
19 |
20 | interface Schedulers {
21 | val ioThread: Scheduler
22 | val mainThread: Scheduler
23 | }
24 |
25 | class MySchedulers : Schedulers {
26 | override val ioThread = io.reactivex.schedulers.Schedulers.io()
27 | override val mainThread: Scheduler = AndroidSchedulers.mainThread()
28 | }
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
23 |
24 |
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/screen/model/MainScreenModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap.screen.model
16 |
17 | import com.xfinity.blueprint_bootstrap.ApiClient
18 | import com.xfinity.blueprint_bootstrap.model.api.CurrentWeather
19 | import io.reactivex.Observable
20 | import javax.inject.Inject
21 |
22 | class MainScreenModel @Inject constructor(private val apiClient: ApiClient) {
23 | fun loadData(city: String) : Observable = apiClient.getCurrentWeatherByCity(city)
24 | }
--------------------------------------------------------------------------------
/sample-library/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
23 |
24 |
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/ApiClient.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap
16 |
17 | import com.xfinity.blueprint_bootstrap.model.api.CurrentWeather
18 | import com.xfinity.blueprint_bootstrap.webservices.OpenApiWeatherMapService
19 | import io.reactivex.Observable
20 |
21 | class ApiClient(private val openApiWeatherMapService: OpenApiWeatherMapService) {
22 | fun getCurrentWeatherByCity(city: String) : Observable =
23 | openApiWeatherMapService.currentWeatherByCity(city)
24 | }
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/model/DynamicScreenModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.model
13 |
14 | import com.xfinity.blueprint_sample_library.mvp.model.DataItemModel
15 |
16 | open class DynamicScreenModel {
17 | open var headerModel: HeaderModel = HeaderModel()
18 | var footerModel: FooterModel = FooterModel()
19 | open var dataItemModels: MutableList = mutableListOf(DataItemModel(), DataItemModel(), DataItemModel(),
20 | DataItemModel(), DataItemModel(), DataItemModel())
21 | }
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
23 |
24 |
--------------------------------------------------------------------------------
/sample-library/src/main/res/layout/loading_indicator.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
24 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/loading_indicator.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
25 |
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/dagger/ApplicationComponent.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap.dagger
16 |
17 | import com.xfinity.blueprint_bootstrap.BootstrapApplication
18 | import dagger.Component
19 | import dagger.android.AndroidInjectionModule
20 | import javax.inject.Singleton
21 |
22 | @Singleton
23 | @Component(modules = [(AndroidInjectionModule::class),
24 | (ApplicationModule::class),
25 | (InjectorsModule::class)])
26 | interface ApplicationComponent {
27 | fun inject(target: BootstrapApplication)
28 | }
--------------------------------------------------------------------------------
/library/src/main/java/com/xfinity/blueprint/presenter/EventEmittingComponentPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint.presenter
13 |
14 | import com.xfinity.blueprint.event.ComponentEventManager
15 | import com.xfinity.blueprint.model.ComponentModel
16 | import com.xfinity.blueprint.view.ComponentView
17 |
18 | @Deprecated("Any Component that has access to the ComponentEventManager can send events. Don't use a subclass for this.")
19 | interface EventEmittingComponentPresenter, M : ComponentModel> : ComponentPresenter {
20 | val componentEventManager: ComponentEventManager
21 | }
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/layout/loading_indicator.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
17 |
18 |
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/view/LoadingIndicator.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.view
13 |
14 | import android.view.View
15 | import androidx.recyclerview.widget.RecyclerView
16 | import com.xfinity.blueprint_annotations.ComponentViewClass
17 | import com.xfinity.blueprint_annotations.ComponentViewHolder
18 |
19 | @ComponentViewClass(viewHolderClass = LoadingIndicatorViewHolder::class)
20 | class LoadingIndicator : LoadingIndicatorBase()
21 |
22 | @ComponentViewHolder(viewType = "loading_indicator")
23 | class LoadingIndicatorViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
--------------------------------------------------------------------------------
/bootstrap/src/main/res/menu/toolbar_actions.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
29 |
--------------------------------------------------------------------------------
/architecture/src/main/java/com/xfinity/blueprint/architecture/ToolbarContracts.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint.architecture
2 |
3 | import android.graphics.drawable.Drawable
4 | import androidx.annotation.DrawableRes
5 |
6 | interface ToolbarView {
7 | var onActionItemSelectedBehavior: (Int) -> Boolean
8 | var onToolbarBackButtonClickedBehavior: () -> Boolean
9 | fun setToolbarActionItemIcon(itemId: Int, iconId: Int)
10 | fun setToolbarActionItemIsVisible(itemId: Int, isVisible: Boolean)
11 | fun setToolbarTitle(title: CharSequence)
12 | fun hideToolbarBackButton()
13 | fun showToolbarBackButton()
14 | fun setToolbarIcon(@DrawableRes resId: Int)
15 | fun showToolBar()
16 | fun hideToolBar()
17 | fun setShowHomeAsUp(showHomeAsUp: Boolean)
18 | fun setUpIndicatorIcon(upIndicatorId: Int)
19 | fun setUpIndicatorIcon(upIndicator: Drawable)
20 | }
21 |
22 | interface ToolbarPresenter {
23 | fun attachToolbarView(toolbarView: ToolbarView?)
24 | fun presentToolbar()
25 | }
26 |
27 | abstract class DefaultToolbarPresenter: ToolbarPresenter {
28 | abstract var toolbarView: ToolbarView?
29 | override fun attachToolbarView(toolbarView: ToolbarView?) {
30 | this.toolbarView = toolbarView
31 | }
32 | }
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/dagger/Scopes.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap.dagger
16 |
17 | import javax.inject.Qualifier
18 | import javax.inject.Scope
19 |
20 | @Retention
21 | @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.FILE)
22 | @Scope
23 | annotation class PerActivity
24 |
25 | @Qualifier
26 | @MustBeDocumented
27 | @Retention(AnnotationRetention.RUNTIME)
28 | annotation class Authenticating
29 |
30 | @Qualifier
31 | @MustBeDocumented
32 | @Retention(AnnotationRetention.RUNTIME)
33 | annotation class Default
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/presenter/FooterPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.presenter
13 |
14 | import com.xfinity.blueprint.presenter.ComponentPresenter
15 | import com.xfinity.blueprint_annotations.DefaultPresenter
16 | import com.xfinity.blueprint_sample.mvp.model.FooterModel
17 | import com.xfinity.blueprint_sample.mvp.view.FooterView
18 |
19 | @DefaultPresenter(viewClass = FooterView::class)
20 | class FooterPresenter : ComponentPresenter {
21 | override fun present(view: FooterView, model: FooterModel) {
22 | view.setFooterText(model.footer)
23 | }
24 | }
--------------------------------------------------------------------------------
/bootstrap/src/main/res/drawable/ic_notifications_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
20 |
23 |
24 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/model/DataItemModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.model
13 |
14 | import com.xfinity.blueprint.model.ComponentModel
15 |
16 | class DataItemModel(val data : String = "This is some data", var resourceId: Int? = null) : ComponentModel {
17 | var enabled = false
18 |
19 | override fun equals(other: Any?): Boolean {
20 | return other is DataItemModel && other.enabled == enabled
21 | }
22 |
23 | override fun hashCode(): Int {
24 | var result = data.hashCode()
25 | result = 31 * result + enabled.hashCode()
26 | return result
27 | }
28 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/model/StaticScreenModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.model
13 |
14 | open class StaticScreenModel {
15 | val headerModel: HeaderModel = HeaderModel()
16 | val footerModel: FooterModel = FooterModel()
17 | val dataItemModels: List = listOf(DataItemModel(), DataItemModel(), DataItemModel(),
18 | DataItemModel(), DataItemModel(), DataItemModel())
19 |
20 | init {
21 | headerModel.enabled = true
22 | footerModel.enabled = true
23 | dataItemModels.forEach({
24 | it.enabled = true
25 | })
26 | }
27 | }
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/webservices/ApiKeyInterceptor.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap.webservices
16 |
17 | import okhttp3.Interceptor
18 | import okhttp3.Response
19 |
20 | class ApiKeyInterceptor(private val apiKey: String) : Interceptor {
21 | override fun intercept(chain: Interceptor.Chain): Response {
22 | var request = chain.request()
23 | val url = request.url().newBuilder().addQueryParameter("appid", apiKey).build()
24 | request = request.newBuilder().url(url).build()
25 | return chain.proceed(request)
26 | }
27 | }
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/view/LoadingIndicator.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.view
13 |
14 | import android.view.View
15 | import androidx.recyclerview.widget.RecyclerView
16 | import com.xfinity.blueprint_annotations.ComponentViewClass
17 | import com.xfinity.blueprint_annotations.ComponentViewHolder
18 |
19 | @ComponentViewClass(viewHolderClass = LoadingIndicatorViewHolder::class)
20 | class LoadingIndicator : LoadingIndicatorBase()
21 |
22 | @ComponentViewHolder(viewType = "loading_indicator")
23 | class LoadingIndicatorViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/model/DataItemModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.model
13 |
14 | import com.xfinity.blueprint.model.ComponentModel
15 |
16 | class DataItemModel : ComponentModel {
17 | val data : String = "This is some data"
18 | var enabled = false
19 |
20 | override fun equals(other: Any?): Boolean {
21 | return other is DataItemModel && other.enabled == enabled
22 | }
23 |
24 | override fun hashCode(): Int {
25 | var result = data.hashCode()
26 | result = 31 * result + enabled.hashCode()
27 | return result
28 | }
29 | }
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/view/LoadingDotsView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.view
13 |
14 | import android.view.View
15 | import androidx.recyclerview.widget.RecyclerView
16 | import com.xfinity.blueprint_annotations.ComponentViewClass
17 | import com.xfinity.blueprint_annotations.ComponentViewHolder
18 |
19 | @ComponentViewClass(viewHolderClass = LoadingIndicatorViewHolder::class)
20 | class LoadingIndicator : LoadingIndicatorBase()
21 |
22 | @ComponentViewHolder(viewType = "loading_indicator")
23 | class LoadingIndicatorViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView)
--------------------------------------------------------------------------------
/app/src/main/res/layout/header_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
19 |
25 |
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/model/StaticScreenModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.model
13 |
14 | open class StaticScreenModel {
15 | val headerModel: HeaderModel = HeaderModel()
16 | val footerModel: FooterModel = FooterModel()
17 | val dataItemModels: List = listOf(DataItemModel(), DataItemModel(), DataItemModel(),
18 | DataItemModel(), DataItemModel(), DataItemModel())
19 |
20 | init {
21 | headerModel.enabled = true
22 | footerModel.enabled = true
23 | dataItemModels.forEach({
24 | it.enabled = true
25 | })
26 | }
27 | }
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/presenter/FooterPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.presenter
13 |
14 | import com.xfinity.blueprint.presenter.ComponentPresenter
15 | import com.xfinity.blueprint_annotations.DefaultPresenter
16 | import com.xfinity.blueprint_sample_library.mvp.model.FooterModel
17 | import com.xfinity.blueprint_sample_library.mvp.view.FooterView
18 |
19 | @DefaultPresenter(viewClass = FooterView::class)
20 | class FooterPresenter : ComponentPresenter {
21 | override fun present(view: FooterView, model: FooterModel) {
22 | view.setFooterText(model.footer)
23 | }
24 | }
--------------------------------------------------------------------------------
/sample-library/src/main/res/layout/header_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
19 |
25 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/presenter/HeaderPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.presenter
13 |
14 | import com.xfinity.blueprint.presenter.ComponentPresenter
15 | import com.xfinity.blueprint_annotations.DefaultPresenter
16 | import com.xfinity.blueprint_sample.mvp.model.HeaderModel
17 | import com.xfinity.blueprint_sample.mvp.view.HeaderView
18 |
19 | @DefaultPresenter(viewClass = HeaderView::class)
20 | class HeaderPresenter : ComponentPresenter {
21 | override fun present(view: HeaderView, model: HeaderModel) {
22 | view.setEnabled(model.enabled)
23 | view.setHeaderText(model.header)
24 | }
25 | }
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/layout/header_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
19 |
25 |
--------------------------------------------------------------------------------
/bootstrap/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
14 |
15 |
16 | Blueprint Bootstrap
17 | Today
18 | This Week
19 | Notifications
20 | http://api.openweathermap.org/data/2.5/
21 | 5aa5db6d067f913346a3d430e1f3f4b5
22 | Launch Google
23 | Launch Amazon
24 |
25 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/presenter/FooterPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.presenter
13 |
14 | import com.xfinity.blueprint.presenter.ComponentPresenter
15 | import com.xfinity.blueprint_annotations.DefaultPresenter
16 | import com.xfinity.blueprint_sample_library_app.mvp.model.FooterModel
17 | import com.xfinity.blueprint_sample_library_app.mvp.view.FooterView
18 |
19 | @DefaultPresenter(viewClass = FooterView::class)
20 | class FooterPresenter : ComponentPresenter {
21 | override fun present(view: FooterView, model: FooterModel) {
22 | view.setFooterText(model.footer)
23 | }
24 | }
--------------------------------------------------------------------------------
/sample-library/src/main/res/layout/data_item_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
19 |
25 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/layout/data_item_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
19 |
25 |
--------------------------------------------------------------------------------
/library/src/main/java/com/xfinity/blueprint/presenter/ComponentEventHandler.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint.presenter
13 |
14 | import com.xfinity.blueprint.event.ComponentEventListener
15 | import com.xfinity.blueprint.event.ComponentEventManager
16 |
17 | /**
18 | * A ComponentEventListener that provides APIs to register and unregister itself
19 | */
20 | interface ComponentEventHandler: ComponentEventListener, PauseResumeHandler {
21 | val componentEventManager : ComponentEventManager
22 |
23 | override fun resume() {
24 | componentEventManager.registerListener(this)
25 | }
26 |
27 | override fun pause() {
28 | componentEventManager.unregisterListener(this)
29 | }
30 | }
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 | Blueprint Sample
14 | Static Screen Example
15 | Dynamic Screen Example
16 | Blueprint Architecture Lib Example
17 | Custom Screen View Activity Example
18 | Custom Screen View Fragment Example
19 | This is a basic component example
20 | Basic Component Example was clicked
21 |
22 |
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/presenter/HeaderPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.presenter
13 |
14 | import com.xfinity.blueprint.presenter.ComponentPresenter
15 | import com.xfinity.blueprint_annotations.DefaultPresenter
16 | import com.xfinity.blueprint_sample_library.mvp.model.HeaderModel
17 | import com.xfinity.blueprint_sample_library.mvp.view.HeaderView
18 |
19 | @DefaultPresenter(viewClass = HeaderView::class)
20 | class HeaderPresenter : ComponentPresenter {
21 | override fun present(view: HeaderView, model: HeaderModel) {
22 | view.setEnabled(model.enabled)
23 | view.setHeaderText(model.header)
24 | }
25 | }
--------------------------------------------------------------------------------
/app/src/main/res/layout/footer_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
20 |
26 |
--------------------------------------------------------------------------------
/library/src/main/java/com/xfinity/blueprint/view/ComponentView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint.view
13 |
14 | import android.view.ViewGroup
15 | import com.xfinity.blueprint.model.ComponentModel
16 | import com.xfinity.blueprint.presenter.ComponentPresenter
17 |
18 | /**
19 | * View (mVp) class representing an component in a recyclerview adapter
20 | */
21 | interface ComponentView {
22 | var viewHolder: T
23 | fun onCreateViewHolder(parent: ViewGroup) : T
24 | fun onBindViewHolder(componentPresenter: ComponentPresenter, ComponentModel>, viewHolder: androidx.recyclerview.widget.RecyclerView.ViewHolder, position: Int)
25 | fun getViewType() : Int
26 | }
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/dagger/ActivityModules.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap.dagger
16 |
17 | import android.content.Context
18 | import com.xfinity.blueprint_bootstrap.MainActivity
19 | import com.xfinity.blueprint_bootstrap.MainToolbarActivity
20 | import dagger.Binds
21 | import dagger.Module
22 |
23 | @Module
24 | abstract class MainActivityModule {
25 | @ActivityContext
26 | @Binds
27 | abstract fun provideContext(activity: MainActivity): Context
28 | }
29 |
30 | @Module
31 | abstract class MainToolbarActivityModule {
32 | @ActivityContext
33 | @Binds
34 | abstract fun provideContext(activity: MainToolbarActivity): Context
35 | }
--------------------------------------------------------------------------------
/library/src/main/java/com/xfinity/blueprint/event/ComponentEventManager.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint.event
13 |
14 | class ComponentEventManager {
15 | val listeners = mutableListOf()
16 |
17 | fun registerListener(componentEventListener: ComponentEventListener) {
18 | listeners.add(componentEventListener)
19 | }
20 |
21 | fun unregisterListener(componentEventListener: ComponentEventListener) {
22 | listeners.remove(componentEventListener)
23 | }
24 |
25 | fun postEvent(componentEvent: ComponentEvent) {
26 | listeners.forEach {
27 | if (it.onComponentEvent(componentEvent)) {
28 | return@forEach
29 | }
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/presenter/HeaderPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.presenter
13 |
14 | import com.xfinity.blueprint.presenter.ComponentPresenter
15 | import com.xfinity.blueprint_annotations.DefaultPresenter
16 | import com.xfinity.blueprint_sample_library_app.mvp.model.HeaderModel
17 | import com.xfinity.blueprint_sample_library_app.mvp.view.HeaderView
18 |
19 | @DefaultPresenter(viewClass = HeaderView::class)
20 | class HeaderPresenter : ComponentPresenter {
21 | override fun present(view: HeaderView, model: HeaderModel) {
22 | view.setEnabled(model.enabled)
23 | view.setHeaderText(model.header)
24 | }
25 | }
--------------------------------------------------------------------------------
/sample-library/src/main/res/layout/footer_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
20 |
26 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/layout/footer_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
20 |
26 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/model/StaticScreenModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.model
13 |
14 | import com.xfinity.blueprint_sample_library.mvp.model.DataItemModel
15 |
16 | open class StaticScreenModel {
17 | val headerModel: HeaderModel = HeaderModel()
18 | val footerModel: FooterModel = FooterModel()
19 | val dataItemModels: List = listOf(DataItemModel(), DataItemModel(), DataItemModel(),
20 | DataItemModel(), DataItemModel(), DataItemModel())
21 |
22 | init {
23 | headerModel.enabled = true
24 | footerModel.enabled = true
25 | dataItemModels.forEach({
26 | it.enabled = true
27 | })
28 | }
29 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/view/FooterView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.view
13 |
14 | import androidx.recyclerview.widget.RecyclerView
15 | import android.widget.TextView
16 | import com.xfinity.blueprint_annotations.ComponentViewClass
17 | import com.xfinity.blueprint_annotations.ComponentViewHolder
18 | import com.xfinity.blueprint_sample.R
19 |
20 | @ComponentViewClass(viewHolderClass = FooterViewHolder::class)
21 | class FooterView : FooterViewBase()
22 |
23 | @ComponentViewHolder(viewType = "footer_view")
24 | class FooterViewHolder(itemView: android.view.View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(itemView) {
25 | val footer : TextView = itemView.findViewById(R.id.footer) as TextView
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/component/presenter/HelloComponentPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap.component.presenter
16 |
17 | import com.xfinity.blueprint_bootstrap.component.model.SimpleTextModel
18 | import com.xfinity.blueprint_bootstrap.component.view.HelloComponent
19 | import com.xfinity.blueprint.presenter.ComponentPresenter
20 | import com.xfinity.blueprint_annotations.DefaultPresenter
21 |
22 | @DefaultPresenter(viewClass = HelloComponent::class)
23 | class HelloComponentPresenter : ComponentPresenter {
24 | override fun present(view: HelloComponent, model: SimpleTextModel) {
25 | view.setHelloText(model.text)
26 | }
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/view/BasicComponentExample.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint_sample.mvp.view
2 |
3 | import android.view.View
4 | import com.xfinity.blueprint.architecture.component.BasicComponentViewHolder
5 | import com.xfinity.blueprint_annotations.BasicComponent
6 | import com.xfinity.blueprint_annotations.ComponentViewHolder
7 |
8 | /**
9 | * An example of a Basic Component definition. The layout can make use of any subset of the
10 | * views supported by the BasicComponentView, including three text fields, three buttons or image
11 | * buttons, and one image. Since the functions for presenting these views is already part of the
12 | * BasicComponentView class, no code is needed here. This declaration simply names the new
13 | * component, and associate it with its XML layout file. The ComponentView and ComponentPresenter
14 | * classes are generated for you.
15 | *
16 | * Naming is important: If you call your view holder SomethingViewHolder,
17 | * you will get a Something (ComponentView) class and a SomethingPresenter (ComponentPresenter)
18 | * class. If you call it Something, (no ViewHolder on the end) you will get a
19 | * SomethingView class and an SomethingPresenter class
20 | */
21 |
22 | @BasicComponent
23 | @ComponentViewHolder(viewType = "basic_component_example")
24 | class BasicComponentExampleViewHolder(itemView: View) : BasicComponentViewHolder(itemView)
--------------------------------------------------------------------------------
/app/src/main/res/layout/basic_component_example.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
14 |
20 |
29 |
--------------------------------------------------------------------------------
/bootstrap/src/main/res/menu/navigation.xml:
--------------------------------------------------------------------------------
1 |
2 |
15 |
16 |
34 |
--------------------------------------------------------------------------------
/library/src/main/java/com/xfinity/blueprint/presenter/EventHandlingScreenPresenter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint.presenter
13 |
14 | import com.xfinity.blueprint.event.ComponentEventListener
15 | import com.xfinity.blueprint.event.ComponentEventManager
16 | import com.xfinity.blueprint.view.ScreenView
17 |
18 | @Deprecated("To avoid collisions, have presenters implement ComponentEventHandler instead of inheriting from this class.")
19 | interface EventHandlingScreenPresenter : ScreenPresenter, ComponentEventListener {
20 | val componentEventManager : ComponentEventManager
21 |
22 | fun resume() {
23 | componentEventManager.registerListener(this)
24 | }
25 |
26 | fun pause() {
27 | componentEventManager.unregisterListener(this)
28 | }
29 | }
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/view/FooterView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.view
13 |
14 | import androidx.recyclerview.widget.RecyclerView
15 | import android.widget.TextView
16 | import com.xfinity.blueprint_annotations.ComponentViewClass
17 | import com.xfinity.blueprint_annotations.ComponentViewHolder
18 | import com.xfinity.blueprint_sample_library.R
19 |
20 | @ComponentViewClass(viewHolderClass = FooterViewHolder::class)
21 | class FooterView : FooterViewBase()
22 |
23 | @ComponentViewHolder(viewType = "footer_view")
24 | class FooterViewHolder(itemView: android.view.View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(itemView) {
25 | val footer : TextView = itemView.findViewById(R.id.footer) as TextView
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/view/FooterView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.view
13 |
14 | import androidx.recyclerview.widget.RecyclerView
15 | import android.widget.TextView
16 | import com.xfinity.blueprint_annotations.ComponentViewClass
17 | import com.xfinity.blueprint_annotations.ComponentViewHolder
18 | import com.xfinity.blueprint_sample_library_app.R
19 |
20 | @ComponentViewClass(viewHolderClass = FooterViewHolder::class)
21 | class FooterView : FooterViewBase()
22 |
23 | @ComponentViewHolder(viewType = "footer_view")
24 | class FooterViewHolder(itemView: android.view.View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(itemView) {
25 | val footer : TextView = itemView.findViewById(R.id.footer) as TextView
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/bootstrap/src/main/java/com/xfinity/blueprint_bootstrap/component/view/HelloComponent.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright 2018 Comcast Cable Communications Management, LLC
4 | * * Licensed under the Apache License, Version 2.0 (the "License");
5 | * * you may not use this file except in compliance with the License.
6 | * * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * * Unless required by applicable law or agreed to in writing, software
8 | * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 | * * See the License for the specific language governing permissions and
10 | * * limitations under the License.
11 | *
12 | *
13 | */
14 |
15 | package com.xfinity.blueprint_bootstrap.component.view
16 |
17 | import androidx.recyclerview.widget.RecyclerView
18 | import android.view.View
19 | import android.widget.TextView
20 | import com.xfinity.blueprint_annotations.ComponentViewClass
21 | import com.xfinity.blueprint_annotations.ComponentViewHolder
22 | import com.xfinity.blueprint_bootstrap.R
23 |
24 | @ComponentViewClass(viewHolderClass = HelloComponentViewHolder::class)
25 | class HelloComponent : HelloComponentBase()
26 |
27 | @ComponentViewHolder(viewType = "hello_component")
28 | class HelloComponentViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
29 | val hello : TextView = itemView.findViewById(R.id.hello) as TextView
30 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/view/HeaderView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.view
13 |
14 | import androidx.recyclerview.widget.RecyclerView
15 | import android.view.View
16 | import android.widget.TextView
17 | import com.xfinity.blueprint_annotations.ComponentViewClass
18 | import com.xfinity.blueprint_annotations.ComponentViewHolder
19 | import com.xfinity.blueprint_sample.R
20 |
21 | @ComponentViewClass(viewHolderClass = HeaderViewHolder::class)
22 | class HeaderView : HeaderViewBase() {
23 | fun setEnabled(enabled: Boolean) {
24 | viewHolder.itemView.isEnabled = enabled
25 | }
26 | }
27 |
28 | @ComponentViewHolder(viewType = "header_view")
29 | class HeaderViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
30 | val header : TextView = itemView.findViewById(R.id.header) as TextView
31 | }
32 |
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/view/HeaderView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.view
13 |
14 | import androidx.recyclerview.widget.RecyclerView
15 | import android.view.View
16 | import android.widget.TextView
17 | import com.xfinity.blueprint_annotations.ComponentViewClass
18 | import com.xfinity.blueprint_annotations.ComponentViewHolder
19 | import com.xfinity.blueprint_sample_library.R
20 |
21 | @ComponentViewClass(viewHolderClass = HeaderViewHolder::class)
22 | class HeaderView : HeaderViewBase() {
23 | fun setEnabled(enabled: Boolean) {
24 | viewHolder.itemView.isEnabled = enabled
25 | }
26 | }
27 |
28 | @ComponentViewHolder(viewType = "header_view")
29 | class HeaderViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
30 | val header : TextView = itemView.findViewById(R.id.header) as TextView
31 | }
32 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/view/HeaderView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.view
13 |
14 | import androidx.recyclerview.widget.RecyclerView
15 | import android.view.View
16 | import android.widget.TextView
17 | import com.xfinity.blueprint_annotations.ComponentViewClass
18 | import com.xfinity.blueprint_annotations.ComponentViewHolder
19 | import com.xfinity.blueprint_sample_library_app.R
20 |
21 | @ComponentViewClass(viewHolderClass = HeaderViewHolder::class)
22 | class HeaderView : HeaderViewBase() {
23 | fun setEnabled(enabled: Boolean) {
24 | viewHolder.itemView.isEnabled = enabled
25 | }
26 | }
27 |
28 | @ComponentViewHolder(viewType = "header_view")
29 | class HeaderViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
30 | val header : TextView = itemView.findViewById(R.id.header) as TextView
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
22 |
23 |
31 |
32 |
--------------------------------------------------------------------------------
/library/src/androidTest/java/com/xfinity/blueprint/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint;
13 |
14 | import android.content.Context;
15 | import androidx.test.InstrumentationRegistry;
16 | import androidx.test.runner.AndroidJUnit4;
17 |
18 | import org.junit.Test;
19 | import org.junit.runner.RunWith;
20 |
21 | import static org.junit.Assert.*;
22 |
23 | /**
24 | * Instrumentation test, which will execute on an Android device.
25 | *
26 | * @see Testing documentation
27 | */
28 | @RunWith(AndroidJUnit4.class)
29 | public class ExampleInstrumentedTest {
30 | @Test
31 | public void useAppContext() throws Exception {
32 | // Context of the app under test.
33 | Context appContext = InstrumentationRegistry.getTargetContext();
34 |
35 | assertEquals("com.xfinity.recycler_mvp.test", appContext.getPackageName());
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
22 |
23 |
31 |
32 |
--------------------------------------------------------------------------------
/sample-library/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
22 |
23 |
31 |
32 |
--------------------------------------------------------------------------------
/app/src/main/java/com/xfinity/blueprint_sample/mvp/view/DynamicScreenView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample.mvp.view
13 |
14 | import com.xfinity.blueprint.view.ScreenView
15 | import com.xfinity.blueprint.view.ScreenViewDelegate
16 |
17 | interface DynamicScreenView {
18 | fun setEnabled(enabled: Boolean)
19 | fun runOnUiThread(runnable: Runnable)
20 | fun toast(msg: String)
21 | }
22 |
23 | class DefaultDynamicScreenView(private val screenViewDelegate: ScreenViewDelegate,
24 | private val delegate: DynamicScreenView)
25 | : ScreenView by screenViewDelegate, DynamicScreenView {
26 |
27 | override fun setEnabled(enabled: Boolean) {
28 | delegate.setEnabled(enabled)
29 | }
30 |
31 | override fun runOnUiThread(runnable: Runnable) {
32 | delegate.runOnUiThread(runnable)
33 | }
34 |
35 | override fun toast(msg: String) {
36 | delegate.toast(msg)
37 | }
38 | }
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/view/DynamicScreenView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.view
13 |
14 | import com.xfinity.blueprint.view.ScreenView
15 | import com.xfinity.blueprint.view.ScreenViewDelegate
16 |
17 | interface DynamicScreenView {
18 | fun setEnabled(enabled: Boolean)
19 | fun runOnUiThread(runnable: Runnable)
20 | fun toast(msg: String)
21 | }
22 |
23 | class DefaultDynamicScreenView(private val screenViewDelegate: ScreenViewDelegate,
24 | private val delegate: DynamicScreenView)
25 | : ScreenView by screenViewDelegate, DynamicScreenView {
26 |
27 | override fun setEnabled(enabled: Boolean) {
28 | delegate.setEnabled(enabled)
29 | }
30 |
31 | override fun runOnUiThread(runnable: Runnable) {
32 | delegate.runOnUiThread(runnable)
33 | }
34 |
35 | override fun toast(msg: String) {
36 | delegate.toast(msg)
37 | }
38 | }
--------------------------------------------------------------------------------
/architecture/src/main/java/com/xfinity/blueprint/architecture/activity/BlueprintSetupExtensions.kt:
--------------------------------------------------------------------------------
1 | package com.xfinity.blueprint.architecture.activity
2 |
3 | import android.view.LayoutInflater
4 | import android.view.View
5 | import android.view.ViewGroup
6 | import androidx.appcompat.app.AppCompatActivity
7 | import androidx.appcompat.widget.Toolbar
8 | import androidx.fragment.app.Fragment
9 | import com.xfinity.blueprint.architecture.R
10 |
11 | fun AppCompatActivity.setupViews(defaultLayoutId: Int, layoutId: Int? = null) {
12 | setContentView(layoutId ?: defaultLayoutId)
13 | val toolbar: Toolbar? = findViewById(R.id.toolbar)
14 | toolbar?.let { setSupportActionBar(it) }
15 |
16 | val recyclerView = findViewById(R.id.recycler_view)
17 | recyclerView.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this,
18 | androidx.recyclerview.widget.LinearLayoutManager.VERTICAL, false)
19 | }
20 |
21 | fun Fragment.setupViews(defaultLayoutId: Int, inflater: LayoutInflater, container: ViewGroup?, layoutId: Int? = null) : View {
22 | val view = inflater.inflate(layoutId ?: defaultLayoutId, container, false)
23 | val recyclerView = view.findViewById(R.id.recycler_view)
24 | val toolbar: Toolbar? = view.findViewById(R.id.toolbar)
25 | toolbar?.let { (activity as AppCompatActivity).setSupportActionBar(it) }
26 |
27 | recyclerView.layoutManager = androidx.recyclerview.widget.LinearLayoutManager(this.context, androidx.recyclerview.widget.LinearLayoutManager.VERTICAL, false)
28 | return view
29 | }
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/view/DynamicScreenView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.view
13 |
14 | import com.xfinity.blueprint.view.ScreenView
15 | import com.xfinity.blueprint.view.ScreenViewDelegate
16 |
17 | interface DynamicScreenView {
18 | fun setEnabled(enabled: Boolean)
19 | fun runOnUiThread(runnable: Runnable)
20 | fun toast(msg: String)
21 | }
22 |
23 | class DefaultDynamicScreenView(private val screenViewDelegate: ScreenViewDelegate,
24 | private val delegate: DynamicScreenView)
25 | : ScreenView by screenViewDelegate, DynamicScreenView {
26 |
27 | override fun setEnabled(enabled: Boolean) {
28 | delegate.setEnabled(enabled)
29 | }
30 |
31 | override fun runOnUiThread(runnable: Runnable) {
32 | delegate.runOnUiThread(runnable)
33 | }
34 |
35 | override fun toast(msg: String) {
36 | delegate.toast(msg)
37 | }
38 | }
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/mvp/view/DataItemView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library.mvp.view
13 |
14 | import androidx.recyclerview.widget.RecyclerView
15 | import android.view.View
16 | import android.widget.TextView
17 | import com.xfinity.blueprint_annotations.ComponentViewClass
18 | import com.xfinity.blueprint_annotations.ComponentViewHolder
19 | import com.xfinity.blueprint_sample_library.R
20 |
21 | @ComponentViewClass(viewHolderClass = DataItemViewHolder::class)
22 | class DataItemView : DataItemViewBase() {
23 | fun setBehavior(behavior: (position: Int) -> Unit) {
24 | viewHolder.itemView.setOnClickListener { behavior.invoke(viewHolder.adapterPosition) }
25 | }
26 | }
27 |
28 | @ComponentViewHolder(viewType = "data_item_view")
29 | class DataItemViewHolder(itemView: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(itemView) {
30 | val data : TextView = itemView.findViewById(R.id.data) as TextView
31 | }
32 |
--------------------------------------------------------------------------------
/sample-library-app/src/main/java/com/xfinity/blueprint_sample_library_app/mvp/view/DataItemView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library_app.mvp.view
13 |
14 | import androidx.recyclerview.widget.RecyclerView
15 | import android.view.View
16 | import android.widget.TextView
17 | import com.xfinity.blueprint_annotations.ComponentViewClass
18 | import com.xfinity.blueprint_annotations.ComponentViewHolder
19 | import com.xfinity.blueprint_sample_library_app.R
20 |
21 | //@ComponentViewClass(viewHolderClass = DataItemViewHolder::class)
22 | //class DataItemView : DataItemViewBase() {
23 | // fun setBehavior(behavior: (position: Int) -> Unit) {
24 | // viewHolder.itemView.setOnClickListener { behavior.invoke(viewHolder.adapterPosition) }
25 | // }
26 | //}
27 | //
28 | //@ComponentViewHolder(viewType = "data_item_view")
29 | //class DataItemViewHolder(itemView: View) : androidx.recyclerview.widget.RecyclerView.ViewHolder(itemView) {
30 | // val data : TextView = itemView.findViewById(R.id.data) as TextView
31 | //}
32 |
--------------------------------------------------------------------------------
/sample-library/src/main/java/com/xfinity/blueprint_sample_library/LauncherActivity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017 Comcast Cable Communications Management, LLC
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6 | * Unless required by applicable law or agreed to in writing, software
7 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
8 | * See the License for the specific language governing permissions and
9 | * limitations under the License.
10 | */
11 |
12 | package com.xfinity.blueprint_sample_library
13 |
14 | import android.content.Intent
15 | import android.os.Bundle
16 | import androidx.appcompat.app.AppCompatActivity
17 | import android.widget.Button
18 |
19 | class LauncherActivity : AppCompatActivity() {
20 |
21 | override fun onCreate(savedInstanceState: Bundle?) {
22 | super.onCreate(savedInstanceState)
23 | setContentView(R.layout.launcher_activity)
24 |
25 | findViewById