├── sample-flow
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ ├── ic_star_white_36dp.png
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── drawable-hdpi
│ │ │ ├── ic_star_white_36dp.png
│ │ │ ├── ic_error_outline_black_48dp.png
│ │ │ └── ic_star_border_white_36dp.png
│ │ ├── drawable-mdpi
│ │ │ ├── ic_star_white_36dp.png
│ │ │ ├── ic_error_outline_black_48dp.png
│ │ │ └── ic_star_border_white_36dp.png
│ │ ├── drawable-xhdpi
│ │ │ ├── ic_star_white_36dp.png
│ │ │ ├── ic_star_border_white_36dp.png
│ │ │ └── ic_error_outline_black_48dp.png
│ │ ├── drawable-xxhdpi
│ │ │ ├── ic_star_white_36dp.png
│ │ │ ├── ic_star_border_white_36dp.png
│ │ │ └── ic_error_outline_black_48dp.png
│ │ ├── drawable-xxxhdpi
│ │ │ ├── ic_star_white_36dp.png
│ │ │ ├── ic_star_border_white_36dp.png
│ │ │ └── ic_error_outline_black_48dp.png
│ │ ├── values
│ │ │ ├── ids.xml
│ │ │ ├── dimens.xml
│ │ │ ├── colors.xml
│ │ │ ├── styles.xml
│ │ │ └── strings.xml
│ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ └── layout
│ │ │ ├── activity_main.xml
│ │ │ ├── merge_loadingview.xml
│ │ │ ├── item_picture.xml
│ │ │ ├── merge_errorview.xml
│ │ │ ├── recycler_swiperefresh_view.xml
│ │ │ ├── item_info.xml
│ │ │ └── item_country.xml
│ │ ├── java
│ │ └── com
│ │ │ └── hannesdorfmann
│ │ │ └── mosby
│ │ │ └── sample
│ │ │ └── flow
│ │ │ ├── model
│ │ │ ├── Info.kt
│ │ │ ├── InfoPicture.kt
│ │ │ ├── CountryDetail.kt
│ │ │ ├── InfoText.kt
│ │ │ ├── Country.kt
│ │ │ └── DetailsTab.kt
│ │ │ ├── countries
│ │ │ ├── CountriesView.kt
│ │ │ └── CountriesScreen.kt
│ │ │ ├── countrydetails
│ │ │ ├── CountryDetailsView.kt
│ │ │ └── CountryDetailsScreen.kt
│ │ │ ├── ViewExtensions.kt
│ │ │ ├── flow
│ │ │ └── AtlasAppKeyParceler.kt
│ │ │ ├── dagger
│ │ │ ├── ApplicationModule.kt
│ │ │ └── ApplicationComponent.kt
│ │ │ ├── AtlasApplication.kt
│ │ │ └── MainActivity.kt
│ │ └── AndroidManifest.xml
└── proguard-rules.pro
├── sample-mail
├── .gitignore
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable
│ │ │ │ ├── lily.jpg
│ │ │ │ ├── ted.jpg
│ │ │ │ ├── barney.jpeg
│ │ │ │ ├── robin.jpg
│ │ │ │ ├── unknown.jpg
│ │ │ │ ├── marshall.jpeg
│ │ │ │ ├── profile_background.jpg
│ │ │ │ ├── label_view_background.xml
│ │ │ │ ├── text_cursor.xml
│ │ │ │ └── menu_unread_count.xml
│ │ │ ├── drawable-hdpi
│ │ │ │ ├── ic_send.png
│ │ │ │ ├── ic_spam.png
│ │ │ │ ├── ic_star.png
│ │ │ │ ├── ic_create.png
│ │ │ │ ├── ic_delete.png
│ │ │ │ ├── ic_inbox.png
│ │ │ │ ├── ic_reply.png
│ │ │ │ ├── ic_search.png
│ │ │ │ ├── ic_all_done.png
│ │ │ │ ├── ic_cloud_off.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_password.png
│ │ │ │ ├── ic_username.png
│ │ │ │ ├── ic_statistics.png
│ │ │ │ └── vertical_shadow_separator.9.png
│ │ │ ├── drawable-mdpi
│ │ │ │ ├── ic_send.png
│ │ │ │ ├── ic_spam.png
│ │ │ │ ├── ic_star.png
│ │ │ │ ├── ic_create.png
│ │ │ │ ├── ic_delete.png
│ │ │ │ ├── ic_inbox.png
│ │ │ │ ├── ic_reply.png
│ │ │ │ ├── ic_search.png
│ │ │ │ ├── ic_all_done.png
│ │ │ │ ├── ic_cloud_off.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_password.png
│ │ │ │ ├── ic_username.png
│ │ │ │ ├── ic_statistics.png
│ │ │ │ └── vertical_shadow_separator.9.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ ├── ic_inbox.png
│ │ │ │ ├── ic_reply.png
│ │ │ │ ├── ic_send.png
│ │ │ │ ├── ic_spam.png
│ │ │ │ ├── ic_star.png
│ │ │ │ ├── ic_all_done.png
│ │ │ │ ├── ic_create.png
│ │ │ │ ├── ic_delete.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_password.png
│ │ │ │ ├── ic_search.png
│ │ │ │ ├── ic_username.png
│ │ │ │ ├── ic_cloud_off.png
│ │ │ │ ├── ic_statistics.png
│ │ │ │ └── vertical_shadow_separator.9.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ ├── ic_send.png
│ │ │ │ ├── ic_spam.png
│ │ │ │ ├── ic_star.png
│ │ │ │ ├── ic_create.png
│ │ │ │ ├── ic_delete.png
│ │ │ │ ├── ic_inbox.png
│ │ │ │ ├── ic_reply.png
│ │ │ │ ├── ic_search.png
│ │ │ │ ├── ic_all_done.png
│ │ │ │ ├── ic_cloud_off.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_password.png
│ │ │ │ ├── ic_username.png
│ │ │ │ ├── ic_statistics.png
│ │ │ │ └── vertical_shadow_separator.9.png
│ │ │ ├── values
│ │ │ │ ├── booleans.xml
│ │ │ │ └── integers.xml
│ │ │ ├── drawable-xxxhdpi
│ │ │ │ ├── ic_create.png
│ │ │ │ ├── ic_delete.png
│ │ │ │ ├── ic_inbox.png
│ │ │ │ ├── ic_reply.png
│ │ │ │ ├── ic_search.png
│ │ │ │ ├── ic_send.png
│ │ │ │ ├── ic_spam.png
│ │ │ │ ├── ic_star.png
│ │ │ │ ├── ic_all_done.png
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_password.png
│ │ │ │ ├── ic_username.png
│ │ │ │ ├── ic_cloud_off.png
│ │ │ │ └── ic_statistics.png
│ │ │ ├── values-sw600dp
│ │ │ │ ├── booleans.xml
│ │ │ │ ├── values.xml
│ │ │ │ └── dimens.xml
│ │ │ ├── anim
│ │ │ │ ├── fade_in.xml
│ │ │ │ ├── fade_out.xml
│ │ │ │ ├── pulse.xml
│ │ │ │ ├── shake_interpolator.xml
│ │ │ │ └── shake.xml
│ │ │ ├── layout
│ │ │ │ ├── activity_search.xml
│ │ │ │ ├── merge_main_split_pane.xml
│ │ │ │ ├── list_statistics.xml
│ │ │ │ ├── fragment_statistics.xml
│ │ │ │ ├── list_load_more.xml
│ │ │ │ ├── activity_mail_details.xml
│ │ │ │ ├── activity_login.xml
│ │ │ │ ├── fragment_mails_base.xml
│ │ │ │ ├── view_label_layout.xml
│ │ │ │ └── view_loading.xml
│ │ │ ├── color
│ │ │ │ └── label_layout_button.xml
│ │ │ ├── values-land
│ │ │ │ └── dimens.xml
│ │ │ ├── menu
│ │ │ │ └── search_menu.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ ├── layout-sw600dp
│ │ │ │ ├── activity_mail_details.xml
│ │ │ │ └── merge_main_split_pane.xml
│ │ │ ├── values-sw360dp
│ │ │ │ └── dimens.xml
│ │ │ ├── values-sw384dp
│ │ │ │ └── dimens.xml
│ │ │ └── values-v21
│ │ │ │ └── styles.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── hannesdorfmann
│ │ │ └── mosby
│ │ │ └── sample
│ │ │ └── mail
│ │ │ ├── model
│ │ │ ├── mail
│ │ │ │ ├── NotFoundException.java
│ │ │ │ ├── MailComparator.java
│ │ │ │ ├── service
│ │ │ │ │ └── ServiceComponent.java
│ │ │ │ ├── MailGenerator.java
│ │ │ │ └── receiver
│ │ │ │ │ └── MailReceiver.java
│ │ │ ├── event
│ │ │ │ ├── MailStaredEvent.java
│ │ │ │ ├── MailUnstaredEvent.java
│ │ │ │ ├── MailReceivedEvent.java
│ │ │ │ ├── MailSentEvent.java
│ │ │ │ ├── MailReadEvent.java
│ │ │ │ ├── MailSentErrorEvent.java
│ │ │ │ ├── MailLabelChangedEvent.java
│ │ │ │ ├── NotAuthenticatedEvent.java
│ │ │ │ └── LoginSuccessfulEvent.java
│ │ │ ├── account
│ │ │ │ ├── LoginException.java
│ │ │ │ ├── AccountManager.java
│ │ │ │ ├── NotAuthenticatedException.java
│ │ │ │ └── AuthCredentials.java
│ │ │ └── contact
│ │ │ │ └── ContactsManager.java
│ │ │ ├── dagger
│ │ │ ├── MailAppComponent.java
│ │ │ ├── NavigationModule.java
│ │ │ └── ContacsModule.java
│ │ │ ├── details
│ │ │ ├── DetailsView.java
│ │ │ └── DetailsComponent.java
│ │ │ ├── profile
│ │ │ ├── ProfileView.java
│ │ │ ├── mails
│ │ │ │ ├── ProfileMailsView.java
│ │ │ │ ├── ProfileMailsComponent.java
│ │ │ │ └── ProfileMailsPresenter.java
│ │ │ ├── ProfileComponent.java
│ │ │ └── ProfilePresenter.java
│ │ │ ├── statistics
│ │ │ ├── StatisticsView.java
│ │ │ ├── StatisticsComponent.java
│ │ │ └── StatisticsPresenter.java
│ │ │ ├── MainActivityComponent.java
│ │ │ ├── write
│ │ │ ├── WriteView.java
│ │ │ └── WriteComponent.java
│ │ │ ├── ui
│ │ │ ├── event
│ │ │ │ ├── ShowMailDetailsEvent.java
│ │ │ │ └── ShowMailsOfLabelEvent.java
│ │ │ └── transition
│ │ │ │ └── ExcludedExplodeTransition.java
│ │ │ ├── label
│ │ │ ├── LabelLayoutComponent.java
│ │ │ └── LabelView.java
│ │ │ ├── search
│ │ │ ├── SearchView.java
│ │ │ ├── SearchComponent.java
│ │ │ └── SearchActivity.java
│ │ │ ├── mails
│ │ │ ├── MailsComponent.java
│ │ │ └── MailsView.java
│ │ │ ├── utils
│ │ │ └── BuildUtils.java
│ │ │ ├── base
│ │ │ └── view
│ │ │ │ ├── AuthView.java
│ │ │ │ └── viewstate
│ │ │ │ └── AuthViewState.java
│ │ │ ├── login
│ │ │ ├── LoginView.java
│ │ │ └── LoginComponent.java
│ │ │ ├── MailApplication.java
│ │ │ └── menu
│ │ │ └── MenuView.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── hannesdorfmann
│ │ └── mosby
│ │ └── sample
│ │ └── mail
│ │ └── ApplicationTest.java
├── libs
│ └── easyandroidanimationslibrary-v0.5.jar
├── proguard-rules.pro
└── README.md
├── mvp
├── gradle.properties
├── src
│ ├── main
│ │ ├── res
│ │ │ └── values
│ │ │ │ ├── dimen.xml
│ │ │ │ ├── ids.xml
│ │ │ │ └── integers.xml
│ │ └── AndroidManifest.xml
│ └── test
│ │ └── java
│ │ └── com
│ │ └── hannesdorfmann
│ │ └── mosby
│ │ └── mvp
│ │ └── delegate
│ │ └── OrientationChangeFragmentTest.java
├── proguard-rules.pro
└── .gitignore
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── testing
├── gradle.properties
├── .gitignore
└── build.gradle
├── viewstate
├── gradle.properties
├── src
│ ├── main
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── hannesdorfmann
│ │ │ └── mosby
│ │ │ └── mvp
│ │ │ ├── delegate
│ │ │ └── ViewGroupViewStateDelegateCallback.java
│ │ │ └── viewstate
│ │ │ └── RestorableParcelableViewState.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── hannesdorfmann
│ │ └── mosby
│ │ └── mvp
│ │ └── delegate
│ │ └── mock
│ │ └── SimpleView.java
├── proguard-rules.pro
├── .gitignore
└── build.gradle
├── sample
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-hdpi
│ │ │ │ └── ic_cloud_off.png
│ │ │ ├── drawable-mdpi
│ │ │ │ └── ic_cloud_off.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ └── ic_cloud_off.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ └── ic_cloud_off.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ │ └── ic_cloud_off.png
│ │ │ ├── values
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ │ ├── layout
│ │ │ │ ├── activity_fragment_container.xml
│ │ │ │ ├── activity_main.xml
│ │ │ │ ├── row_text.xml
│ │ │ │ ├── loading_view.xml
│ │ │ │ ├── activity_embedded_fragment.xml
│ │ │ │ ├── error_view.xml
│ │ │ │ ├── countries_list.xml
│ │ │ │ ├── fragment_nested_container.xml
│ │ │ │ └── countries_mvp_layout.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ └── menu
│ │ │ │ └── menu_main.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── hannesdorfmann
│ │ │ └── mosby
│ │ │ └── sample
│ │ │ └── mvp
│ │ │ ├── lce
│ │ │ ├── layout
│ │ │ │ └── CountriesLayoutActivity.java
│ │ │ └── viewstate
│ │ │ │ ├── RetainingCountriesFragmentEmbededInXmlActivity.java
│ │ │ │ └── RetainingCountriesActivity.java
│ │ │ ├── CountriesPresenter.java
│ │ │ ├── model
│ │ │ └── custom
│ │ │ │ ├── A.java
│ │ │ │ └── B.java
│ │ │ ├── customviewstate
│ │ │ └── MyCustomView.java
│ │ │ └── CountriesView.java
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── hannesdorfmann
│ │ └── mosby
│ │ └── sample
│ │ └── ApplicationTest.java
├── README.md
├── proguard-rules.pro
└── .gitignore
├── sample-dagger1
├── src
│ └── main
│ │ ├── res
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── layout
│ │ │ ├── loading_view.xml
│ │ │ ├── error_view.xml
│ │ │ └── activity_members.xml
│ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── java
│ │ └── com
│ │ └── hannesdorfmann
│ │ └── mosby
│ │ └── sample
│ │ └── dagger1
│ │ ├── model
│ │ ├── ErrorMessageDeterminer.java
│ │ ├── NetworkException.java
│ │ └── GithubApi.java
│ │ ├── members
│ │ └── MembersView.java
│ │ └── SampleApplication.java
├── README.md
├── proguard-rules.pro
└── .gitignore
├── sample-dagger2-rx
├── src
│ └── main
│ │ ├── res
│ │ ├── values
│ │ │ ├── colors.xml
│ │ │ ├── styles.xml
│ │ │ ├── dimens.xml
│ │ │ └── strings.xml
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── layout
│ │ │ ├── activity_main.xml
│ │ │ ├── loading_view.xml
│ │ │ ├── error_view.xml
│ │ │ └── fragment_repos.xml
│ │ └── values-w820dp
│ │ │ └── dimens.xml
│ │ ├── java
│ │ └── com
│ │ │ └── hannesdorfmann
│ │ │ └── mosby
│ │ │ └── sample
│ │ │ └── dagger2
│ │ │ ├── repos
│ │ │ ├── ReposView.java
│ │ │ ├── ReposComponent.java
│ │ │ └── ReposPresenter.java
│ │ │ ├── model
│ │ │ ├── GithubApi.java
│ │ │ ├── Repo.java
│ │ │ ├── ErrorMessageDeterminer.java
│ │ │ └── User.java
│ │ │ └── MainActivity.java
│ │ └── AndroidManifest.xml
├── README.md
├── proguard-rules.pro
└── .gitignore
├── sample-kotlin
├── src
│ ├── main
│ │ ├── res
│ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ ├── values
│ │ │ │ ├── colors.xml
│ │ │ │ ├── strings.xml
│ │ │ │ ├── styles.xml
│ │ │ │ └── dimens.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ ├── menu
│ │ │ │ └── menu_main.xml
│ │ │ └── layout
│ │ │ │ ├── loading_view.xml
│ │ │ │ ├── error_view.xml
│ │ │ │ ├── list_hero_item.xml
│ │ │ │ └── activity_heroes.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── hannesdorfmann
│ │ │ │ └── mosby
│ │ │ │ └── sample
│ │ │ │ └── kotlin
│ │ │ │ ├── model
│ │ │ │ └── Hero.kt
│ │ │ │ ├── HeroesView.kt
│ │ │ │ └── HeroesViewHolder.kt
│ │ └── AndroidManifest.xml
│ └── androidTest
│ │ └── java
│ │ └── com
│ │ └── hannesdorfmann
│ │ └── mosby
│ │ └── sample
│ │ └── kotlin
│ │ └── ApplicationTest.java
├── proguard-rules.pro
└── .gitignore
├── mvp-common
├── src
│ ├── test
│ │ └── java
│ │ │ └── com
│ │ │ └── hannesdorfmann
│ │ │ └── mosby
│ │ │ └── mvp
│ │ │ └── test
│ │ │ ├── data
│ │ │ └── TestData.java
│ │ │ ├── view
│ │ │ ├── SubMvpView.java
│ │ │ ├── AnotherMvpView.java
│ │ │ ├── TestMvpView.java
│ │ │ └── TestMvpViewWithMultipleInterfaces.java
│ │ │ ├── presenter
│ │ │ ├── ParameterlessConstructorMvpPresenter.java
│ │ │ ├── SubParameterlessConstructorMvpPresenter.java
│ │ │ ├── SubMvpPresenter.java
│ │ │ ├── UselessGenericParamsMvpPresenter.java
│ │ │ └── NullObjectMvpPresenter.java
│ │ │ └── interfaces
│ │ │ ├── BarInterface.java
│ │ │ └── FooInterface.java
│ └── main
│ │ └── java
│ │ └── com
│ │ └── hannesdorfmann
│ │ └── mosby
│ │ └── mvp
│ │ └── MvpView.java
├── gradle.properties
├── .gitignore
└── build.gradle
├── settings.gradle
├── .buildscript
└── deploy_snapshot.sh
├── .gitignore
├── .travis.yml
└── findbugs.gradle
/sample-flow/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/sample-mail/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/mvp/gradle.properties:
--------------------------------------------------------------------------------
1 | POM_NAME = Mosby Model-View-Presenter
2 | POM_ARTIFACT_ID = mvp
3 | POM_PACKAGING = aar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable/lily.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable/lily.jpg
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable/ted.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable/ted.jpg
--------------------------------------------------------------------------------
/testing/gradle.properties:
--------------------------------------------------------------------------------
1 | POM_NAME = Mosby testing package for testing mvp components
2 | POM_ARTIFACT_ID = testing
3 | POM_PACKAGING = jar
--------------------------------------------------------------------------------
/viewstate/gradle.properties:
--------------------------------------------------------------------------------
1 | POM_NAME = Mosby Model View Presenter with View State
2 | POM_ARTIFACT_ID = viewstate
3 | POM_PACKAGING = aar
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable/barney.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable/barney.jpeg
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable/robin.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable/robin.jpg
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable/unknown.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable/unknown.jpg
--------------------------------------------------------------------------------
/sample-flow/src/main/res/ic_star_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/ic_star_white_36dp.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable/marshall.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable/marshall.jpeg
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_send.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_spam.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_spam.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_star.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_send.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_spam.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_spam.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_star.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-hdpi/ic_cloud_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample/src/main/res/drawable-hdpi/ic_cloud_off.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-mdpi/ic_cloud_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample/src/main/res/drawable-mdpi/ic_cloud_off.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_create.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_delete.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_inbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_inbox.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_reply.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_search.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_create.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_delete.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_inbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_inbox.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_reply.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_search.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_inbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_inbox.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_reply.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_send.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_spam.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_spam.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_star.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_send.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_spam.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_spam.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_star.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/values/booleans.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | false
4 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xhdpi/ic_cloud_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample/src/main/res/drawable-xhdpi/ic_cloud_off.png
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxhdpi/ic_cloud_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample/src/main/res/drawable-xxhdpi/ic_cloud_off.png
--------------------------------------------------------------------------------
/sample-dagger1/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-dagger1/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-dagger1/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-dagger1/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #C0C0C0
4 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-kotlin/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-kotlin/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-kotlin/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-mail/libs/easyandroidanimationslibrary-v0.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/libs/easyandroidanimationslibrary-v0.5.jar
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_all_done.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_all_done.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_cloud_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_cloud_off.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_password.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_username.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_username.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_all_done.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_all_done.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_cloud_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_cloud_off.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_password.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_username.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_username.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_all_done.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_all_done.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_create.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_delete.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_password.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_search.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_username.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_username.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_create.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_delete.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_inbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_inbox.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_reply.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_search.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_create.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_create.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_delete.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_inbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_inbox.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_reply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_reply.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_search.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_send.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_send.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_spam.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_spam.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_star.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/values-sw600dp/booleans.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | true
4 |
--------------------------------------------------------------------------------
/sample/src/main/res/drawable-xxxhdpi/ic_cloud_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample/src/main/res/drawable-xxxhdpi/ic_cloud_off.png
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/data/TestData.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.data;
2 |
3 | public class TestData {
4 | }
5 |
--------------------------------------------------------------------------------
/sample-dagger1/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-dagger1/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-dagger1/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-dagger1/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-kotlin/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/ic_statistics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/ic_statistics.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/ic_statistics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/ic_statistics.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_cloud_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_cloud_off.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/ic_statistics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/ic_statistics.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_all_done.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_all_done.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_cloud_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_cloud_off.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_password.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_username.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_username.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_all_done.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_all_done.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_password.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_username.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_username.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable/profile_background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable/profile_background.jpg
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-dagger2-rx/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-dagger2-rx/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-dagger2-rx/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-dagger2-rx/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/ic_statistics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/ic_statistics.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_cloud_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_cloud_off.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxxhdpi/ic_statistics.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxxhdpi/ic_statistics.png
--------------------------------------------------------------------------------
/mvp/src/main/res/values/dimen.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 40dp
4 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-hdpi/ic_star_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-hdpi/ic_star_white_36dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-mdpi/ic_star_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-mdpi/ic_star_white_36dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-xhdpi/ic_star_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-xhdpi/ic_star_white_36dp.png
--------------------------------------------------------------------------------
/mvp-common/gradle.properties:
--------------------------------------------------------------------------------
1 | POM_NAME = Mosby mvp-common
2 | POM_ARTIFACT_ID = mvp-common
3 | POM_PACKAGING = jar
4 | POM_DESCRIPTION = Containing the common interfaces of mosby mvp
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-xxhdpi/ic_star_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-xxhdpi/ic_star_white_36dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-xxxhdpi/ic_star_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-xxxhdpi/ic_star_white_36dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-hdpi/ic_error_outline_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-hdpi/ic_error_outline_black_48dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-hdpi/ic_star_border_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-hdpi/ic_star_border_white_36dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-mdpi/ic_error_outline_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-mdpi/ic_error_outline_black_48dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-mdpi/ic_star_border_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-mdpi/ic_star_border_white_36dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-xhdpi/ic_star_border_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-xhdpi/ic_star_border_white_36dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-xxhdpi/ic_star_border_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-xxhdpi/ic_star_border_white_36dp.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-hdpi/vertical_shadow_separator.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-hdpi/vertical_shadow_separator.9.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-mdpi/vertical_shadow_separator.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-mdpi/vertical_shadow_separator.9.png
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/view/SubMvpView.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.view;
2 |
3 | public interface SubMvpView extends TestMvpView {
4 | }
5 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-xhdpi/ic_error_outline_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-xhdpi/ic_error_outline_black_48dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-xxhdpi/ic_error_outline_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-xxhdpi/ic_error_outline_black_48dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-xxxhdpi/ic_star_border_white_36dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-xxxhdpi/ic_star_border_white_36dp.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xhdpi/vertical_shadow_separator.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xhdpi/vertical_shadow_separator.9.png
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable-xxhdpi/vertical_shadow_separator.9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-mail/src/main/res/drawable-xxhdpi/vertical_shadow_separator.9.png
--------------------------------------------------------------------------------
/mvp/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/drawable-xxxhdpi/ic_error_outline_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/angebagui/mosby/master/sample-flow/src/main/res/drawable-xxxhdpi/ic_error_outline_black_48dp.png
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/model/Info.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.model
2 |
3 | /**
4 | *
5 | *
6 | * @author Hannes Dorfmann
7 | */
8 | interface Info
--------------------------------------------------------------------------------
/viewstate/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #D3D3D3
4 | #64000000
5 |
--------------------------------------------------------------------------------
/mvp/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-kotlin
3 |
4 | Hello world!
5 | Settings
6 |
7 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/model/InfoPicture.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.model
2 |
3 | /**
4 | *
5 | *
6 | * @author Hannes Dorfmann
7 | */
8 | data class InfoPicture(val url: String) : Info
--------------------------------------------------------------------------------
/sample-mail/src/main/res/values-sw600dp/values.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 48dp
5 | 104dp
6 |
7 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/values/ids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/presenter/ParameterlessConstructorMvpPresenter.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.presenter;
2 |
3 | public class ParameterlessConstructorMvpPresenter
4 | extends NullObjectMvpPresenter {
5 | }
6 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/anim/fade_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/anim/fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/view/AnotherMvpView.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.view;
2 |
3 | import com.hannesdorfmann.mosby.mvp.MvpView;
4 |
5 | public interface AnotherMvpView extends MvpView {
6 |
7 | void showOtherMvpView();
8 | }
9 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sun May 29 15:58:08 CEST 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
7 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/kotlin/com/hannesdorfmann/mosby/sample/kotlin/model/Hero.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.kotlin.model
2 |
3 | /**
4 | * Simple POJO to hold data of a hero
5 | *
6 | * @author Hannes Dorfmann
7 | */
8 | data class Hero(val name: String, val imageUrl: String)
9 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout/activity_search.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/model/CountryDetail.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.model
2 |
3 | /**
4 | *
5 | *
6 | * @author Hannes Dorfmann
7 | */
8 | data class CountryDetail(val id: Int, val name: String, val imageUrl: String, val infos: List)
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_fragment_container.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | sample-dagger2-rx
3 | MainActivity
4 |
5 | Hello world!
6 | Settings
7 |
8 |
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/interfaces/BarInterface.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.interfaces;
2 |
3 | /**
4 | * Just a stupid interface to check if the right interface will be picked
5 | */
6 | public interface BarInterface {
7 |
8 | void bar();
9 | }
10 |
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/interfaces/FooInterface.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.interfaces;
2 |
3 | /**
4 | * Just a stupid interface to check if the right interface will be picked
5 | */
6 | public interface FooInterface {
7 |
8 | void foo();
9 | }
10 |
--------------------------------------------------------------------------------
/mvp/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @android:integer/config_shortAnimTime
4 | @android:integer/config_longAnimTime
5 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/color/label_layout_button.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/values-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | @dimen/abc_action_bar_default_height_material
4 |
5 | 32dp
6 | 88dp
7 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/model/InfoText.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.model
2 |
3 | import android.support.annotation.StringRes
4 |
5 | /**
6 | *
7 | *
8 | * @author Hannes Dorfmann
9 | */
10 | data class InfoText(@StringRes val titleRes: Int, val text: String) : Info
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/mail/NotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.mail;
2 |
3 | /**
4 | * This Exception is thrown if the desired mail has not been found
5 | * @author Hannes Dorfmann
6 | */
7 | public class NotFoundException extends Exception {
8 | }
9 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/README.md:
--------------------------------------------------------------------------------
1 | # Mosby sample
2 | A sample android app that shows how to use mosby mvp library with dagger 2.
3 |
4 | This sample project uses annotation processors. So if you import this sample into android studio, you may have to run `Build --> Rebuild Project` manually to ensure that all annotation processors have generated code.
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | // include ':sample', ':viewstate', ':mvp', ':rx', ':retrofit', ':sample-dagger1', ':sample-dagger2-rx', ':sample-mail',
2 | // ':testing', ':mvp-common'
3 |
4 | include ':mvp-common', ':mvp', ':viewstate', ':testing', ':sample', ':sample-dagger1',
5 | ':sample-dagger2-rx', ':sample-mail', ':sample-kotlin', ':sample-flow'
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/model/Country.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.model
2 |
3 | /**
4 | *
5 | *
6 | * @author Hannes Dorfmann
7 | */
8 | data class Country(val id: Int, val name: String, val capital: String, val population: Long, val area: Long, val currency: String, val flagUrl: String)
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/dagger/MailAppComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.dagger;
2 |
3 | import dagger.Component;
4 |
5 | /**
6 | * @author Hannes Dorfmann
7 | */
8 |
9 |
10 | @Component(
11 | modules = MailModule.class
12 | )
13 | public interface MailAppComponent {
14 | }
15 |
--------------------------------------------------------------------------------
/sample-dagger1/README.md:
--------------------------------------------------------------------------------
1 | # mosby sample
2 | A sample android app that demonstarates how to use mosby mvp library with dagger1 and retrofit.
3 |
4 | This sample project uses annotation processors. So if you import this sample into android studio, you may have to run `Build --> Rebuild Project` manually to ensure that all annotation processors have generated code.
--------------------------------------------------------------------------------
/sample-mail/src/main/res/menu/search_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/presenter/SubParameterlessConstructorMvpPresenter.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.presenter;
2 |
3 | import com.hannesdorfmann.mosby.mvp.test.data.TestData;
4 |
5 | public class SubParameterlessConstructorMvpPresenter
6 | extends ParameterlessConstructorMvpPresenter {
7 | }
8 |
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/view/TestMvpView.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.view;
2 |
3 | import com.hannesdorfmann.mosby.mvp.MvpView;
4 | import com.hannesdorfmann.mosby.mvp.test.data.TestData;
5 |
6 | public interface TestMvpView extends MvpView {
7 |
8 | void showFoo(TestData data);
9 |
10 | void showThat();
11 | }
12 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/countries/CountriesView.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.countries
2 |
3 | import com.hannesdorfmann.mosby.mvp.lce.MvpLceView
4 | import com.hannesdorfmann.mosby.sample.flow.model.Country
5 |
6 | /**
7 | *
8 | *
9 | * @author Hannes Dorfmann
10 | */
11 | interface CountriesView : MvpLceView>
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 | #9E9E9E
8 | #3C000000
9 |
10 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/kotlin/com/hannesdorfmann/mosby/sample/kotlin/HeroesView.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.kotlin
2 |
3 | import com.hannesdorfmann.mosby.mvp.lce.MvpLceView
4 | import com.hannesdorfmann.mosby.sample.kotlin.model.Hero
5 |
6 | /**
7 | * MVP View interface
8 | *
9 | * @author Hannes Dorfmann
10 | */
11 | interface HeroesView : MvpLceView> {
12 |
13 | }
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/details/DetailsView.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.details;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.base.view.BaseMailView;
4 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
5 |
6 | /**
7 | * @author Hannes Dorfmann
8 | */
9 | public interface DetailsView extends BaseMailView {
10 | }
11 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/countrydetails/CountryDetailsView.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.countrydetails
2 |
3 | import com.hannesdorfmann.mosby.mvp.lce.MvpLceView
4 | import com.hannesdorfmann.mosby.sample.flow.model.CountryDetail
5 |
6 | /**
7 | *
8 | *
9 | * @author Hannes Dorfmann
10 | */
11 | interface CountryDetailsView : MvpLceView
--------------------------------------------------------------------------------
/sample-flow/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/sample/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/java/com/hannesdorfmann/mosby/sample/dagger2/repos/ReposView.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.dagger2.repos;
2 |
3 | import com.hannesdorfmann.mosby.mvp.lce.MvpLceView;
4 | import com.hannesdorfmann.mosby.sample.dagger2.model.Repo;
5 | import java.util.List;
6 |
7 | /**
8 | * @author Hannes Dorfmann
9 | */
10 | public interface ReposView extends MvpLceView> {
11 | }
12 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/row_text.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/profile/ProfileView.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.profile;
2 |
3 | import com.hannesdorfmann.mosby.mvp.lce.MvpLceView;
4 | import com.hannesdorfmann.mosby.sample.mail.model.contact.ProfileScreen;
5 | import java.util.List;
6 |
7 | /**
8 | * @author Hannes Dorfmann
9 | */
10 | public interface ProfileView extends MvpLceView> {
11 | }
12 |
--------------------------------------------------------------------------------
/sample/README.md:
--------------------------------------------------------------------------------
1 | # mosby sample
2 | A sample android app that demonstarates how to use mosby mvp library.
3 |
4 | This sample project uses annotation processors. So if you import this sample into android studio, you may have to run `Build --> Rebuild Project` manually to ensure that all annotation processors have generated code.
5 |
6 | This sample loads a list of Countries. Loading countries will fail the first time and every second time afterwards.
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/statistics/StatisticsView.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.statistics;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.base.view.AuthView;
4 | import com.hannesdorfmann.mosby.sample.mail.model.mail.statistics.MailStatistics;
5 |
6 | /**
7 | * @author Hannes Dorfmann
8 | */
9 | public interface StatisticsView extends AuthView {
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/ViewExtensions.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow
2 |
3 | import android.util.DisplayMetrics
4 | import android.view.View
5 |
6 | /**
7 | *
8 | *
9 | * @author Hannes Dorfmann
10 | */
11 | fun View.dpToPx(dp: Float): Float {
12 | val metrics = context.resources.displayMetrics;
13 | val px = dp * (metrics.densityDpi / DisplayMetrics.DENSITY_DEFAULT);
14 | return px
15 | }
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/profile/mails/ProfileMailsView.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.profile.mails;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.base.view.BaseMailView;
4 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
5 | import java.util.List;
6 |
7 | /**
8 | * @author Hannes Dorfmann
9 | */
10 | public interface ProfileMailsView extends BaseMailView> {
11 | }
12 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout/merge_main_split_pane.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/presenter/SubMvpPresenter.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.presenter;
2 |
3 | import com.hannesdorfmann.mosby.mvp.MvpNullObjectBasePresenter;
4 | import com.hannesdorfmann.mosby.mvp.test.view.SubMvpView;
5 |
6 | public class SubMvpPresenter
7 | extends MvpNullObjectBasePresenter {
8 |
9 | public void invokeShowThat() {
10 | getView().showThat();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/flow/AtlasAppKeyParceler.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.flow
2 |
3 | import android.os.Parcelable
4 | import flow.KeyParceler
5 |
6 | /**
7 | *
8 | *
9 | * @author Hannes Dorfmann
10 | */
11 | class AtlasAppKeyParceler : KeyParceler {
12 |
13 | override fun toParcelable(key: Any?): Parcelable = key as Parcelable
14 |
15 | override fun toKey(parcelable: Parcelable) = parcelable
16 | }
--------------------------------------------------------------------------------
/sample/src/main/res/menu/menu_main.xml:
--------------------------------------------------------------------------------
1 |
10 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/dagger/ApplicationModule.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.dagger
2 |
3 | import com.hannesdorfmann.mosby.sample.flow.model.Atlas
4 | import dagger.Module
5 | import dagger.Provides
6 | import javax.inject.Singleton
7 |
8 | /**
9 | *
10 | *
11 | * @author Hannes Dorfmann
12 | */
13 | @Module
14 | class ApplicationModule {
15 |
16 | @Provides @Singleton
17 | fun provideAtlas(): Atlas = Atlas()
18 | }
--------------------------------------------------------------------------------
/sample/src/androidTest/java/com/hannesdorfmann/mosby/sample/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/event/MailStaredEvent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.event;
2 |
3 | /**
4 | * Fired to inform that an Mail has been starred
5 | * @author Hannes Dorfmann
6 | */
7 | public class MailStaredEvent {
8 | private int mailId;
9 |
10 | public MailStaredEvent(int mailId) {
11 | this.mailId = mailId;
12 | }
13 |
14 | public int getMailId() {
15 | return mailId;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/java/com/hannesdorfmann/mosby/sample/dagger2/model/GithubApi.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.dagger2.model;
2 |
3 | import java.util.List;
4 | import retrofit.http.GET;
5 | import retrofit.http.Headers;
6 | import rx.Observable;
7 |
8 | /**
9 | * @author Hannes Dorfmann
10 | */
11 | public interface GithubApi {
12 |
13 | @GET("/repositories")
14 | @Headers("Cache-Control: no-cache")
15 | public Observable> getRepos();
16 | }
17 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/event/MailUnstaredEvent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.event;
2 |
3 | /**
4 | * Fired to inform that an Mail has been starred
5 | * @author Hannes Dorfmann
6 | */
7 | public class MailUnstaredEvent {
8 | private int mailId;
9 |
10 | public MailUnstaredEvent(int mailId) {
11 | this.mailId = mailId;
12 | }
13 |
14 | public int getMailId() {
15 | return mailId;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/sample-mail/src/androidTest/java/com/hannesdorfmann/mosby/sample/mail/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/sample-kotlin/src/androidTest/java/com/hannesdorfmann/mosby/sample/kotlin/ApplicationTest.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.kotlin;
2 |
3 | import android.app.Application;
4 | import android.test.ApplicationTestCase;
5 |
6 | /**
7 | * Testing Fundamentals
8 | */
9 | public class ApplicationTest extends ApplicationTestCase {
10 | public ApplicationTest() {
11 | super(Application.class);
12 | }
13 | }
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/presenter/UselessGenericParamsMvpPresenter.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.presenter;
2 |
3 | import com.hannesdorfmann.mosby.mvp.MvpNullObjectBasePresenter;
4 | import com.hannesdorfmann.mosby.mvp.test.view.TestMvpView;
5 |
6 | public class UselessGenericParamsMvpPresenter
7 | extends MvpNullObjectBasePresenter {
8 |
9 | public void viewShowThat() {
10 | getView().showThat();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/MainActivityComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.dagger.NavigationModule;
4 | import dagger.Component;
5 | import javax.inject.Singleton;
6 |
7 | /**
8 | * @author Hannes Dorfmann
9 | */
10 | @Singleton
11 | @Component(
12 | modules = NavigationModule.class) public interface MainActivityComponent {
13 |
14 | public void inject(MainActivity activity);
15 | }
16 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/event/MailReceivedEvent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.event;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
4 |
5 | /**
6 | * @author Hannes Dorfmann
7 | */
8 | public class MailReceivedEvent {
9 |
10 | private Mail mail;
11 |
12 | public MailReceivedEvent(Mail mail) {
13 | this.mail = mail;
14 | }
15 |
16 | public Mail getMail() {
17 | return mail;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/loading_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/sample-dagger1/src/main/res/layout/loading_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Atlas
3 | Info
4 | Pictures
5 | Map
6 |
7 | Name:
8 | Capital:
9 | Population:
10 | Area:
11 | Currency:
12 |
13 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/layout/loading_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/layout/loading_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/layout/merge_loadingview.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
14 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/anim/pulse.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
--------------------------------------------------------------------------------
/sample-dagger1/src/main/java/com/hannesdorfmann/mosby/sample/dagger1/model/ErrorMessageDeterminer.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.dagger1.model;
2 |
3 | /**
4 | * @author Hannes Dorfmann
5 | */
6 | public class ErrorMessageDeterminer {
7 |
8 | public String getErrorMessage(Throwable e, boolean pullToRefresh) {
9 | if (e instanceof NetworkException) {
10 | return "Network Error: Are you connected to the internet?";
11 | }
12 |
13 | return "An unknown error has occurred";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/write/WriteView.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.write;
2 |
3 | import com.hannesdorfmann.mosby.mvp.MvpView;
4 |
5 | /**
6 | * @author Hannes Dorfmann
7 | */
8 | public interface WriteView extends MvpView {
9 |
10 | public void showForm();
11 |
12 | public void showLoading();
13 |
14 | public void showError(Throwable e);
15 |
16 | public void showAuthenticationRequired();
17 |
18 | public void finishBecauseSuccessful();
19 | }
20 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/dagger/NavigationModule.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.dagger;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.IntentStarter;
4 | import dagger.Module;
5 | import dagger.Provides;
6 | import javax.inject.Singleton;
7 |
8 | /**
9 | * @author Hannes Dorfmann
10 | */
11 | @Module public class NavigationModule {
12 |
13 | @Singleton @Provides public IntentStarter providesIntentStarter() {
14 | return new IntentStarter();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | sample
3 | Mosby Samples
4 |
5 | Hello world!
6 | Settings
7 | LceActivity
8 |
9 | Error while loading countries. Click here to retry
10 | Error while loading countries
11 |
12 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/dagger/ContacsModule.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.dagger;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.model.contact.ContactsManager;
4 | import dagger.Module;
5 | import dagger.Provides;
6 | import javax.inject.Singleton;
7 |
8 | /**
9 | * @author Hannes Dorfmann
10 | */
11 | @Module public class ContacsModule {
12 |
13 | @Singleton @Provides public ContactsManager contactsManager() {
14 | return new ContactsManager();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/ui/event/ShowMailDetailsEvent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.ui.event;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
4 |
5 | /**
6 | * Event to inform that a certain
7 | * @author Hannes Dorfmann
8 | */
9 | public class ShowMailDetailsEvent {
10 | private Mail mail;
11 |
12 | public ShowMailDetailsEvent(Mail mail) {
13 | this.mail = mail;
14 | }
15 |
16 | public Mail getMail() {
17 | return mail;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout/list_statistics.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/activity_embedded_fragment.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/event/MailSentEvent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.event;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
4 |
5 | /**
6 | * Thrown to inform that a mail has been sent successfully
7 | * @author Hannes Dorfmann
8 | */
9 | public class MailSentEvent {
10 |
11 | private Mail mail;
12 |
13 | public MailSentEvent(Mail mail) {
14 | this.mail = mail;
15 | }
16 |
17 | public Mail getMail() {
18 | return mail;
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable/label_view_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | -
5 |
6 |
7 |
8 |
9 |
10 | -
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/values-sw600dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 12dp
5 | 320dp
6 | 24dp
7 |
8 | 12dp
9 | 24dp
10 |
11 | 54dp
12 |
13 | 72dp
14 |
15 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/layout/item_picture.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/java/com/hannesdorfmann/mosby/sample/dagger2/model/Repo.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.dagger2.model;
2 |
3 | /**
4 | * @author Hannes Dorfmann
5 | */
6 | public class Repo {
7 |
8 | long id;
9 | String name;
10 | String description;
11 |
12 | User owner;
13 |
14 | public long getId() {
15 | return id;
16 | }
17 |
18 | public String getName() {
19 | return name;
20 | }
21 |
22 | public String getDescription() {
23 | return description;
24 | }
25 |
26 | public User getOwner() {
27 | return owner;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/java/com/hannesdorfmann/mosby/sample/dagger2/repos/ReposComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.dagger2.repos;
2 |
3 | import com.hannesdorfmann.mosby.sample.dagger2.SampleModule;
4 | import dagger.Component;
5 | import javax.inject.Singleton;
6 |
7 | /**
8 | * @author Hannes Dorfmann
9 | */
10 | @Singleton @Component(
11 | modules = SampleModule.class)
12 | public interface ReposComponent {
13 |
14 | public void inject(ReposFragment fragment);
15 |
16 | public ReposPresenter presenter();
17 |
18 | public ReposAdapter adapter();
19 | }
20 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/hannesdorfmann/mosby/sample/mvp/lce/layout/CountriesLayoutActivity.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mvp.lce.layout;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import com.hannesdorfmann.mosby.sample.R;
6 |
7 | /**
8 | * @author Hannes Dorfmann
9 | */
10 | public class CountriesLayoutActivity extends AppCompatActivity {
11 |
12 | @Override protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.countries_mvp_layout);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/model/DetailsTab.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.model
2 |
3 | import android.support.annotation.StringRes
4 |
5 | /**
6 | *
7 | *
8 | * @author Hannes Dorfmann
9 | */
10 | sealed class DetailsTab(val countryId: Int, @StringRes val nameRes: Int) {
11 |
12 | class InfoTab(countryId: Int, @StringRes name: Int) : DetailsTab(countryId, name)
13 | class MapTab(countryId: Int, @StringRes name: Int) : DetailsTab(countryId, name)
14 | class ImagesTab(countryId: Int, @StringRes name: Int) : DetailsTab(countryId, name)
15 |
16 | }
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/java/com/hannesdorfmann/mosby/sample/dagger2/model/ErrorMessageDeterminer.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.dagger2.model;
2 |
3 | import retrofit.RetrofitError;
4 |
5 | /**
6 | * @author Hannes Dorfmann
7 | */
8 | public class ErrorMessageDeterminer {
9 |
10 | public String getErrorMessage(Throwable e, boolean pullToRefresh) {
11 | if (e instanceof RetrofitError && ((RetrofitError) e).getKind() == RetrofitError.Kind.NETWORK) {
12 | return "Network Error: Are you connected to the internet?";
13 | }
14 |
15 | return "An unknown error has occurred";
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/label/LabelLayoutComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.label;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailAppComponent;
4 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailModule;
5 | import dagger.Component;
6 | import javax.inject.Singleton;
7 |
8 | /**
9 | * @author Hannes Dorfmann
10 | */
11 |
12 | @Singleton
13 | @Component(
14 | modules = MailModule.class,
15 | dependencies = MailAppComponent.class
16 | )
17 | public interface LabelLayoutComponent {
18 |
19 | LabelPresenter presenter();
20 | }
21 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/statistics/StatisticsComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.statistics;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailAppComponent;
4 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailModule;
5 | import dagger.Component;
6 | import javax.inject.Singleton;
7 |
8 | /**
9 | * @author Hannes Dorfmann
10 | */
11 | @Singleton
12 | @Component(
13 | modules = MailModule.class,
14 | dependencies = MailAppComponent.class)
15 | public interface StatisticsComponent {
16 |
17 | public StatisticsPresenter presenter();
18 | }
19 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/kotlin/com/hannesdorfmann/mosby/sample/kotlin/HeroesViewHolder.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.kotlin
2 |
3 | import android.support.v7.widget.RecyclerView
4 | import android.view.View
5 | import android.widget.ImageView
6 | import android.widget.TextView
7 | /**
8 | *
9 | * @author Hannes Dorfmann
10 | */
11 | class HeroesViewHolder(view: View) : RecyclerView.ViewHolder(view) {
12 |
13 | var image: ImageView? = null
14 | var name: TextView? = null
15 |
16 | init {
17 | image = view.findViewById(R.id.image) as ImageView
18 | name = view.findViewById(R.id.name) as TextView
19 | }
20 |
21 | }
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/search/SearchView.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.search;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.base.view.BaseMailView;
4 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
5 | import java.util.List;
6 |
7 | /**
8 | * @author Hannes Dorfmann
9 | */
10 | public interface SearchView extends BaseMailView> {
11 |
12 | public void addOlderMails(List older);
13 |
14 | public void showLoadMore(boolean showLoadMore);
15 |
16 | public void showLoadMoreError(Throwable e);
17 |
18 | public void showSearchNotStartedYet();
19 | }
20 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout/fragment_statistics.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
15 |
16 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/event/MailReadEvent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.event;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
4 |
5 | /**
6 | * Fired to inform that a certain mail should be marked as read
7 | *
8 | * @author Hannes Dorfmann
9 | */
10 | public class MailReadEvent {
11 |
12 | boolean read;
13 | Mail mail;
14 |
15 | public MailReadEvent(Mail mail, boolean read) {
16 | this.mail = mail;
17 | }
18 |
19 | public Mail getMail() {
20 | return mail;
21 | }
22 |
23 | public boolean isRead() {
24 | return read;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/mail/MailComparator.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.mail;
2 |
3 | import java.util.Comparator;
4 |
5 | /**
6 | * A Comparator for sorting mails in reverse order. Useful for binary search.
7 | *
8 | * @author Hannes Dorfmann
9 | */
10 | public class MailComparator implements Comparator {
11 |
12 |
13 | public static final MailComparator INSTANCE = new MailComparator();
14 |
15 | private MailComparator(){
16 |
17 | }
18 |
19 | @Override public int compare(Mail lhs, Mail rhs) {
20 | return rhs.getDate().compareTo(lhs.getDate());
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/ui/transition/ExcludedExplodeTransition.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.ui.transition;
2 |
3 | import android.annotation.TargetApi;
4 | import android.transition.Explode;
5 | import com.hannesdorfmann.mosby.sample.mail.R;
6 |
7 | /**
8 | * @author Hannes Dorfmann
9 | */
10 | @TargetApi(21)
11 | public class ExcludedExplodeTransition extends Explode {
12 |
13 | public ExcludedExplodeTransition() {
14 | excludeTarget(R.id.toolbar, true);
15 | excludeTarget(android.R.id.statusBarBackground, true);
16 | excludeTarget(android.R.id.navigationBarBackground, true);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/sample/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 | #3F51B5
17 |
18 |
19 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout/list_load_more.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/dagger/ApplicationComponent.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.dagger
2 |
3 | import com.hannesdorfmann.mosby.sample.flow.countries.CountriesPresenter
4 | import com.hannesdorfmann.mosby.sample.flow.countries.CountryDetailsPresenter
5 | import dagger.Component
6 | import javax.inject.Singleton
7 |
8 | /**
9 | *
10 | *
11 | * @author Hannes Dorfmann
12 | */
13 | @Singleton
14 | @Component(modules = arrayOf(ApplicationModule::class))
15 | interface ApplicationComponent {
16 |
17 | fun countriesPresenter(): CountriesPresenter
18 |
19 | fun countryDetailsPresenter(): CountryDetailsPresenter
20 |
21 | }
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/event/MailSentErrorEvent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.event;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
4 |
5 | /**
6 | * @author Hannes Dorfmann
7 | */
8 | public class MailSentErrorEvent {
9 |
10 | private Mail mail;
11 | private Throwable exception;
12 |
13 | public MailSentErrorEvent(Mail mail, Throwable exception) {
14 | this.mail = mail;
15 | this.exception = exception;
16 | }
17 |
18 | public Mail getMail() {
19 | return mail;
20 | }
21 |
22 | public Throwable getException() {
23 | return exception;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/label/LabelView.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.label;
2 |
3 | import com.hannesdorfmann.mosby.mvp.lce.MvpLceView;
4 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Label;
5 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
6 | import java.util.List;
7 |
8 | /**
9 | * @author Hannes Dorfmann
10 | */
11 | public interface LabelView extends MvpLceView> {
12 |
13 | public void showLabel();
14 |
15 | public void changeLabel(Mail mail, String label);
16 |
17 | public void showChangeLabelFailed(Mail mail, Throwable t);
18 |
19 | public void setMail(Mail mail);
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/sample-dagger1/src/main/res/layout/error_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
18 |
19 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/layout/error_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
18 |
19 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/layout/error_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
18 |
19 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/layout/merge_errorview.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
18 |
19 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/profile/ProfileComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.profile;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.dagger.ContacsModule;
4 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailAppComponent;
5 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailModule;
6 | import dagger.Component;
7 | import javax.inject.Singleton;
8 |
9 | /**
10 | * @author Hannes Dorfmann
11 | */
12 | @Singleton @Component(
13 | modules = {
14 | MailModule.class, ContacsModule.class,
15 |
16 | },
17 | dependencies = MailAppComponent.class) public interface ProfileComponent {
18 |
19 | public ProfilePresenter presenter();
20 | }
21 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/event/MailLabelChangedEvent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.event;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
4 |
5 | /**
6 | * This event is fired to inform that the label of a mail has changed.
7 | *
8 | * @author Hannes Dorfmann
9 | */
10 | public class MailLabelChangedEvent {
11 |
12 | private Mail mail;
13 | private String label;
14 |
15 | public MailLabelChangedEvent(Mail mail, String label) {
16 | this.mail = mail;
17 | this.label = label;
18 | }
19 |
20 | public Mail getMail() {
21 | return mail;
22 | }
23 |
24 | public String getLabel() {
25 | return label;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/mvp/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/hannes/android-sdks/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 |
--------------------------------------------------------------------------------
/sample/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/hannes/android-sdks/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 |
--------------------------------------------------------------------------------
/sample-flow/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/hannes/android-sdks/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 |
--------------------------------------------------------------------------------
/sample-mail/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/hannes/android-sdks/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 |
--------------------------------------------------------------------------------
/viewstate/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/hannes/android-sdks/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 |
--------------------------------------------------------------------------------
/sample-dagger1/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/hannes/android-sdks/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 |
--------------------------------------------------------------------------------
/sample-kotlin/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/hannes/android-sdks/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 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/write/WriteComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.write;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailAppComponent;
4 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailModule;
5 | import com.hannesdorfmann.mosby.sample.mail.dagger.NavigationModule;
6 | import dagger.Component;
7 | import javax.inject.Singleton;
8 |
9 | /**
10 | * @author Hannes Dorfmann
11 | */
12 | @Singleton @Component(
13 | modules = { MailModule.class, NavigationModule.class },
14 | dependencies = MailAppComponent.class) public interface WriteComponent {
15 |
16 | public WritePresenter presenter();
17 |
18 | public void inject(WriteActivity activity);
19 | }
20 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/hannesdorfmann/mosby/sample/mvp/lce/viewstate/RetainingCountriesFragmentEmbededInXmlActivity.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mvp.lce.viewstate;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 | import com.hannesdorfmann.mosby.sample.R;
6 |
7 | /**
8 | * An example showing that embeded fragments (embeded in activities xml layout) are working
9 | *
10 | * @author Hannes Dorfmann
11 | */
12 | public class RetainingCountriesFragmentEmbededInXmlActivity extends AppCompatActivity {
13 |
14 | @Override protected void onCreate(Bundle savedInstanceState) {
15 | super.onCreate(savedInstanceState);
16 | setContentView(R.layout.activity_embedded_fragment);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/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/hannes/android-sdks/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 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/mails/MailsComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.mails;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailAppComponent;
4 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailModule;
5 | import com.hannesdorfmann.mosby.sample.mail.dagger.NavigationModule;
6 | import dagger.Component;
7 | import javax.inject.Singleton;
8 |
9 | /**
10 | * @author Hannes Dorfmann
11 | */
12 | @Singleton @Component(
13 | modules = {MailModule.class, NavigationModule.class},
14 | dependencies = MailAppComponent.class)
15 | public interface MailsComponent {
16 |
17 | public MailsPresenter presenter();
18 |
19 | public void inject(MailsFragment fragment);
20 | }
21 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/search/SearchComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.search;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailAppComponent;
4 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailModule;
5 | import com.hannesdorfmann.mosby.sample.mail.dagger.NavigationModule;
6 | import dagger.Component;
7 | import javax.inject.Singleton;
8 |
9 | /**
10 | * @author Hannes Dorfmann
11 | */
12 | @Singleton @Component(
13 | modules = { MailModule.class, NavigationModule.class },
14 | dependencies = MailAppComponent.class) public interface SearchComponent {
15 |
16 | public SearchPresenter presenter();
17 |
18 | public void inject(SearchFragment fragment);
19 | }
20 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/error_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
19 |
20 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/countries/CountriesScreen.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.countries
2 |
3 | import android.os.Parcel
4 | import android.os.Parcelable
5 |
6 | /**
7 | *
8 | *
9 | * @author Hannes Dorfmann
10 | */
11 | class CountriesScreen : Parcelable {
12 |
13 | override fun writeToParcel(p0: Parcel?, p1: Int) {
14 | }
15 |
16 | override fun describeContents(): Int = 0
17 |
18 | companion object {
19 | val CREATOR = object : Parcelable.Creator {
20 | override fun createFromParcel(p0: Parcel?): CountriesScreen = CountriesScreen()
21 |
22 | override fun newArray(size: Int): Array? = Array(size,
23 | { CountriesScreen() })
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/details/DetailsComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.details;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailAppComponent;
4 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailModule;
5 | import com.hannesdorfmann.mosby.sample.mail.dagger.NavigationModule;
6 | import dagger.Component;
7 | import javax.inject.Singleton;
8 |
9 | /**
10 | * @author Hannes Dorfmann
11 | */
12 | @Singleton
13 | @Component(
14 | modules = { MailModule.class, NavigationModule.class },
15 | dependencies = MailAppComponent.class
16 | )
17 | public interface DetailsComponent {
18 |
19 | public DetailsPresenter presenter();
20 |
21 | public void inject(DetailsFragment fragment);
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/.buildscript/deploy_snapshot.sh:
--------------------------------------------------------------------------------
1 | SLUG="sockeqwe/mosby"
2 | JDK="oraclejdk8"
3 | BRANCH="master"
4 |
5 | set -e
6 |
7 | if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then
8 | echo "Skipping snapshot deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'."
9 | elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then
10 | echo "Skipping snapshot deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'."
11 | elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
12 | echo "Skipping snapshot deployment: was pull request."
13 | elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then
14 | echo "Skipping snapshot deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'."
15 | else
16 | echo "Deploying snapshot..."
17 | ./gradlew uploadArchives
18 | echo "Snapshot deployed!"
19 | fi
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/presenter/NullObjectMvpPresenter.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.presenter;
2 |
3 | import android.support.annotation.NonNull;
4 |
5 | import com.hannesdorfmann.mosby.mvp.MvpNullObjectBasePresenter;
6 | import com.hannesdorfmann.mosby.mvp.test.data.TestData;
7 | import com.hannesdorfmann.mosby.mvp.test.view.TestMvpView;
8 |
9 | public class NullObjectMvpPresenter
10 | extends MvpNullObjectBasePresenter {
11 |
12 | public void viewShowFoo(TestData data) {
13 | getView().showFoo(data);
14 | }
15 |
16 | public void viewShowThat() {
17 | getView().showThat();
18 | }
19 |
20 | @NonNull
21 | @Override
22 | public TestMvpView getView() {
23 | return super.getView();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/mail/service/ServiceComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.mail.service;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailAppComponent;
4 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailModule;
5 | import com.hannesdorfmann.mosby.sample.mail.dagger.NavigationModule;
6 | import dagger.Component;
7 | import javax.inject.Singleton;
8 |
9 | /**
10 | * @author Hannes Dorfmann
11 | */
12 | @Singleton @Component(
13 | modules = { MailModule.class, NavigationModule.class },
14 | dependencies = MailAppComponent.class)
15 | public interface ServiceComponent {
16 |
17 | public void inject(SendMailService service);
18 |
19 | public void inject(GcmFakeIntentService service);
20 | }
21 |
--------------------------------------------------------------------------------
/sample-dagger1/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | mosby dagger1
19 |
20 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/java/com/hannesdorfmann/mosby/sample/dagger2/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.dagger2;
2 |
3 | import android.os.Bundle;
4 | import android.support.v7.app.AppCompatActivity;
5 |
6 | import com.hannesdorfmann.mosby.sample.dagger2.repos.ReposFragment;
7 |
8 | public class MainActivity extends AppCompatActivity {
9 |
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | setContentView(R.layout.activity_main);
14 |
15 | if (savedInstanceState == null) {
16 | getSupportFragmentManager().beginTransaction()
17 | .add(R.id.fragmentContainer, new ReposFragment())
18 | .commit();
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/profile/mails/ProfileMailsComponent.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.profile.mails;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailAppComponent;
4 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailModule;
5 | import com.hannesdorfmann.mosby.sample.mail.dagger.NavigationModule;
6 | import dagger.Component;
7 | import javax.inject.Singleton;
8 |
9 | /**
10 | * @author Hannes Dorfmann
11 | */
12 | @Singleton @Component(
13 | modules = { MailModule.class, NavigationModule.class },
14 | dependencies= MailAppComponent.class)
15 |
16 | public interface ProfileMailsComponent {
17 |
18 | public ProfileMailsPresenter presenter();
19 |
20 | public void inject(ProfileMailsFragment fragment);
21 | }
22 |
--------------------------------------------------------------------------------
/mvp-common/src/test/java/com/hannesdorfmann/mosby/mvp/test/view/TestMvpViewWithMultipleInterfaces.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.test.view;
2 |
3 | import com.hannesdorfmann.mosby.mvp.test.data.TestData;
4 | import com.hannesdorfmann.mosby.mvp.test.interfaces.BarInterface;
5 | import com.hannesdorfmann.mosby.mvp.test.interfaces.FooInterface;
6 |
7 | public class TestMvpViewWithMultipleInterfaces
8 | implements FooInterface, BarInterface, AnotherMvpView, TestMvpView {
9 |
10 | @Override
11 | public void bar() {
12 | }
13 |
14 | @Override
15 | public void foo() {
16 | }
17 |
18 | @Override
19 | public void showFoo(TestData data) {
20 | }
21 |
22 | @Override
23 | public void showThat() {
24 | }
25 |
26 | @Override
27 | public void showOtherMvpView() {
28 | }
29 | }
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout-sw600dp/activity_mail_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
15 |
16 |
17 |
18 |
24 |
25 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/values-sw360dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 | 304dp
20 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/values-sw384dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 | 320dp
20 |
--------------------------------------------------------------------------------
/mvp/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | bin/
5 | gen/
6 | classes/
7 | gen-external-apklibs/
8 |
9 | # Eclipse project files
10 | .classpath
11 | .project
12 | .metadata
13 | .settings
14 |
15 | # IntelliJ files
16 | .idea
17 | *.iml
18 |
19 | # OSX files
20 | .DS_Store
21 |
22 | # Windows files
23 | Thumbs.db
24 |
25 | # vi swap files
26 | *.swp
27 |
28 | # backup files
29 | *.bak
30 |
31 |
32 | # Files for the Dalvik VM
33 | *.dex
34 |
35 | # Java class files
36 | *.class
37 |
38 | # Generated files
39 | bin/
40 | gen/
41 |
42 | # Gradle files
43 | .gradle/
44 | build/
45 | .gradle
46 |
47 | #maven files
48 | target/
49 | /null
50 |
51 | # Local configuration file (sdk path, etc)
52 |
53 | local.properties
54 |
55 | # Proguard folder generated by Eclipse
56 | proguard/
57 |
58 | #Log Files
59 | *.log
60 |
--------------------------------------------------------------------------------
/sample/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | bin/
5 | gen/
6 | classes/
7 | gen-external-apklibs/
8 |
9 | # Eclipse project files
10 | .classpath
11 | .project
12 | .metadata
13 | .settings
14 |
15 | # IntelliJ files
16 | .idea
17 | *.iml
18 |
19 | # OSX files
20 | .DS_Store
21 |
22 | # Windows files
23 | Thumbs.db
24 |
25 | # vi swap files
26 | *.swp
27 |
28 | # backup files
29 | *.bak
30 |
31 |
32 | # Files for the Dalvik VM
33 | *.dex
34 |
35 | # Java class files
36 | *.class
37 |
38 | # Generated files
39 | bin/
40 | gen/
41 |
42 | # Gradle files
43 | .gradle/
44 | build/
45 | .gradle
46 |
47 | #maven files
48 | target/
49 | /null
50 |
51 | # Local configuration file (sdk path, etc)
52 |
53 | local.properties
54 |
55 | # Proguard folder generated by Eclipse
56 | proguard/
57 |
58 | #Log Files
59 | *.log
60 |
--------------------------------------------------------------------------------
/testing/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | bin/
5 | gen/
6 | classes/
7 | gen-external-apklibs/
8 |
9 | # Eclipse project files
10 | .classpath
11 | .project
12 | .metadata
13 | .settings
14 |
15 | # IntelliJ files
16 | .idea
17 | *.iml
18 |
19 | # OSX files
20 | .DS_Store
21 |
22 | # Windows files
23 | Thumbs.db
24 |
25 | # vi swap files
26 | *.swp
27 |
28 | # backup files
29 | *.bak
30 |
31 |
32 | # Files for the Dalvik VM
33 | *.dex
34 |
35 | # Java class files
36 | *.class
37 |
38 | # Generated files
39 | bin/
40 | gen/
41 |
42 | # Gradle files
43 | .gradle/
44 | build/
45 | .gradle
46 |
47 | #maven files
48 | target/
49 | /null
50 |
51 | # Local configuration file (sdk path, etc)
52 |
53 | local.properties
54 |
55 | # Proguard folder generated by Eclipse
56 | proguard/
57 |
58 | #Log Files
59 | *.log
60 |
--------------------------------------------------------------------------------
/viewstate/src/main/java/com/hannesdorfmann/mosby/mvp/delegate/ViewGroupViewStateDelegateCallback.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.delegate;
2 |
3 | import com.hannesdorfmann.mosby.mvp.MvpPresenter;
4 | import com.hannesdorfmann.mosby.mvp.MvpView;
5 | import com.hannesdorfmann.mosby.mvp.viewstate.ViewState;
6 |
7 | /**
8 | * * An enhanced version of {@link MvpDelegateCallback} that adds {@link ViewState} support.
9 | * This interface must be implemented by all (subclasses of) android.view.View like FrameLayout
10 | * that want to support {@link
11 | * ViewState} and mvp.
12 | *
13 | * @author Hannes Dorfmann
14 | * @since 3.0
15 | */
16 | public interface ViewGroupViewStateDelegateCallback>
17 | extends MvpViewStateDelegateCallback, ViewGroupDelegateCallback {
18 | }
19 |
--------------------------------------------------------------------------------
/mvp-common/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | bin/
5 | gen/
6 | classes/
7 | gen-external-apklibs/
8 |
9 | # Eclipse project files
10 | .classpath
11 | .project
12 | .metadata
13 | .settings
14 |
15 | # IntelliJ files
16 | .idea
17 | *.iml
18 |
19 | # OSX files
20 | .DS_Store
21 |
22 | # Windows files
23 | Thumbs.db
24 |
25 | # vi swap files
26 | *.swp
27 |
28 | # backup files
29 | *.bak
30 |
31 |
32 | # Files for the Dalvik VM
33 | *.dex
34 |
35 | # Java class files
36 | *.class
37 |
38 | # Generated files
39 | bin/
40 | gen/
41 |
42 | # Gradle files
43 | .gradle/
44 | build/
45 | .gradle
46 |
47 | #maven files
48 | target/
49 | /null
50 |
51 | # Local configuration file (sdk path, etc)
52 |
53 | local.properties
54 |
55 | # Proguard folder generated by Eclipse
56 | proguard/
57 |
58 | #Log Files
59 | *.log
60 |
--------------------------------------------------------------------------------
/sample-kotlin/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | bin/
5 | gen/
6 | classes/
7 | gen-external-apklibs/
8 |
9 | # Eclipse project files
10 | .classpath
11 | .project
12 | .metadata
13 | .settings
14 |
15 | # IntelliJ files
16 | .idea
17 | *.iml
18 |
19 | # OSX files
20 | .DS_Store
21 |
22 | # Windows files
23 | Thumbs.db
24 |
25 | # vi swap files
26 | *.swp
27 |
28 | # backup files
29 | *.bak
30 |
31 |
32 | # Files for the Dalvik VM
33 | *.dex
34 |
35 | # Java class files
36 | *.class
37 |
38 | # Generated files
39 | bin/
40 | gen/
41 |
42 | # Gradle files
43 | .gradle/
44 | build/
45 | .gradle
46 |
47 | #maven files
48 | target/
49 | /null
50 |
51 | # Local configuration file (sdk path, etc)
52 |
53 | local.properties
54 |
55 | # Proguard folder generated by Eclipse
56 | proguard/
57 |
58 | #Log Files
59 | *.log
60 |
--------------------------------------------------------------------------------
/testing/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java'
2 | apply from: '../maven-push-java-lib.gradle'
3 | apply plugin: 'findbugs'
4 |
5 | sourceCompatibility = rootProject.ext.javaSourceCompatibility
6 | targetCompatibility = rootProject.ext.javaTargetCompatibility
7 |
8 |
9 | def logger = new com.android.build.gradle.internal.LoggerWrapper(project.logger)
10 | def sdkHandler = new com.android.build.gradle.internal.SdkHandler(project, logger)
11 | for (File file : sdkHandler.sdkLoader.repositories) {
12 | project.repositories.maven {
13 | url = file.toURI()
14 | }
15 | }
16 |
17 | dependencies {
18 | compile project(':mvp-common')
19 | compile 'junit:junit:' + rootProject.ext.junitVersion
20 | compile 'org.mockito:mockito-core:' + rootProject.ext.mockitoVersion
21 | compile 'org.robolectric:robolectric:' + rootProject.ext.robolectricVersion
22 | }
--------------------------------------------------------------------------------
/viewstate/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | bin/
5 | gen/
6 | classes/
7 | gen-external-apklibs/
8 |
9 | # Eclipse project files
10 | .classpath
11 | .project
12 | .metadata
13 | .settings
14 |
15 | # IntelliJ files
16 | .idea
17 | *.iml
18 |
19 | # OSX files
20 | .DS_Store
21 |
22 | # Windows files
23 | Thumbs.db
24 |
25 | # vi swap files
26 | *.swp
27 |
28 | # backup files
29 | *.bak
30 |
31 |
32 | # Files for the Dalvik VM
33 | *.dex
34 |
35 | # Java class files
36 | *.class
37 |
38 | # Generated files
39 | bin/
40 | gen/
41 |
42 | # Gradle files
43 | .gradle/
44 | build/
45 | .gradle
46 |
47 | #maven files
48 | target/
49 | /null
50 |
51 | # Local configuration file (sdk path, etc)
52 |
53 | local.properties
54 |
55 | # Proguard folder generated by Eclipse
56 | proguard/
57 |
58 | #Log Files
59 | *.log
60 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | bin/
5 | gen/
6 | classes/
7 | gen-external-apklibs/
8 |
9 | # Eclipse project files
10 | .classpath
11 | .project
12 | .metadata
13 | .settings
14 |
15 | # IntelliJ files
16 | .idea
17 | *.iml
18 |
19 | # OSX files
20 | .DS_Store
21 |
22 | # Windows files
23 | Thumbs.db
24 |
25 | # vi swap files
26 | *.swp
27 |
28 | # backup files
29 | *.bak
30 |
31 |
32 | # Files for the Dalvik VM
33 | *.dex
34 |
35 | # Java class files
36 | *.class
37 |
38 | # Generated files
39 | bin/
40 | gen/
41 | captures/
42 |
43 | # Gradle files
44 | .gradle/
45 | build/
46 | .gradle
47 |
48 | #maven files
49 | target/
50 | /null
51 |
52 | # Local configuration file (sdk path, etc)
53 |
54 | local.properties
55 |
56 | # Proguard folder generated by Eclipse
57 | proguard/
58 |
59 | #Log Files
60 | *.log
61 |
--------------------------------------------------------------------------------
/mvp-common/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'java'
2 | apply from: '../maven-push-java-lib.gradle'
3 | apply plugin: 'findbugs'
4 |
5 | sourceCompatibility = rootProject.ext.javaSourceCompatibility
6 | targetCompatibility = rootProject.ext.javaTargetCompatibility
7 |
8 | def logger = new com.android.build.gradle.internal.LoggerWrapper(project.logger)
9 | def sdkHandler = new com.android.build.gradle.internal.SdkHandler(project, logger)
10 | for (File file : sdkHandler.sdkLoader.repositories) {
11 | project.repositories.maven {
12 | url = file.toURI()
13 | }
14 | }
15 |
16 |
17 | dependencies {
18 |
19 | compile 'com.android.support:support-annotations:' + rootProject.ext.supportAnnotations
20 |
21 | testCompile 'junit:junit:' + rootProject.ext.junitVersion
22 | testCompile 'org.mockito:mockito-core:' + rootProject.ext.mockitoVersion
23 | }
24 |
--------------------------------------------------------------------------------
/sample-dagger1/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | bin/
5 | gen/
6 | classes/
7 | gen-external-apklibs/
8 |
9 | # Eclipse project files
10 | .classpath
11 | .project
12 | .metadata
13 | .settings
14 |
15 | # IntelliJ files
16 | .idea
17 | *.iml
18 |
19 | # OSX files
20 | .DS_Store
21 |
22 | # Windows files
23 | Thumbs.db
24 |
25 | # vi swap files
26 | *.swp
27 |
28 | # backup files
29 | *.bak
30 |
31 |
32 | # Files for the Dalvik VM
33 | *.dex
34 |
35 | # Java class files
36 | *.class
37 |
38 | # Generated files
39 | bin/
40 | gen/
41 |
42 | # Gradle files
43 | .gradle/
44 | build/
45 | .gradle
46 |
47 | #maven files
48 | target/
49 | /null
50 |
51 | # Local configuration file (sdk path, etc)
52 |
53 | local.properties
54 |
55 | # Proguard folder generated by Eclipse
56 | proguard/
57 |
58 | #Log Files
59 | *.log
60 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/.gitignore:
--------------------------------------------------------------------------------
1 | # Built application files
2 | *.apk
3 | *.ap_
4 | bin/
5 | gen/
6 | classes/
7 | gen-external-apklibs/
8 |
9 | # Eclipse project files
10 | .classpath
11 | .project
12 | .metadata
13 | .settings
14 |
15 | # IntelliJ files
16 | .idea
17 | *.iml
18 |
19 | # OSX files
20 | .DS_Store
21 |
22 | # Windows files
23 | Thumbs.db
24 |
25 | # vi swap files
26 | *.swp
27 |
28 | # backup files
29 | *.bak
30 |
31 |
32 | # Files for the Dalvik VM
33 | *.dex
34 |
35 | # Java class files
36 | *.class
37 |
38 | # Generated files
39 | bin/
40 | gen/
41 |
42 | # Gradle files
43 | .gradle/
44 | build/
45 | .gradle
46 |
47 | #maven files
48 | target/
49 | /null
50 |
51 | # Local configuration file (sdk path, etc)
52 |
53 | local.properties
54 |
55 | # Proguard folder generated by Eclipse
56 | proguard/
57 |
58 | #Log Files
59 | *.log
60 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
13 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/sample-flow/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/AtlasApplication.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow
2 |
3 | import android.app.Application
4 | import android.content.Context
5 | import com.hannesdorfmann.mosby.sample.flow.dagger.ApplicationComponent
6 | import com.hannesdorfmann.mosby.sample.flow.dagger.DaggerApplicationComponent
7 |
8 | /**
9 | *
10 | *
11 | * @author Hannes Dorfmann
12 | */
13 | class AtlasApplication : Application() {
14 |
15 | private lateinit var component: ApplicationComponent
16 |
17 | override fun onCreate() {
18 | super.onCreate()
19 | component = DaggerApplicationComponent.create()
20 | }
21 |
22 | companion object {
23 | fun getComponent(context: Context): ApplicationComponent {
24 | return (context.applicationContext as AtlasApplication).component
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/sample-mail/src/main/res/anim/shake_interpolator.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/layout/recycler_swiperefresh_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
14 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/layout/list_hero_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
15 |
26 |
27 |
--------------------------------------------------------------------------------
/mvp/src/test/java/com/hannesdorfmann/mosby/mvp/delegate/OrientationChangeFragmentTest.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.mvp.delegate;
2 |
3 | import junit.framework.Assert;
4 | import org.junit.Test;
5 |
6 | /**
7 | * @author Hannes Dorfmann
8 | */
9 | public class OrientationChangeFragmentTest {
10 |
11 | @Test public void getPut() {
12 | OrientationChangeManager.OrientationChangeFragment fragment =
13 | new OrientationChangeManager.OrientationChangeFragment();
14 |
15 | OrientationChangeManager.CacheEntry entry1 = new OrientationChangeManager.CacheEntry(null);
16 | OrientationChangeManager.CacheEntry entry2 = new OrientationChangeManager.CacheEntry(null);
17 |
18 | fragment.put(1, entry1);
19 | fragment.put(2, entry2);
20 |
21 | Assert.assertTrue(fragment.get(1) == entry1);
22 | Assert.assertTrue(fragment.get(2) == entry2);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/statistics/StatisticsPresenter.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.statistics;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.base.presenter.BaseRxAuthPresenter;
4 | import com.hannesdorfmann.mosby.sample.mail.model.mail.MailProvider;
5 | import com.hannesdorfmann.mosby.sample.mail.model.mail.statistics.MailStatistics;
6 | import de.greenrobot.event.EventBus;
7 | import javax.inject.Inject;
8 |
9 | /**
10 | * @author Hannes Dorfmann
11 | */
12 | public class StatisticsPresenter extends BaseRxAuthPresenter {
13 |
14 | @Inject
15 | public StatisticsPresenter(MailProvider mailProvider, EventBus eventBus) {
16 | super(mailProvider, eventBus);
17 | }
18 |
19 | public void loadStatistics() {
20 |
21 | subscribe(mailProvider.getStatistics(), false);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout/activity_mail_details.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
16 |
17 |
18 |
19 |
25 |
26 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/layout/item_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
17 |
18 |
26 |
27 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 | - @color/accent
21 | - @color/primary_dark
22 |
23 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: android
2 | android:
3 | components:
4 | - build-tools-23.0.1
5 | - extra-android-m2repository
6 | - android-23
7 | before_install:
8 | - chmod +x .buildscript/deploy_snapshot.sh
9 | jdk:
10 | - oraclejdk8
11 | env:
12 | global:
13 | - MALLOC_ARENA_MAX=2
14 | - secure: gMFLK1oOnrmKo2BQyuc4q5JNbO9yZNzGXujUjMDZqY80PM17u1NHH+FtMtqHltGdHlysQGWOVEgCCaXKSjzUR/5oWX3Rx2o36sxFeFJTnv6Og1IfYaT+30yMNCw9dZwBgL/f9+MUcJGyg17Y4YJKiKP8f+2Zj8Cem8a1tTOv7z0=
15 | - secure: EtsL8IYW/+QFowKy/pM1pfc6XBz19AEPRv9+3I3vdHbLNzrEgAcQG/sfWwSwG8N9SyQ9HlgFpy+a4rT9y+vcT52izRviZbLKepCiGk2XyCrBasRy0ncbZBk4Mss1JPP2OFatsiEfEOrFo5rt1CnWapMUOwE7X5blCjrLtEjZRSA=
16 | branches:
17 | except:
18 | - gh-pages
19 | notifications:
20 | email: false
21 | sudo: required
22 | script: ./gradlew build --stacktrace
23 | after_success:
24 | - ".buildscript/deploy_snapshot.sh"
25 | cache:
26 | directories:
27 | - "$HOME/.gradle"
28 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable/text_cursor.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/account/LoginException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.model.account;
18 |
19 | /**
20 | * @author Hannes Dorfmann
21 | */
22 | public class LoginException extends Exception {
23 | }
24 |
--------------------------------------------------------------------------------
/mvp-common/src/main/java/com/hannesdorfmann/mosby/mvp/MvpView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.mvp;
18 |
19 | /**
20 | * The root view interface for every mvp view
21 | *
22 | * @author Hannes Dorfmann
23 | * @since 1.0.0
24 | */
25 | public interface MvpView {
26 | }
27 |
--------------------------------------------------------------------------------
/sample-dagger1/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/countrydetails/CountryDetailsScreen.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow.countries
2 |
3 | import android.os.Parcel
4 | import android.os.Parcelable
5 |
6 | /**
7 | *
8 | *
9 | * @author Hannes Dorfmann
10 | */
11 | class CountryDetailsScreen(val countryId: Int) : Parcelable {
12 |
13 | private constructor(p: Parcel) : this(p.readInt())
14 |
15 | override fun writeToParcel(parcel: Parcel, p1: Int) {
16 | parcel.writeInt(countryId)
17 | }
18 |
19 | override fun describeContents(): Int = 0
20 |
21 | companion object {
22 | val CREATOR = object : Parcelable.Creator {
23 | override fun createFromParcel(p: Parcel): CountryDetailsScreen = CountryDetailsScreen(p)
24 |
25 | override fun newArray(size: Int): Array? = Array(size,
26 | { CountryDetailsScreen(-1) })
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/sample/src/main/res/layout/countries_list.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/sample-kotlin/src/main/res/layout/activity_heroes.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/search/SearchActivity.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.search;
2 |
3 | import android.os.Bundle;
4 | import com.hannesdorfmann.mosby.sample.mail.R;
5 | import com.hannesdorfmann.mosby.sample.mail.base.view.BaseActivity;
6 |
7 | /**
8 | * @author Hannes Dorfmann
9 | */
10 | public class SearchActivity extends BaseActivity {
11 |
12 | @Override protected void onCreate(Bundle savedInstanceState) {
13 | super.onCreate(savedInstanceState);
14 | setContentView(R.layout.activity_search);
15 |
16 | if (savedInstanceState == null) {
17 | getSupportFragmentManager().beginTransaction()
18 | .replace(R.id.fragmentContainer, new SearchFragment())
19 | .commit();
20 | }
21 | }
22 |
23 | @Override public void finish() {
24 | super.finish();
25 | overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/sample-dagger1/src/main/res/layout/activity_members.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/res/layout/fragment_repos.xml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/anim/shake.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/hannesdorfmann/mosby/sample/mvp/lce/viewstate/RetainingCountriesActivity.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mvp.lce.viewstate;
2 |
3 | import android.os.Bundle;
4 | import com.hannesdorfmann.mosby.mvp.viewstate.lce.LceViewState;
5 | import com.hannesdorfmann.mosby.mvp.viewstate.lce.data.RetainingLceViewState;
6 | import com.hannesdorfmann.mosby.sample.mvp.CountriesView;
7 | import com.hannesdorfmann.mosby.sample.mvp.model.Country;
8 | import java.util.List;
9 |
10 | /**
11 | * @author Hannes Dorfmann
12 | */
13 | public class RetainingCountriesActivity extends NotRetainingCountriesActivity {
14 |
15 | @Override protected void onCreate(Bundle savedInstanceState) {
16 | super.onCreate(savedInstanceState);
17 | setRetainInstance(true);
18 | }
19 |
20 | @Override public LceViewState, CountriesView> createViewState() {
21 | setRetainInstance(true);
22 | return new RetainingLceViewState<>();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/profile/ProfilePresenter.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.profile;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.base.presenter.BaseRxLcePresenter;
4 | import com.hannesdorfmann.mosby.sample.mail.model.contact.ContactsManager;
5 | import com.hannesdorfmann.mosby.sample.mail.model.contact.Person;
6 | import com.hannesdorfmann.mosby.sample.mail.model.contact.ProfileScreen;
7 | import java.util.List;
8 | import javax.inject.Inject;
9 |
10 | /**
11 | * @author Hannes Dorfmann
12 | */
13 | public class ProfilePresenter extends BaseRxLcePresenter> {
14 |
15 | private ContactsManager contactsManager;
16 |
17 | @Inject public ProfilePresenter(ContactsManager contactsManager) {
18 | this.contactsManager = contactsManager;
19 | }
20 |
21 | public void loadScreens(Person person) {
22 | subscribe(contactsManager.getProfileScreens(person), false);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/utils/BuildUtils.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.utils;
2 |
3 | import android.annotation.TargetApi;
4 | import android.content.Context;
5 | import android.graphics.drawable.Drawable;
6 | import android.os.Build;
7 | import com.hannesdorfmann.mosby.sample.mail.R;
8 |
9 | /**
10 | * Little helper class to detect current installed sdk version
11 | *
12 | * @author Hannes Dorfmann
13 | */
14 | public class BuildUtils {
15 |
16 | public static boolean isMinApi21() {
17 | return Build.VERSION.SDK_INT >= 21;
18 | }
19 |
20 | @TargetApi(21) public static Drawable getBackArrowDrawable(Context context) {
21 |
22 | if (isMinApi21()) {
23 | return context.getResources()
24 | .getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha, context.getTheme());
25 | } else {
26 | return context.getResources().getDrawable(R.drawable.abc_ic_ab_back_mtrl_am_alpha);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout/activity_login.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/fragment_nested_container.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
15 |
16 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/findbugs.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'findbugs'
2 |
3 | afterEvaluate {
4 | def variants = plugins.hasPlugin('com.android.application') ?
5 | android.applicationVariants : android.libraryVariants
6 |
7 | variants.each { variant ->
8 | def task = tasks.create("findBugs${variant.name.capitalize()}", FindBugs)
9 |
10 | task.group = 'verification'
11 | task.description = "Run FindBugs for the ${variant.description}."
12 |
13 | task.effort = 'max'
14 |
15 | task.reportLevel = 'high'
16 | task.reports {
17 | xml {
18 | enabled = false
19 | }
20 | html {
21 | enabled = true
22 | }
23 | }
24 |
25 | def variantCompile = variant.javaCompile
26 |
27 | task.classes = fileTree(variantCompile.destinationDir)
28 | task.source = variantCompile.source
29 | task.classpath = variantCompile.classpath.plus(project.files(android.bootClasspath))
30 |
31 | task.dependsOn(variantCompile)
32 | tasks.getByName('check').dependsOn(task)
33 | }
34 | }
--------------------------------------------------------------------------------
/sample-dagger1/src/main/java/com/hannesdorfmann/mosby/sample/dagger1/model/NetworkException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 |
18 | package com.hannesdorfmann.mosby.sample.dagger1.model;
19 |
20 | /**
21 | * An exception that indicates that a network error has occrred
22 | *
23 | * @author Hannes Dorfmann
24 | */
25 | public class NetworkException extends Exception {
26 | }
27 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout/fragment_mails_base.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/sample/src/main/res/layout/countries_mvp_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
17 |
18 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/profile/mails/ProfileMailsPresenter.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.profile.mails;
2 |
3 | import com.hannesdorfmann.mosby.sample.mail.base.presenter.BaseRxMailPresenter;
4 | import com.hannesdorfmann.mosby.sample.mail.model.contact.Person;
5 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
6 | import com.hannesdorfmann.mosby.sample.mail.model.mail.MailProvider;
7 | import de.greenrobot.event.EventBus;
8 | import java.util.List;
9 | import javax.inject.Inject;
10 |
11 | /**
12 | * @author Hannes Dorfmann
13 | */
14 | public class ProfileMailsPresenter extends BaseRxMailPresenter> {
15 |
16 | @Inject public ProfileMailsPresenter(MailProvider mailProvider, EventBus eventBus) {
17 | super(mailProvider, eventBus);
18 | }
19 |
20 | public void loadMailsSentBy(Person person, boolean pullToRefresh) {
21 |
22 | subscribe(mailProvider.getMailsSentBy(person.getId()), pullToRefresh);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/base/view/AuthView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.base.view;
18 |
19 | import com.hannesdorfmann.mosby.mvp.lce.MvpLceView;
20 |
21 | /**
22 | * @author Hannes Dorfmann
23 | */
24 | public interface AuthView extends MvpLceView {
25 |
26 | public void showAuthenticationRequired();
27 | }
28 |
--------------------------------------------------------------------------------
/viewstate/src/test/java/com/hannesdorfmann/mosby/mvp/delegate/mock/SimpleView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | *
16 | */
17 |
18 | package com.hannesdorfmann.mosby.mvp.delegate.mock;
19 |
20 | import com.hannesdorfmann.mosby.mvp.MvpView;
21 |
22 | /**
23 | * @author Hannes Dorfmann
24 | */
25 | public interface SimpleView extends MvpView {
26 |
27 | public void showA();
28 |
29 | public void showB();
30 | }
31 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/contact/ContactsManager.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.contact;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 | import java.util.concurrent.TimeUnit;
6 | import rx.Observable;
7 | import rx.functions.Func0;
8 |
9 | /**
10 | * @author Hannes Dorfmann
11 | */
12 | public class ContactsManager {
13 |
14 | public Observable> getProfileScreens(Person person) {
15 |
16 | // TODO throw error from time to time
17 | return Observable.defer(new Func0>>() {
18 | @Override public Observable> call() {
19 |
20 | List screens = new ArrayList();
21 | screens.add (new ProfileScreen(ProfileScreen.TYPE_MAILS, "Mails"));
22 | screens.add(new ProfileScreen(ProfileScreen.TYPE_ABOUT, "About"));
23 |
24 | return Observable.just(screens);
25 | }
26 | }).delay(2, TimeUnit.SECONDS);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/event/NotAuthenticatedEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.model.event;
18 |
19 | /**
20 | * This event will be thrown to inform that the user is not authenticated.
21 | * The user has to signup again
22 | *
23 | * @author Hannes Dorfmann
24 | */
25 | public class NotAuthenticatedEvent {
26 | }
27 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/hannesdorfmann/mosby/sample/mvp/CountriesPresenter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mvp;
18 |
19 | import com.hannesdorfmann.mosby.mvp.MvpPresenter;
20 |
21 | /**
22 | * @author Hannes Dorfmann
23 | */
24 | public interface CountriesPresenter extends MvpPresenter{
25 |
26 | public void loadCountries(final boolean pullToRefresh);
27 | }
28 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/mail/MailGenerator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.model.mail;
18 |
19 | import java.util.List;
20 |
21 | /**
22 | * @author Hannes Dorfmann
23 | */
24 | public interface MailGenerator {
25 |
26 | public List generateMails();
27 |
28 | public Mail generateResponseMail(String senderMail);
29 | }
30 |
--------------------------------------------------------------------------------
/sample-flow/src/main/res/layout/item_country.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
20 |
21 |
30 |
31 |
--------------------------------------------------------------------------------
/sample-dagger1/src/main/java/com/hannesdorfmann/mosby/sample/dagger1/members/MembersView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.dagger1.members;
18 |
19 | import com.hannesdorfmann.mosby.mvp.lce.MvpLceView;
20 | import com.hannesdorfmann.mosby.sample.dagger1.model.User;
21 | import java.util.List;
22 |
23 | /**
24 | * @author Hannes Dorfmann
25 | */
26 | public interface MembersView extends MvpLceView>{
27 | }
28 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout-sw600dp/merge_main_split_pane.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
11 |
12 |
16 |
17 |
18 |
19 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/account/AccountManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.model.account;
18 |
19 | import rx.Observable;
20 |
21 | /**
22 | * @author Hannes Dorfmann
23 | */
24 | public interface AccountManager {
25 | Observable doLogin(AuthCredentials credentials);
26 |
27 | Account getCurrentAccount();
28 |
29 | boolean isUserAuthenticated();
30 | }
31 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/login/LoginView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.login;
18 |
19 | import com.hannesdorfmann.mosby.mvp.MvpView;
20 |
21 | /**
22 | * @author Hannes Dorfmann
23 | */
24 | public interface LoginView extends MvpView {
25 |
26 | public void showLoginForm();
27 |
28 | public void showError();
29 |
30 | public void showLoading();
31 |
32 | public void loginSuccessful();
33 | }
34 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/account/NotAuthenticatedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.model.account;
18 |
19 | import com.hannesdorfmann.mosby.sample.mail.model.mail.MailProvider;
20 |
21 | /**
22 | * This Exception will be thrown if a NOT AUTHENTICATED user tries to access {@link MailProvider}
23 | *
24 | * @author Hannes Dorfmann
25 | */
26 | public class NotAuthenticatedException extends Exception {
27 | }
28 |
--------------------------------------------------------------------------------
/sample-mail/README.md:
--------------------------------------------------------------------------------
1 | # Mail sample
2 | This sample mimics a mail client. It's not a real mail client, there is no POP3 or IMAP Server behind it.
3 | All the data is randomly generated on app start. There is no persistent layer like local database on the device. The APK file can be downloaded from [here](https://github.com/sockeqwe/mosby/releases/download/1.1.0/sample-mail.apk).
4 |
5 | **Important:** This sample project uses annotation processors. If you import this sample into android studio, you may have to run `Build --> Rebuild Project` manually to ensure that all annotation processors have generated code.
6 |
7 |
8 | ## Inheritance Hierarchy
9 | The package `com.hannesdorfmann.mosby.sample.mail.base` contains some base presenter classes. Furthermore some base activities and fragments classes are provided in that package that setup `Butterknife`, `Icepick` and `FragmentArgs`.
10 |
11 |
12 | ## UI
13 | This app is not a reference app for material design nor do I have time to keep the latest support library feartures and so on and so forth. This sample demonstrates how to use Mosby. However, feel free to make a pull request to improve this sample app.
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/mails/MailsView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.mails;
18 |
19 | import com.hannesdorfmann.mosby.sample.mail.base.view.BaseMailView;
20 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
21 | import java.util.List;
22 |
23 | /**
24 | * @author Hannes Dorfmann
25 | */
26 | public interface MailsView extends BaseMailView> {
27 |
28 | public void changeLabel(Mail mail, String label);
29 | }
30 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/hannesdorfmann/mosby/sample/mvp/model/custom/A.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mvp.model.custom;
2 |
3 | import android.os.Parcel;
4 | import android.os.Parcelable;
5 | import com.hannesdorfmann.parcelableplease.annotation.ParcelablePlease;
6 |
7 | /**
8 | * @author Hannes Dorfmann
9 | */
10 | @ParcelablePlease public class A implements Parcelable {
11 | String name;
12 |
13 | public A(String name) {
14 | this.name = name;
15 | }
16 | private A(){
17 |
18 | }
19 |
20 | public String getName() {
21 | return name;
22 | }
23 |
24 | @Override public int describeContents() {
25 | return 0;
26 | }
27 |
28 | @Override public void writeToParcel(Parcel dest, int flags) {
29 | AParcelablePlease.writeToParcel(this, dest, flags);
30 | }
31 |
32 | public static final Creator CREATOR = new Creator() {
33 | public A createFromParcel(Parcel source) {
34 | A target = new A();
35 | AParcelablePlease.readFromParcel(target, source);
36 | return target;
37 | }
38 |
39 | public A[] newArray(int size) {
40 | return new A[size];
41 | }
42 | };
43 | }
44 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/hannesdorfmann/mosby/sample/mvp/model/custom/B.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mvp.model.custom;
2 |
3 | import android.os.Parcel;
4 | import android.os.Parcelable;
5 | import com.hannesdorfmann.parcelableplease.annotation.ParcelablePlease;
6 |
7 | /**
8 | * @author Hannes Dorfmann
9 | */
10 |
11 | @ParcelablePlease public class B implements Parcelable {
12 | String foo;
13 |
14 | public B(String foo) {
15 | this.foo = foo;
16 | }
17 | private B(){
18 |
19 | }
20 |
21 | public String getFoo() {
22 | return foo;
23 | }
24 |
25 | @Override public int describeContents() {
26 | return 0;
27 | }
28 |
29 | @Override public void writeToParcel(Parcel dest, int flags) {
30 | BParcelablePlease.writeToParcel(this, dest, flags);
31 | }
32 |
33 | public static final Creator CREATOR = new Creator() {
34 | public B createFromParcel(Parcel source) {
35 | B target = new B();
36 | BParcelablePlease.readFromParcel(target, source);
37 | return target;
38 | }
39 |
40 | public B[] newArray(int size) {
41 | return new B[size];
42 | }
43 | };
44 | }
45 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/MailApplication.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail;
2 |
3 | import android.app.Application;
4 | import android.content.Context;
5 | import com.hannesdorfmann.mosby.sample.mail.dagger.DaggerMailAppComponent;
6 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailAppComponent;
7 | import com.squareup.leakcanary.LeakCanary;
8 | import com.squareup.leakcanary.RefWatcher;
9 |
10 | /**
11 | * @author Hannes Dorfmann
12 | */
13 | public class MailApplication extends Application {
14 |
15 | private RefWatcher refWatcher;
16 |
17 | private static MailAppComponent mailComponent;
18 |
19 | @Override public void onCreate() {
20 | super.onCreate();
21 | mailComponent = DaggerMailAppComponent.create();
22 | refWatcher = LeakCanary.install(this);
23 | }
24 |
25 | public static RefWatcher getRefWatcher(Context context) {
26 | MailApplication application = (MailApplication) context.getApplicationContext();
27 | return application.refWatcher;
28 | }
29 |
30 | public static MailAppComponent getMailComponents() {
31 | return mailComponent;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/mail/receiver/MailReceiver.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.mail.model.mail.receiver;
2 |
3 | import android.content.BroadcastReceiver;
4 | import android.content.Context;
5 | import android.content.Intent;
6 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Mail;
7 | import com.hannesdorfmann.mosby.sample.mail.model.mail.service.GcmFakeIntentService;
8 |
9 | /**
10 | * @author Hannes Dorfmann
11 | */
12 | public class MailReceiver extends BroadcastReceiver {
13 |
14 | public static final String ACTION_RECEIVE = "com.hannesdorfmann.mosby.sample.mail.RECEIVE";
15 | public static final String EXTRA_MAIL = "com.hannesdorfmann.mosby.sample.mail.MAIL_DATA";
16 |
17 | @Override public void onReceive(Context context, Intent intent) {
18 | if (intent.getAction().equals(ACTION_RECEIVE)) {
19 | Mail mail = intent.getParcelableExtra(EXTRA_MAIL);
20 |
21 | Intent gcmIntent = new Intent(context, GcmFakeIntentService.class);
22 | gcmIntent.putExtra(GcmFakeIntentService.KEY_MAIL, mail);
23 | context.startService(gcmIntent);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sample-flow/src/main/java/com/hannesdorfmann/mosby/sample/flow/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.flow
2 |
3 | import android.content.Context
4 | import android.os.Bundle
5 | import android.support.v7.app.AppCompatActivity
6 | import com.hannesdorfmann.mosby.sample.flow.countries.CountriesScreen
7 | import com.hannesdorfmann.mosby.sample.flow.flow.AtlasAppDispatcher
8 | import com.hannesdorfmann.mosby.sample.flow.flow.AtlasAppKeyParceler
9 | import flow.Flow
10 |
11 | class MainActivity : AppCompatActivity() {
12 |
13 | override fun attachBaseContext(baseContext: Context) {
14 | val newBase = Flow.configure(baseContext, this)
15 | .dispatcher(AtlasAppDispatcher(this))
16 | .defaultKey(CountriesScreen())
17 | .keyParceler(AtlasAppKeyParceler())
18 | .install()
19 | super.attachBaseContext(newBase)
20 | }
21 |
22 | override fun onCreate(savedInstanceState: Bundle?) {
23 | super.onCreate(savedInstanceState)
24 | setContentView(R.layout.activity_main)
25 | }
26 |
27 | override fun onBackPressed() {
28 | if (!Flow.get(this).goBack()) {
29 | super.onBackPressed();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/ui/event/ShowMailsOfLabelEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.ui.event;
18 |
19 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Label;
20 |
21 | /**
22 | * @author Hannes Dorfmann
23 | */
24 | public class ShowMailsOfLabelEvent {
25 |
26 | private Label label;
27 |
28 | public ShowMailsOfLabelEvent(Label label) {
29 | this.label = label;
30 | }
31 |
32 | public Label getLabel() {
33 | return label;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/hannesdorfmann/mosby/sample/mvp/customviewstate/MyCustomView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mvp.customviewstate;
18 |
19 | import com.hannesdorfmann.mosby.mvp.MvpView;
20 | import com.hannesdorfmann.mosby.sample.mvp.model.custom.A;
21 | import com.hannesdorfmann.mosby.sample.mvp.model.custom.B;
22 |
23 | /**
24 | * @author Hannes Dorfmann
25 | */
26 | public interface MyCustomView extends MvpView {
27 |
28 |
29 | public void showA(A a);
30 |
31 | public void showB(B b);
32 | }
33 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/java/com/hannesdorfmann/mosby/sample/dagger2/repos/ReposPresenter.java:
--------------------------------------------------------------------------------
1 | package com.hannesdorfmann.mosby.sample.dagger2.repos;
2 |
3 | import com.hannesdorfmann.mosby.sample.dagger2.model.GithubApi;
4 | import com.hannesdorfmann.mosby.sample.dagger2.model.Repo;
5 | import java.util.Collections;
6 | import java.util.List;
7 | import javax.inject.Inject;
8 | import rx.Observable;
9 | import rx.functions.Func1;
10 |
11 | /**
12 | * @author Hannes Dorfmann
13 | */
14 | public class ReposPresenter extends MvpLceRxPresenter> {
15 |
16 | GithubApi githubapi;
17 |
18 | @Inject public ReposPresenter(GithubApi githubapi) {
19 | this.githubapi = githubapi;
20 | }
21 |
22 | public void loadRepos(boolean pullToRefresh) {
23 |
24 | Observable> observable =
25 | githubapi.getRepos().flatMap(new Func1, Observable>>() {
26 | @Override public Observable> call(List repos) {
27 | Collections.shuffle(repos);
28 | return Observable.just(repos);
29 | }
30 | });
31 |
32 | subscribe(observable, pullToRefresh);
33 | }
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/viewstate/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply from: '../maven-push.gradle'
3 | apply from: '../findbugs.gradle'
4 | apply plugin: 'com.getkeepsafe.dexcount'
5 |
6 | android {
7 | compileSdkVersion rootProject.ext.compileSdkVersion
8 | buildToolsVersion rootProject.ext.buildToolsVersion
9 |
10 | compileOptions {
11 | sourceCompatibility rootProject.ext.javaSourceCompatibility
12 | targetCompatibility rootProject.ext.javaTargetCompatibility
13 | }
14 |
15 | defaultConfig {
16 | minSdkVersion rootProject.ext.minSdk
17 | targetSdkVersion rootProject.ext.targetSdk
18 | versionName project.VERSION_NAME
19 | versionCode Integer.parseInt(project.VERSION_CODE)
20 | }
21 | buildTypes {
22 | release {
23 | minifyEnabled false
24 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
25 | }
26 | }
27 | }
28 |
29 | dependencies {
30 | compile project(':mvp')
31 |
32 | testCompile 'junit:junit:' + rootProject.ext.junitVersion
33 | testCompile 'org.mockito:mockito-core:' + rootProject.ext.mockitoVersion
34 | testCompile 'org.robolectric:robolectric:'+ rootProject.ext.robolectricVersion
35 | }
36 |
--------------------------------------------------------------------------------
/sample-dagger2-rx/src/main/java/com/hannesdorfmann/mosby/sample/dagger2/model/User.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.dagger2.model;
18 |
19 | /**
20 | * Represents a github user
21 | *
22 | * @author Hannes Dorfmann
23 | */
24 | public class User {
25 |
26 | long id;
27 | String login;
28 | String avatar_url;
29 |
30 | public long getId() {
31 | return id;
32 | }
33 |
34 | public String getLogin() {
35 | return login;
36 | }
37 |
38 | public String getAvatarUrl() {
39 | return avatar_url;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/sample-dagger1/src/main/java/com/hannesdorfmann/mosby/sample/dagger1/model/GithubApi.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.dagger1.model;
18 |
19 | import java.util.List;
20 | import retrofit.Callback;
21 | import retrofit.http.GET;
22 | import retrofit.http.Headers;
23 | import retrofit.http.Path;
24 |
25 | /**
26 | * @author Hannes Dorfmann
27 | */
28 | public interface GithubApi {
29 |
30 | @GET("/orgs/{orgname}/members")
31 | @Headers("Cache-Control: no-cache")
32 | public void getMembers(@Path("orgname") String organistaionName, Callback> callback);
33 | }
34 |
--------------------------------------------------------------------------------
/sample/src/main/java/com/hannesdorfmann/mosby/sample/mvp/CountriesView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mvp;
18 |
19 | import com.hannesdorfmann.mosby.mvp.lce.MvpLceView;
20 | import com.hannesdorfmann.mosby.sample.mvp.model.Country;
21 | import java.util.List;
22 |
23 | /**
24 | * The View interface. It's not really needed to do it this way (defining a own interface).
25 | * We could also use Mvp MvpLceView>
26 | * directly instead.
27 | *
28 | * @author Hannes Dorfmann
29 | */
30 | public interface CountriesView extends MvpLceView> {
31 | }
32 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/base/view/viewstate/AuthViewState.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.base.view.viewstate;
18 |
19 | import com.hannesdorfmann.mosby.mvp.viewstate.lce.LceViewState;
20 | import com.hannesdorfmann.mosby.sample.mail.base.view.AuthView;
21 |
22 | /**
23 | * @author Hannes Dorfmann
24 | */
25 | public interface AuthViewState> extends LceViewState {
26 |
27 | public static final int SHOWING_AUTHENTICATION_REQUIRED = 2;
28 |
29 | public void setShowingAuthenticationRequired();
30 | }
31 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/drawable/menu_unread_count.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
28 |
29 |
35 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout/view_label_layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
15 |
16 |
30 |
31 |
--------------------------------------------------------------------------------
/viewstate/src/main/java/com/hannesdorfmann/mosby/mvp/viewstate/RestorableParcelableViewState.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.mvp.viewstate;
18 |
19 | import android.os.Parcelable;
20 | import com.hannesdorfmann.mosby.mvp.MvpView;
21 |
22 | /**
23 | * A {@link RestorableViewState} that is implements {@link Parcelable} interface so that it can be
24 | * put directly in a bundle (as parcelable)
25 | *
26 | * @author Hannes Dorfmann
27 | * @since 1.0.0
28 | */
29 | public interface RestorableParcelableViewState
30 | extends RestorableViewState, Parcelable {
31 | }
32 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/login/LoginComponent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.login;
18 |
19 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailAppComponent;
20 | import com.hannesdorfmann.mosby.sample.mail.dagger.MailModule;
21 | import dagger.Component;
22 | import javax.inject.Singleton;
23 |
24 | /**
25 | * @author Hannes Dorfmann
26 | */
27 | @Singleton
28 | @Component(modules = MailModule.class,
29 | dependencies = MailAppComponent.class)
30 | public interface LoginComponent {
31 |
32 | public LoginPresenter presenter();
33 | }
34 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/menu/MenuView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.menu;
18 |
19 | import com.hannesdorfmann.mosby.sample.mail.base.view.AuthView;
20 | import com.hannesdorfmann.mosby.sample.mail.model.account.Account;
21 | import com.hannesdorfmann.mosby.sample.mail.model.mail.Label;
22 | import java.util.List;
23 |
24 | /**
25 | * @author Hannes Dorfmann
26 | */
27 | public interface MenuView extends AuthView> {
28 |
29 | public void setAccount(Account account);
30 |
31 | public void decrementUnreadCount(String label);
32 | }
33 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/event/LoginSuccessfulEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.model.event;
18 |
19 | import com.hannesdorfmann.mosby.sample.mail.model.account.Account;
20 |
21 | /**
22 | * Fired to inform that the login was successful
23 | *
24 | * @author Hannes Dorfmann
25 | */
26 | public class LoginSuccessfulEvent {
27 |
28 | private Account account;
29 |
30 | public LoginSuccessfulEvent(Account account) {
31 | this.account = account;
32 | }
33 |
34 | public Account getAccount() {
35 | return account;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/sample-mail/src/main/java/com/hannesdorfmann/mosby/sample/mail/model/account/AuthCredentials.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.mail.model.account;
18 |
19 | /**
20 | * @author Hannes Dorfmann
21 | */
22 | public class AuthCredentials {
23 |
24 | String username;
25 | String password;
26 |
27 | public AuthCredentials(String username, String password) {
28 | this.username = username;
29 | this.password = password;
30 | }
31 |
32 | public String getUsername() {
33 | return username;
34 | }
35 |
36 |
37 | public String getPassword() {
38 | return password;
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/sample-dagger1/src/main/java/com/hannesdorfmann/mosby/sample/dagger1/SampleApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2015 Hannes Dorfmann.
3 | *
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
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hannesdorfmann.mosby.sample.dagger1;
18 |
19 | import android.app.Application;
20 | import dagger.ObjectGraph;
21 |
22 | /**
23 | * @author Hannes Dorfmann
24 | */
25 | public class SampleApplication extends Application implements Injector {
26 |
27 | ObjectGraph objectGraph;
28 |
29 | @Override public void onCreate() {
30 | super.onCreate();
31 | objectGraph = ObjectGraph.create(new SampleModule(this));
32 | }
33 |
34 | @Override public ObjectGraph getObjectGraph() {
35 | return objectGraph;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/sample-mail/src/main/res/layout/view_loading.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
21 |
22 |
30 |
31 |
--------------------------------------------------------------------------------