├── .gitignore
├── LICENSE.md
├── README.md
├── app
├── .gitignore
├── build.gradle
├── google-services.json
├── libs
│ └── YouTubeAndroidPlayerApi.jar
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── bj
│ │ └── vinylbrowser
│ │ ├── artist
│ │ └── ArtistControllerMockPresenterTest.kt
│ │ ├── artistreleases
│ │ └── ArtistReleasesControllerMockNetworkTest.kt
│ │ ├── home
│ │ └── HomeControllerTest.kt
│ │ ├── label
│ │ └── LabelControllerMockPresenterTest.kt
│ │ ├── login
│ │ └── LoginActivityMockPresenterTest.kt
│ │ ├── marketplace
│ │ └── MarketplaceControllerMockPresenterTest.kt
│ │ ├── master
│ │ └── MasterControllerMockPresenterTest.kt
│ │ ├── order
│ │ └── OrderControllerMockPresenterTest.kt
│ │ ├── release
│ │ └── ReleaseControllerMockPresenterTest.kt
│ │ ├── search
│ │ ├── SearchControllerTest.kt
│ │ └── SearchResultFactory.java
│ │ ├── singlelist
│ │ └── SingleListControllerMockPresenterTest.kt
│ │ ├── suite
│ │ └── EspressoSuite.java
│ │ ├── testutils
│ │ ├── EspressoDaggerMockRule.java
│ │ ├── RecyclerViewSizeAssertion.java
│ │ └── TestUtils.java
│ │ └── utils
│ │ └── GreendaoTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ ├── bj
│ │ │ └── vinylbrowser
│ │ │ │ ├── App.java
│ │ │ │ ├── AppComponent.java
│ │ │ │ ├── AppModule.java
│ │ │ │ ├── about
│ │ │ │ ├── AboutActivity.java
│ │ │ │ └── LicenseActivity.java
│ │ │ │ ├── artist
│ │ │ │ ├── ArtistComponent.java
│ │ │ │ ├── ArtistContract.java
│ │ │ │ ├── ArtistController.kt
│ │ │ │ ├── ArtistEpxController.java
│ │ │ │ ├── ArtistModule.java
│ │ │ │ └── ArtistPresenter.java
│ │ │ │ ├── artistreleases
│ │ │ │ ├── ArtistReleaseBehaviorRelay.java
│ │ │ │ ├── ArtistReleasesComponent.java
│ │ │ │ ├── ArtistReleasesContract.java
│ │ │ │ ├── ArtistReleasesController.kt
│ │ │ │ ├── ArtistReleasesEpxController.java
│ │ │ │ ├── ArtistReleasesModule.java
│ │ │ │ ├── ArtistReleasesPresenter.java
│ │ │ │ └── child
│ │ │ │ │ ├── ArtistReleasesChildComponent.java
│ │ │ │ │ ├── ArtistReleasesChildContract.java
│ │ │ │ │ ├── ArtistReleasesChildController.kt
│ │ │ │ │ ├── ArtistReleasesChildModule.java
│ │ │ │ │ ├── ArtistReleasesChildPresenter.java
│ │ │ │ │ └── MyRouterPagerAdapter.kt
│ │ │ │ ├── common
│ │ │ │ ├── BaseActivity.java
│ │ │ │ ├── BaseController.kt
│ │ │ │ ├── BaseFragment.java
│ │ │ │ ├── BasePresenter.java
│ │ │ │ ├── BaseSingleListController.java
│ │ │ │ ├── BaseView.java
│ │ │ │ ├── DetailedView.java
│ │ │ │ ├── RecyclerViewPresenter.java
│ │ │ │ └── SingleListView.java
│ │ │ │ ├── customviews
│ │ │ │ ├── Carousel.java
│ │ │ │ └── MyRecyclerView.java
│ │ │ │ ├── di
│ │ │ │ └── scopes
│ │ │ │ │ ├── ActivityScope.java
│ │ │ │ │ ├── ChildFragmentScope.java
│ │ │ │ │ └── FragmentScope.java
│ │ │ │ ├── epoxy
│ │ │ │ ├── artist
│ │ │ │ │ ├── MemberModel.java
│ │ │ │ │ ├── UrlModel.java
│ │ │ │ │ └── ViewReleasesModel.java
│ │ │ │ ├── common
│ │ │ │ │ ├── BaseEpxController.java
│ │ │ │ │ ├── CardListItemModel.java
│ │ │ │ │ ├── CarouselModel.java
│ │ │ │ │ ├── CenterTextModel.java
│ │ │ │ │ ├── DividerModel.java
│ │ │ │ │ ├── EmptySpaceModel.java
│ │ │ │ │ ├── HeaderModel.java
│ │ │ │ │ ├── ListItemModel.java
│ │ │ │ │ ├── LoadingModel.java
│ │ │ │ │ ├── PaddedCenterTextModel.java
│ │ │ │ │ ├── RetryModel.java
│ │ │ │ │ ├── SmallEmptySpaceModel.java
│ │ │ │ │ ├── SubDividerModel.java
│ │ │ │ │ ├── SubHeaderModel.java
│ │ │ │ │ └── WholeLineModel.java
│ │ │ │ ├── main
│ │ │ │ │ ├── InfoTextModel.java
│ │ │ │ │ ├── ListingModel.java
│ │ │ │ │ ├── MainTitleModel.java
│ │ │ │ │ ├── MainUserModel.java
│ │ │ │ │ ├── NoOrderModel.java
│ │ │ │ │ ├── OrderModel.java
│ │ │ │ │ ├── ViewMoreModel.java
│ │ │ │ │ ├── ViewedReleaseModel.java
│ │ │ │ │ └── YouTubeListModel.java
│ │ │ │ ├── marketplace
│ │ │ │ │ ├── MarketplaceModelCenter.java
│ │ │ │ │ └── MarketplaceModelTop.java
│ │ │ │ ├── order
│ │ │ │ │ ├── BuyerModel.java
│ │ │ │ │ ├── OrderMessageModel.java
│ │ │ │ │ ├── OrderReleaseModel.java
│ │ │ │ │ └── TotalModel.java
│ │ │ │ ├── release
│ │ │ │ │ ├── CollectionWantlistModel.java
│ │ │ │ │ ├── CollectionWantlistPresenter.java
│ │ │ │ │ ├── MarketplaceListingsHeader.java
│ │ │ │ │ ├── MarketplaceModel.java
│ │ │ │ │ ├── TrackModel.java
│ │ │ │ │ └── YouTubeModel.java
│ │ │ │ └── search
│ │ │ │ │ ├── PastSearchModel.java
│ │ │ │ │ └── SearchResultModel.java
│ │ │ │ ├── greendao
│ │ │ │ ├── DaoManager.java
│ │ │ │ ├── DaoModule.java
│ │ │ │ ├── SearchTerm.java
│ │ │ │ └── ViewedRelease.java
│ │ │ │ ├── home
│ │ │ │ ├── HomeComponent.java
│ │ │ │ ├── HomeContract.java
│ │ │ │ ├── HomeController.kt
│ │ │ │ ├── HomeEpxController.java
│ │ │ │ ├── HomeModule.java
│ │ │ │ └── HomePresenter.kt
│ │ │ │ ├── label
│ │ │ │ ├── LabelComponent.java
│ │ │ │ ├── LabelContract.java
│ │ │ │ ├── LabelController.kt
│ │ │ │ ├── LabelEpxController.java
│ │ │ │ ├── LabelModule.java
│ │ │ │ └── LabelPresenter.java
│ │ │ │ ├── login
│ │ │ │ ├── LoginActivity.java
│ │ │ │ ├── LoginComponent.java
│ │ │ │ ├── LoginContract.java
│ │ │ │ ├── LoginModule.java
│ │ │ │ └── LoginPresenter.java
│ │ │ │ ├── main
│ │ │ │ ├── MainActivity.java
│ │ │ │ ├── MainComponent.kt
│ │ │ │ ├── MainContract.kt
│ │ │ │ ├── MainModule.java
│ │ │ │ ├── MainPresenter.java
│ │ │ │ ├── RouterAttacher.java
│ │ │ │ └── panel
│ │ │ │ │ ├── YouTubeListComponent.java
│ │ │ │ │ ├── YouTubeListFragment.java
│ │ │ │ │ ├── YouTubeListModule.java
│ │ │ │ │ ├── YouTubePlayerEpxController.java
│ │ │ │ │ ├── YouTubePlayerHolder.kt
│ │ │ │ │ └── YouTubePlayerPresenter.kt
│ │ │ │ ├── marketplace
│ │ │ │ ├── MarketplaceComponent.java
│ │ │ │ ├── MarketplaceContract.java
│ │ │ │ ├── MarketplaceController.kt
│ │ │ │ ├── MarketplaceEpxController.java
│ │ │ │ ├── MarketplaceModule.java
│ │ │ │ └── MarketplacePresenter.java
│ │ │ │ ├── master
│ │ │ │ ├── MasterComponent.java
│ │ │ │ ├── MasterContract.java
│ │ │ │ ├── MasterController.kt
│ │ │ │ ├── MasterEpxController.java
│ │ │ │ ├── MasterModule.java
│ │ │ │ └── MasterPresenter.java
│ │ │ │ ├── model
│ │ │ │ ├── artist
│ │ │ │ │ ├── ArtistResult.kt
│ │ │ │ │ ├── ArtistWantedUrl.kt
│ │ │ │ │ └── Member.kt
│ │ │ │ ├── artistrelease
│ │ │ │ │ ├── ArtistRelease.kt
│ │ │ │ │ └── RootArtistReleaseResponse.kt
│ │ │ │ ├── collection
│ │ │ │ │ ├── AddToCollectionResponse.kt
│ │ │ │ │ ├── CollectionRelease.kt
│ │ │ │ │ ├── Format.kt
│ │ │ │ │ ├── Note.kt
│ │ │ │ │ └── RootCollectionRelease.kt
│ │ │ │ ├── common
│ │ │ │ │ ├── Artist.kt
│ │ │ │ │ ├── BasicInformation.kt
│ │ │ │ │ ├── Label.kt
│ │ │ │ │ ├── Pagination.kt
│ │ │ │ │ ├── Price.kt
│ │ │ │ │ ├── RecyclerViewModel.kt
│ │ │ │ │ ├── Seller.kt
│ │ │ │ │ └── Urls.kt
│ │ │ │ ├── label
│ │ │ │ │ ├── ParentLabel.kt
│ │ │ │ │ └── SubLabel.kt
│ │ │ │ ├── labelrelease
│ │ │ │ │ ├── LabelRelease.kt
│ │ │ │ │ └── RootLabelResponse.kt
│ │ │ │ ├── listing
│ │ │ │ │ ├── Listing.kt
│ │ │ │ │ ├── ListingRelease.kt
│ │ │ │ │ ├── RootListingResponse.kt
│ │ │ │ │ ├── ScrapeListing.kt
│ │ │ │ │ └── ShippingPrice.kt
│ │ │ │ ├── master
│ │ │ │ │ ├── Master.kt
│ │ │ │ │ ├── Tracklist.kt
│ │ │ │ │ └── Video.kt
│ │ │ │ ├── order
│ │ │ │ │ ├── Actor.kt
│ │ │ │ │ ├── Buyer.kt
│ │ │ │ │ ├── Fee.kt
│ │ │ │ │ ├── From.kt
│ │ │ │ │ ├── Item.kt
│ │ │ │ │ ├── Message.kt
│ │ │ │ │ ├── Order.kt
│ │ │ │ │ ├── Refund.kt
│ │ │ │ │ ├── RootOrderMessagesResponse.kt
│ │ │ │ │ ├── RootOrderResponse.kt
│ │ │ │ │ ├── Shipping.kt
│ │ │ │ │ └── Total.kt
│ │ │ │ ├── release
│ │ │ │ │ ├── Community.kt
│ │ │ │ │ ├── Company.kt
│ │ │ │ │ ├── Contributor.kt
│ │ │ │ │ ├── Extraartist.kt
│ │ │ │ │ ├── Format.kt
│ │ │ │ │ ├── Identifier.kt
│ │ │ │ │ ├── Image.kt
│ │ │ │ │ ├── Rating.kt
│ │ │ │ │ ├── Release.kt
│ │ │ │ │ ├── Submitter.kt
│ │ │ │ │ ├── Track.kt
│ │ │ │ │ └── Video.kt
│ │ │ │ ├── search
│ │ │ │ │ ├── Community.kt
│ │ │ │ │ ├── RootReleaseResponse.kt
│ │ │ │ │ ├── RootSearchResponse.kt
│ │ │ │ │ └── SearchResult.kt
│ │ │ │ ├── user
│ │ │ │ │ ├── User.kt
│ │ │ │ │ └── UserDetails.kt
│ │ │ │ ├── version
│ │ │ │ │ ├── MasterVersion.kt
│ │ │ │ │ └── RootVersionsResponse.kt
│ │ │ │ └── wantlist
│ │ │ │ │ ├── AddToWantlistResponse.kt
│ │ │ │ │ ├── Format.kt
│ │ │ │ │ ├── RootWantlistResponse.kt
│ │ │ │ │ └── Want.kt
│ │ │ │ ├── network
│ │ │ │ ├── CacheProviders.java
│ │ │ │ ├── DiscogsInteractor.java
│ │ │ │ ├── DiscogsOAuthApi.java
│ │ │ │ └── DiscogsService.java
│ │ │ │ ├── order
│ │ │ │ ├── OrderComponent.java
│ │ │ │ ├── OrderContract.java
│ │ │ │ ├── OrderController.kt
│ │ │ │ ├── OrderEpxController.java
│ │ │ │ ├── OrderModule.java
│ │ │ │ └── OrderPresenter.java
│ │ │ │ ├── release
│ │ │ │ ├── ReleaseComponent.java
│ │ │ │ ├── ReleaseContract.java
│ │ │ │ ├── ReleaseController.kt
│ │ │ │ ├── ReleaseEpxController.java
│ │ │ │ ├── ReleaseModule.java
│ │ │ │ └── ReleasePresenter.java
│ │ │ │ ├── search
│ │ │ │ ├── SearchComponent.java
│ │ │ │ ├── SearchContract.java
│ │ │ │ ├── SearchController.kt
│ │ │ │ ├── SearchEpxController.java
│ │ │ │ ├── SearchModule.java
│ │ │ │ └── SearchPresenter.java
│ │ │ │ ├── singlelist
│ │ │ │ ├── SingleListComponent.java
│ │ │ │ ├── SingleListContract.java
│ │ │ │ ├── SingleListController.kt
│ │ │ │ ├── SingleListEpxController.java
│ │ │ │ ├── SingleListModule.java
│ │ │ │ └── SingleListPresenter.java
│ │ │ │ ├── utils
│ │ │ │ ├── ArtistsBeautifier.java
│ │ │ │ ├── DateFormatter.java
│ │ │ │ ├── DiscogsScraper.java
│ │ │ │ ├── FilterHelper.java
│ │ │ │ ├── ImageViewAnimator.java
│ │ │ │ ├── NavigationDrawerBuilder.java
│ │ │ │ ├── SharedPrefsManager.java
│ │ │ │ ├── UtilsModule.java
│ │ │ │ ├── analytics
│ │ │ │ │ ├── AnalyticsModule.java
│ │ │ │ │ └── AnalyticsTracker.java
│ │ │ │ ├── rxmodifiers
│ │ │ │ │ ├── ArtistReleasesTransformer.java
│ │ │ │ │ ├── ArtistResultFunction.java
│ │ │ │ │ └── RemoveUnwantedLinksFunction.java
│ │ │ │ └── schedulerprovider
│ │ │ │ │ ├── MySchedulerProvider.java
│ │ │ │ │ └── SchedulerProvider.java
│ │ │ │ └── wrappers
│ │ │ │ ├── DateUtilsWrapper.java
│ │ │ │ ├── LogWrapper.java
│ │ │ │ ├── NumberFormatWrapper.java
│ │ │ │ ├── RxSocialConnectWrapper.java
│ │ │ │ ├── SimpleDateFormatWrapper.java
│ │ │ │ ├── ToastyWrapper.java
│ │ │ │ └── WrappersModule.java
│ │ ├── br
│ │ │ └── com
│ │ │ │ └── simplepass
│ │ │ │ └── loading_button_lib
│ │ │ │ ├── Utils.kt
│ │ │ │ ├── UtilsJava.java
│ │ │ │ ├── animatedDrawables
│ │ │ │ ├── BallsAnimatedDrawable.kt
│ │ │ │ ├── CircularAnimatedDrawable.java
│ │ │ │ └── CircularRevealAnimatedDrawable.java
│ │ │ │ ├── customViews
│ │ │ │ └── CircularProgressButton.java
│ │ │ │ └── interfaces
│ │ │ │ ├── AnimatedButton.java
│ │ │ │ └── OnAnimationEndListener.java
│ │ └── com
│ │ │ └── github
│ │ │ └── pedrovgs
│ │ │ ├── DraggableListener.java
│ │ │ ├── DraggablePanel.java
│ │ │ ├── DraggableView.java
│ │ │ ├── DraggableViewCallback.java
│ │ │ └── transformer
│ │ │ ├── ResizeTransformer.java
│ │ │ ├── ScaleTransformer.java
│ │ │ ├── Transformer.java
│ │ │ └── TransformerFactory.java
│ └── res
│ │ ├── drawable-hdpi
│ │ ├── ic_app.png
│ │ ├── ic_app_loading.png
│ │ ├── ic_attach_money_black_24dp.png
│ │ ├── ic_chevron_right_black_24dp.png
│ │ ├── ic_delete_black_36dp.png
│ │ ├── ic_exit_to_app_black_24dp.png
│ │ ├── ic_info_outline_black_24dp.png
│ │ ├── ic_library_music_black_24dp.png
│ │ ├── ic_not_interested_black_24dp.png
│ │ ├── ic_pause_black_36dp.png
│ │ ├── ic_play_arrow_black_36dp.png
│ │ ├── ic_refresh_black_24dp.png
│ │ ├── ic_remove_red_eye_black_24dp.png
│ │ ├── ic_search_black_24dp.png
│ │ ├── ic_search_white_24dp.png
│ │ ├── ic_settings_black_24dp.png
│ │ ├── ic_shopping_cart_black_24dp.png
│ │ └── ic_youtube_searched_for_black_24dp.png
│ │ ├── drawable-mdpi
│ │ ├── ic_app.png
│ │ ├── ic_app_loading.png
│ │ ├── ic_attach_money_black_24dp.png
│ │ ├── ic_chevron_right_black_24dp.png
│ │ ├── ic_delete_black_36dp.png
│ │ ├── ic_exit_to_app_black_24dp.png
│ │ ├── ic_info_outline_black_24dp.png
│ │ ├── ic_library_music_black_24dp.png
│ │ ├── ic_not_interested_black_24dp.png
│ │ ├── ic_pause_black_36dp.png
│ │ ├── ic_play_arrow_black_36dp.png
│ │ ├── ic_refresh_black_24dp.png
│ │ ├── ic_remove_red_eye_black_24dp.png
│ │ ├── ic_search_black_24dp.png
│ │ ├── ic_search_white_24dp.png
│ │ ├── ic_settings_black_24dp.png
│ │ ├── ic_shopping_cart_black_24dp.png
│ │ └── ic_youtube_searched_for_black_24dp.png
│ │ ├── drawable-xhdpi
│ │ ├── ic_app.png
│ │ ├── ic_app_loading.png
│ │ ├── ic_attach_money_black_24dp.png
│ │ ├── ic_chevron_right_black_24dp.png
│ │ ├── ic_delete_black_36dp.png
│ │ ├── ic_exit_to_app_black_24dp.png
│ │ ├── ic_info_outline_black_24dp.png
│ │ ├── ic_library_music_black_24dp.png
│ │ ├── ic_not_interested_black_24dp.png
│ │ ├── ic_pause_black_36dp.png
│ │ ├── ic_play_arrow_black_36dp.png
│ │ ├── ic_refresh_black_24dp.png
│ │ ├── ic_remove_red_eye_black_24dp.png
│ │ ├── ic_search_black_24dp.png
│ │ ├── ic_search_white_24dp.png
│ │ ├── ic_settings_black_24dp.png
│ │ ├── ic_shopping_cart_black_24dp.png
│ │ └── ic_youtube_searched_for_black_24dp.png
│ │ ├── drawable-xxhdpi
│ │ ├── ic_app.png
│ │ ├── ic_app_loading.png
│ │ ├── ic_attach_money_black_24dp.png
│ │ ├── ic_chevron_right_black_24dp.png
│ │ ├── ic_delete_black_36dp.png
│ │ ├── ic_exit_to_app_black_24dp.png
│ │ ├── ic_info_outline_black_24dp.png
│ │ ├── ic_library_music_black_24dp.png
│ │ ├── ic_not_interested_black_24dp.png
│ │ ├── ic_pause_black_36dp.png
│ │ ├── ic_play_arrow_black_36dp.png
│ │ ├── ic_refresh_black_24dp.png
│ │ ├── ic_remove_red_eye_black_24dp.png
│ │ ├── ic_search_black_24dp.png
│ │ ├── ic_search_white_24dp.png
│ │ ├── ic_settings_black_24dp.png
│ │ ├── ic_shopping_cart_black_24dp.png
│ │ └── ic_youtube_searched_for_black_24dp.png
│ │ ├── drawable-xxxhdpi
│ │ ├── ic_app.png
│ │ ├── ic_app_loading.png
│ │ ├── ic_attach_money_black_24dp.png
│ │ ├── ic_chevron_right_black_24dp.png
│ │ ├── ic_delete_black_36dp.png
│ │ ├── ic_exit_to_app_black_24dp.png
│ │ ├── ic_info_outline_black_24dp.png
│ │ ├── ic_library_music_black_24dp.png
│ │ ├── ic_not_interested_black_24dp.png
│ │ ├── ic_pause_black_36dp.png
│ │ ├── ic_play_arrow_black_36dp.png
│ │ ├── ic_refresh_black_24dp.png
│ │ ├── ic_remove_red_eye_black_24dp.png
│ │ ├── ic_search_black_24dp.png
│ │ ├── ic_search_white_24dp.png
│ │ ├── ic_settings_black_24dp.png
│ │ ├── ic_shopping_cart_black_24dp.png
│ │ └── ic_youtube_searched_for_black_24dp.png
│ │ ├── drawable
│ │ ├── background_toolbar_translucent.xml
│ │ ├── button_collection.xml
│ │ ├── button_wantlist.xml
│ │ ├── gradient.xml
│ │ ├── ic_vinyl.xml
│ │ └── shape_default.xml
│ │ ├── layout
│ │ ├── activity_login.xml
│ │ ├── activity_main.xml
│ │ ├── activity_test.xml
│ │ ├── controller_artist_releases.xml
│ │ ├── controller_artist_releases_child.xml
│ │ ├── controller_home.xml
│ │ ├── controller_marketplace_listing.xml
│ │ ├── controller_order.xml
│ │ ├── controller_recyclerview.xml
│ │ ├── controller_search.xml
│ │ ├── controller_single_list.xml
│ │ ├── divider.xml
│ │ ├── divider_marketplace.xml
│ │ ├── draggable_panel.xml
│ │ ├── fragment_youtube.xml
│ │ ├── item_artist_link.xml
│ │ ├── item_discogs_result.xml
│ │ ├── item_listing.xml
│ │ ├── item_member.xml
│ │ ├── model_card_list_item.xml
│ │ ├── model_carousel.xml
│ │ ├── model_carousel_item.xml
│ │ ├── model_center_text.xml
│ │ ├── model_collection_wantlist.xml
│ │ ├── model_detailed_header.xml
│ │ ├── model_detailed_release.xml
│ │ ├── model_empty_space.xml
│ │ ├── model_empty_space_half.xml
│ │ ├── model_error.xml
│ │ ├── model_info_text.xml
│ │ ├── model_label.xml
│ │ ├── model_label_release.xml
│ │ ├── model_listing.xml
│ │ ├── model_loading.xml
│ │ ├── model_main_title.xml
│ │ ├── model_main_user.xml
│ │ ├── model_marketplace_center.xml
│ │ ├── model_marketplace_top.xml
│ │ ├── model_no_listings.xml
│ │ ├── model_no_orders.xml
│ │ ├── model_order.xml
│ │ ├── model_order_buyer.xml
│ │ ├── model_order_item.xml
│ │ ├── model_order_message.xml
│ │ ├── model_order_total.xml
│ │ ├── model_past_search.xml
│ │ ├── model_release_marketplace_header.xml
│ │ ├── model_subheader.xml
│ │ ├── model_track.xml
│ │ ├── model_version.xml
│ │ ├── model_view_more.xml
│ │ ├── model_view_on_discogs.xml
│ │ ├── model_view_releases.xml
│ │ ├── model_youtube.xml
│ │ └── model_youtube_list.xml
│ │ ├── menu
│ │ ├── menu_main.xml
│ │ └── options_menu.xml
│ │ ├── 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
│ │ ├── values-sw320dp
│ │ └── dimens.xml
│ │ ├── values-sw360dp
│ │ └── dimens.xml
│ │ ├── values-v21
│ │ └── styles.xml
│ │ ├── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ │ └── xml
│ │ └── searchable.xml
│ ├── test
│ ├── java
│ │ └── bj
│ │ │ └── vinylbrowser
│ │ │ ├── artist
│ │ │ ├── ArtistEpxControllerTest.kt
│ │ │ └── ArtistPresenterTest.kt
│ │ │ ├── artistreleases
│ │ │ ├── ArtistReleasesChildPresenterTest.kt
│ │ │ ├── ArtistReleasesEpxControllerTest.kt
│ │ │ └── ArtistReleasesPresenterTest.kt
│ │ │ ├── home
│ │ │ ├── HomeEpxControllerTest.kt
│ │ │ └── HomePresenterTest.kt
│ │ │ ├── label
│ │ │ ├── LabelEpxControllerTest.kt
│ │ │ └── LabelPresenterTest.kt
│ │ │ ├── login
│ │ │ ├── LoginPresenterTest.kt
│ │ │ └── OAuthTokenFactory.kt
│ │ │ ├── main
│ │ │ └── YouTubePlayerEpxControllerTest.kt
│ │ │ ├── marketplace
│ │ │ ├── MarketplaceEpxControllerTest.kt
│ │ │ └── MarketplacePresenterTest.kt
│ │ │ ├── master
│ │ │ ├── MasterControllerTest.kt
│ │ │ └── MasterPresenterTest.kt
│ │ │ ├── order
│ │ │ ├── OrderEpxControllerTest.kt
│ │ │ └── OrderPresenterTest.kt
│ │ │ ├── release
│ │ │ ├── CollectionWantlistPresenterTest.kt
│ │ │ ├── ReleaseControllerTest.kt
│ │ │ └── ReleasePresenterTest.kt
│ │ │ ├── search
│ │ │ ├── SearchEpxControllerTest.kt
│ │ │ └── SearchPresenterTest.kt
│ │ │ ├── singlelist
│ │ │ ├── SingleListEpxControllerTest.kt
│ │ │ └── SingleListPresenterTest.kt
│ │ │ └── utils
│ │ │ ├── DateFormatterTest.kt
│ │ │ └── schedulerprovider
│ │ │ └── TestSchedulerProvider.kt
│ └── resources
│ │ └── mockito-extensions
│ │ └── org.mockito.plugins.MockMaker
│ └── testShared
│ └── bj
│ └── vinylbrowser
│ ├── artist
│ └── ArtistFactory.kt
│ ├── artistreleases
│ ├── ArtistReleasesFactory.kt
│ ├── ArtistResultFactory.kt
│ ├── ImageFactory.kt
│ └── MemberFactory.kt
│ ├── home
│ └── ViewedReleaseFactory.kt
│ ├── label
│ └── LabelFactory.kt
│ ├── listing
│ └── ListingFactory.kt
│ ├── master
│ ├── MasterFactory.kt
│ └── MasterVersionsFactory.kt
│ ├── order
│ └── OrderFactory.kt
│ ├── release
│ ├── ReleaseFactory.kt
│ ├── ResponseFactory.kt
│ └── ScrapeListFactory.kt
│ ├── search
│ ├── RootSearchResponseFactory.kt
│ └── SearchFactory.kt
│ ├── singlelist
│ ├── CollectionFactory.kt
│ └── WantFactory.kt
│ └── userdetails
│ └── UserDetailsFactory.kt
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── images
├── featuregraphic.png
└── youtube.gif
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | /.gradle
3 | /local.properties
4 | /.idea
5 | .DS_Store
6 | /build
7 | /captures
8 | .externalNativeBuild
9 | /projectFilesBackup
10 | /app/app-release.apk
11 | /app/release
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Josh Laird
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "409269652199",
4 | "project_id": "vinylbrowser-166009"
5 | },
6 | "client": [
7 | {
8 | "client_info": {
9 | "mobilesdk_app_id": "1:409269652199:android:dadfee33f8cc067b",
10 | "android_client_info": {
11 | "package_name": "bj.vinylbrowser"
12 | }
13 | },
14 | "oauth_client": [],
15 | "api_key": [
16 | {
17 | "current_key": "AIzaSyCL_bKMqFmbuJon7J_1OsvGbPnfSSp92vc"
18 | }
19 | ],
20 | "services": {
21 | "analytics_service": {
22 | "status": 2,
23 | "analytics_property": {
24 | "tracking_id": "UA-98523832-1"
25 | }
26 | },
27 | "appinvite_service": {
28 | "status": 1,
29 | "other_platform_oauth_client": []
30 | },
31 | "ads_service": {
32 | "status": 1
33 | }
34 | }
35 | }
36 | ],
37 | "configuration_version": "1"
38 | }
--------------------------------------------------------------------------------
/app/libs/YouTubeAndroidPlayerApi.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jbmlaird/DiscogsBrowser/23facb4e1ab156508e934ebc1fcd1d57b3255aba/app/libs/YouTubeAndroidPlayerApi.jar
--------------------------------------------------------------------------------
/app/src/androidTest/java/bj/vinylbrowser/suite/EspressoSuite.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.suite;
2 |
3 | import org.junit.runner.RunWith;
4 | import org.junit.runners.Suite;
5 |
6 | import bj.vinylbrowser.artist.ArtistControllerMockPresenterTest;
7 | import bj.vinylbrowser.artistreleases.ArtistReleasesControllerMockNetworkTest;
8 | import bj.vinylbrowser.home.HomeControllerTest;
9 | import bj.vinylbrowser.label.LabelControllerMockPresenterTest;
10 | import bj.vinylbrowser.login.LoginActivityMockPresenterTest;
11 | import bj.vinylbrowser.master.MasterControllerMockPresenterTest;
12 | import bj.vinylbrowser.release.ReleaseControllerMockPresenterTest;
13 | import bj.vinylbrowser.search.SearchControllerTest;
14 | import bj.vinylbrowser.singlelist.SingleListControllerMockPresenterTest;
15 | import bj.vinylbrowser.utils.GreendaoTest;
16 |
17 | /**
18 | * Created by Josh Laird on 14/05/2017.
19 | *
20 | * Runs all espresso tests.
21 | */
22 | @RunWith(Suite.class)
23 | @Suite.SuiteClasses({ArtistControllerMockPresenterTest.class, ArtistReleasesControllerMockNetworkTest.class, HomeControllerTest.class, LabelControllerMockPresenterTest.class,
24 | LoginActivityMockPresenterTest.class, MasterControllerMockPresenterTest.class, ReleaseControllerMockPresenterTest.class,
25 | SearchControllerTest.class, SingleListControllerMockPresenterTest.class, GreendaoTest.class})
26 | //@Suite.SuiteClasses({ReleaseControllerMockPresenterTest.class})
27 | public class EspressoSuite {
28 | }
--------------------------------------------------------------------------------
/app/src/androidTest/java/bj/vinylbrowser/testutils/RecyclerViewSizeAssertion.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.testutils;
2 |
3 | import android.support.test.espresso.NoMatchingViewException;
4 | import android.support.test.espresso.ViewAssertion;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.View;
7 |
8 | import bj.vinylbrowser.customviews.MyRecyclerView;
9 |
10 | import static junit.framework.Assert.assertEquals;
11 |
12 | /**
13 | * Created by Josh Laird on 15/05/2017.
14 | *
15 | * From: http://stackoverflow.com/questions/36399787/how-to-count-recyclerview-items-with-espresso
16 | */
17 | public class RecyclerViewSizeAssertion implements ViewAssertion
18 | {
19 | private final int wantedSize;
20 |
21 | public RecyclerViewSizeAssertion(int wantedSize)
22 | {
23 | this.wantedSize = wantedSize;
24 | }
25 |
26 | @Override
27 | public void check(View view, NoMatchingViewException noViewFoundException)
28 | {
29 | if (noViewFoundException != null)
30 | throw noViewFoundException;
31 |
32 | RecyclerView.Adapter adapter = ((MyRecyclerView) view).getAdapter();
33 | assertEquals(adapter.getItemCount(), wantedSize);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/AppComponent.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser;
2 |
3 | import javax.inject.Singleton;
4 |
5 | import bj.vinylbrowser.greendao.DaoModule;
6 | import bj.vinylbrowser.login.LoginComponent;
7 | import bj.vinylbrowser.main.MainComponent;
8 | import bj.vinylbrowser.utils.UtilsModule;
9 | import bj.vinylbrowser.utils.analytics.AnalyticsModule;
10 | import bj.vinylbrowser.wrappers.WrappersModule;
11 | import dagger.Component;
12 |
13 | /**
14 | * Created by j on 18/02/2017.
15 | */
16 | @Singleton
17 | @Component(modules = {AppModule.class, WrappersModule.class, AnalyticsModule.class, UtilsModule.class, DaoModule.class})
18 | public interface AppComponent
19 | {
20 | void inject(App app);
21 |
22 | LoginComponent.Builder loginComponentBuilder();
23 |
24 | MainComponent.Builder mainComponentBuilder();
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/artist/ArtistComponent.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.artist;
2 |
3 | import bj.vinylbrowser.di.scopes.ActivityScope;
4 | import bj.vinylbrowser.di.scopes.FragmentScope;
5 | import dagger.Subcomponent;
6 |
7 | /**
8 | * Created by Josh Laird on 07/04/2017.
9 | */
10 | @FragmentScope
11 | @Subcomponent(modules = {ArtistModule.class})
12 | public interface ArtistComponent
13 | {
14 | void inject(ArtistController controller);
15 |
16 | @Subcomponent.Builder
17 | interface Builder
18 | {
19 | Builder artistModule(ArtistModule module);
20 |
21 | ArtistComponent build();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/artist/ArtistContract.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.artist;
2 |
3 | import bj.vinylbrowser.common.DetailedView;
4 | import bj.vinylbrowser.common.RecyclerViewPresenter;
5 |
6 | /**
7 | * Created by Josh Laird on 07/04/2017.
8 | */
9 |
10 | public interface ArtistContract
11 | {
12 | interface View extends DetailedView
13 | {
14 | void showMemberDetails(String name, String id);
15 |
16 | void showArtistReleases(String title, String id);
17 | }
18 |
19 | interface Presenter extends RecyclerViewPresenter
20 | {
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/artistreleases/ArtistReleaseBehaviorRelay.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.artistreleases;
2 |
3 | import com.jakewharton.rxrelay2.BehaviorRelay;
4 |
5 | import java.util.List;
6 |
7 | import bj.vinylbrowser.model.artistrelease.ArtistRelease;
8 |
9 | /**
10 | * Created by Josh Laird on 15/05/2017.
11 | *
12 | * Wrapper for BehaviorRelay for DI.
13 | */
14 |
15 | public class ArtistReleaseBehaviorRelay
16 | {
17 | private BehaviorRelay> artistReleaseBehaviorRelay;
18 |
19 | public ArtistReleaseBehaviorRelay()
20 | {
21 | artistReleaseBehaviorRelay = BehaviorRelay.create();
22 | }
23 |
24 | public BehaviorRelay> getArtistReleaseBehaviorRelay()
25 | {
26 | return artistReleaseBehaviorRelay;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/artistreleases/ArtistReleasesComponent.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.artistreleases;
2 |
3 | import bj.vinylbrowser.artistreleases.child.ArtistReleasesChildComponent;
4 | import bj.vinylbrowser.di.scopes.ActivityScope;
5 | import bj.vinylbrowser.di.scopes.FragmentScope;
6 | import dagger.Subcomponent;
7 |
8 | /**
9 | * Created by Josh Laird on 10/04/2017.
10 | */
11 | @FragmentScope
12 | @Subcomponent(modules = {ArtistReleasesModule.class})
13 | public interface ArtistReleasesComponent
14 | {
15 | void inject(ArtistReleasesController controller);
16 |
17 | ArtistReleasesChildComponent.Builder artistReleasesFragmentComponentBuilder();
18 |
19 | @Subcomponent.Builder
20 | interface Builder
21 | {
22 | Builder artistReleasesModule(ArtistReleasesModule artistReleasesModule);
23 |
24 | ArtistReleasesComponent build();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/artistreleases/ArtistReleasesContract.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.artistreleases;
2 |
3 | import bj.vinylbrowser.common.SingleListView;
4 | import io.reactivex.Observable;
5 |
6 | /**
7 | * Created by Josh Laird on 10/04/2017.
8 | */
9 |
10 | public interface ArtistReleasesContract
11 | {
12 | interface View extends SingleListView
13 | {
14 | Observable filterIntent();
15 | }
16 |
17 | interface Presenter
18 | {
19 | void fetchArtistReleases(String id);
20 |
21 | void setupFilter();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/artistreleases/ArtistReleasesEpxController.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.artistreleases;
2 |
3 | import android.content.Context;
4 |
5 | import java.util.List;
6 |
7 | import bj.vinylbrowser.common.BaseSingleListController;
8 | import bj.vinylbrowser.model.common.RecyclerViewModel;
9 | import bj.vinylbrowser.utils.ImageViewAnimator;
10 |
11 | /**
12 | * Created by Josh Laird on 08/05/2017.
13 | */
14 | public class ArtistReleasesEpxController extends BaseSingleListController
15 | {
16 | public ArtistReleasesEpxController(Context context, ArtistReleasesContract.View view, ImageViewAnimator imageViewAnimator)
17 | {
18 | this.context = context;
19 | this.view = view;
20 | this.imageViewAnimator = imageViewAnimator;
21 | }
22 | }
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/artistreleases/child/ArtistReleasesChildComponent.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.artistreleases.child;
2 |
3 | import bj.vinylbrowser.di.scopes.ChildFragmentScope;
4 | import dagger.Subcomponent;
5 |
6 | /**
7 | * Created by Josh Laird on 11/05/2017.
8 | */
9 | @ChildFragmentScope
10 | @Subcomponent(modules = {ArtistReleasesChildModule.class})
11 | public interface ArtistReleasesChildComponent
12 | {
13 | void inject(ArtistReleasesChildController controller);
14 |
15 | @Subcomponent.Builder
16 | interface Builder
17 | {
18 | Builder artistReleasesFragmentModule(ArtistReleasesChildModule module);
19 |
20 | ArtistReleasesChildComponent build();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/artistreleases/child/ArtistReleasesChildContract.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.artistreleases.child;
2 |
3 | import bj.vinylbrowser.common.BasePresenter;
4 |
5 | /**
6 | * Created by Josh Laird on 11/05/2017.
7 | */
8 | public interface ArtistReleasesChildContract
9 | {
10 | interface View
11 | {
12 | }
13 |
14 | interface Presenter extends BasePresenter
15 | {
16 | void connectToBehaviorRelay(String searchFilter);
17 |
18 | void bind(ArtistReleasesChildController childController);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/common/BaseController.kt:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.common
2 |
3 | import android.support.v7.app.AppCompatActivity
4 | import android.support.v7.widget.LinearLayoutManager
5 | import android.support.v7.widget.Toolbar
6 | import android.view.View
7 | import bj.vinylbrowser.customviews.MyRecyclerView
8 | import bj.vinylbrowser.main.MainComponent
9 | import com.airbnb.epoxy.EpoxyController
10 | import com.bluelinelabs.conductor.Controller
11 |
12 | /**
13 | * Created by Josh Laird on 29/05/2017.
14 | */
15 | abstract class BaseController : Controller() {
16 | override fun onAttach(view: View) {
17 | // setupComponent(App.appComponent)
18 | super.onAttach(view)
19 | }
20 |
21 | abstract fun setupComponent(mainComponent: MainComponent)
22 |
23 | protected fun setupRecyclerView(recyclerView: MyRecyclerView, controller: EpoxyController) {
24 | recyclerView.layoutManager = LinearLayoutManager(applicationContext)
25 | recyclerView.adapter = controller.adapter
26 | }
27 |
28 | protected fun setupToolbar(toolbar: Toolbar, title: String) {
29 | (activity as AppCompatActivity).setSupportActionBar(toolbar)
30 | (activity as AppCompatActivity).supportActionBar?.setDisplayHomeAsUpEnabled(true)
31 | (activity as AppCompatActivity).supportActionBar?.setHomeButtonEnabled(true)
32 | toolbar.title = title
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/common/BaseFragment.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.common;
2 |
3 | import android.os.Bundle;
4 | import android.support.annotation.Nullable;
5 | import android.support.v4.app.Fragment;
6 |
7 | import bj.vinylbrowser.App;
8 | import bj.vinylbrowser.AppComponent;
9 | import butterknife.Unbinder;
10 |
11 | /**
12 | * Created by Josh Laird on 27/04/2017.
13 | */
14 |
15 | public abstract class BaseFragment extends Fragment
16 | {
17 | protected Unbinder unbinder;
18 |
19 | @Override
20 | public void onCreate(@Nullable Bundle savedInstanceState)
21 | {
22 | super.onCreate(savedInstanceState);
23 | setupComponent(App.appComponent);
24 | }
25 |
26 | public abstract void setupComponent(AppComponent appComponent);
27 |
28 | @Override
29 | public void onDestroy()
30 | {
31 | super.onDestroy();
32 | unbinder.unbind();
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/common/BasePresenter.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.common;
2 |
3 | /**
4 | * Created by Josh Laird on 27/04/2017.
5 | */
6 |
7 | public interface BasePresenter
8 | {
9 | void unsubscribe();
10 |
11 | void dispose();
12 | }
13 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/common/BaseView.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.common;
2 |
3 | /**
4 | * Created by Josh Laird on 02/05/2017.
5 | */
6 |
7 | public interface BaseView
8 | {
9 | void retry();
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/common/DetailedView.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.common;
2 |
3 | /**
4 | * Created by Josh Laird on 23/04/2017.
5 | */
6 | public interface DetailedView
7 | {
8 | void openLink(String url);
9 |
10 | void retry();
11 | }
12 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/common/RecyclerViewPresenter.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.common;
2 |
3 | /**
4 | * Created by Josh Laird on 23/04/2017.
5 | */
6 | public interface RecyclerViewPresenter
7 | {
8 | void fetchReleaseDetails(String id);
9 | }
10 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/common/SingleListView.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.common;
2 |
3 | /**
4 | * Created by Josh Laird on 09/05/2017.
5 | */
6 |
7 | public interface SingleListView
8 | {
9 | void launchDetailedActivity(String type, String title, String id);
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/customviews/MyRecyclerView.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.customviews;
2 |
3 | import android.content.Context;
4 | import android.support.annotation.Nullable;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.util.AttributeSet;
7 |
8 | /**
9 | * Created by Josh Laird on 17/04/2017.
10 | *
11 | * A custom implementation of RecyclerView to avoid memory leaks:
12 | * https://github.com/airbnb/epoxy/wiki/Avoiding-Memory-Leaks
13 | */
14 | public class MyRecyclerView extends RecyclerView
15 | {
16 | public MyRecyclerView(Context context)
17 | {
18 | super(context);
19 | }
20 |
21 | public MyRecyclerView(Context context, @Nullable AttributeSet attrs)
22 | {
23 | super(context, attrs);
24 | }
25 |
26 | public MyRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle)
27 | {
28 | super(context, attrs, defStyle);
29 | }
30 |
31 | @Override
32 | protected void onDetachedFromWindow()
33 | {
34 | super.onDetachedFromWindow();
35 | setAdapter(null);
36 | // Or use swapAdapter(null, true) so that the existing views are recycled to the view pool
37 | }
38 | }
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/di/scopes/ActivityScope.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.di.scopes;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | import javax.inject.Scope;
7 |
8 | /**
9 | * Created by Josh Laird on 11/05/2017.
10 | */
11 | @Scope
12 | @Retention(RetentionPolicy.RUNTIME)
13 | public @interface ActivityScope
14 | {
15 | }
16 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/di/scopes/ChildFragmentScope.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.di.scopes;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | import javax.inject.Scope;
7 |
8 | /**
9 | * Created by Josh Laird on 13/05/2017.
10 | */
11 | @Scope
12 | @Retention(RetentionPolicy.RUNTIME)
13 | public @interface ChildFragmentScope
14 | {
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/di/scopes/FragmentScope.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.di.scopes;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.RetentionPolicy;
5 |
6 | import javax.inject.Scope;
7 |
8 | /**
9 | * Created by Josh Laird on 13/05/2017.
10 | */
11 | @Scope
12 | @Retention(RetentionPolicy.RUNTIME)
13 | public @interface FragmentScope
14 | {
15 | }
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/artist/MemberModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.artist;
2 |
3 | import android.view.View;
4 | import android.widget.LinearLayout;
5 | import android.widget.TextView;
6 |
7 | import com.airbnb.epoxy.EpoxyAttribute;
8 | import com.airbnb.epoxy.EpoxyModel;
9 | import com.airbnb.epoxy.EpoxyModelClass;
10 |
11 | import bj.vinylbrowser.R;
12 | import butterknife.BindView;
13 | import butterknife.ButterKnife;
14 |
15 | import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash;
16 |
17 | /**
18 | * Created by Josh Laird on 21/04/2017.
19 | */
20 | @EpoxyModelClass(layout = R.layout.item_member)
21 | public abstract class MemberModel extends EpoxyModel
22 | {
23 | @EpoxyAttribute(DoNotHash) View.OnClickListener onClick;
24 | @EpoxyAttribute String name;
25 | @BindView(R.id.lytMember) LinearLayout lytMember;
26 | @BindView(R.id.tvName) TextView tvName;
27 |
28 | @Override
29 | public void bind(LinearLayout view)
30 | {
31 | ButterKnife.bind(this, view);
32 | tvName.setText(name);
33 | lytMember.setOnClickListener(onClick);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/artist/UrlModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.artist;
2 |
3 | import android.graphics.Color;
4 | import android.view.View;
5 | import android.widget.LinearLayout;
6 | import android.widget.TextView;
7 |
8 | import com.airbnb.epoxy.EpoxyAttribute;
9 | import com.airbnb.epoxy.EpoxyModel;
10 | import com.airbnb.epoxy.EpoxyModelClass;
11 | import com.joanzapata.iconify.widget.IconTextView;
12 |
13 | import bj.vinylbrowser.R;
14 | import butterknife.BindView;
15 | import butterknife.ButterKnife;
16 |
17 | /**
18 | * Created by Josh Laird on 21/04/2017.
19 | */
20 | @EpoxyModelClass(layout = R.layout.item_artist_link)
21 | public abstract class UrlModel extends EpoxyModel
22 | {
23 | @BindView(R.id.lytLink) LinearLayout lytLink;
24 | @BindView(R.id.tvIcon) IconTextView tvIcon;
25 | @BindView(R.id.tvText) TextView tvText;
26 | @EpoxyAttribute View.OnClickListener onLinkClick;
27 | @EpoxyAttribute String friendlyText;
28 | @EpoxyAttribute String hexCode;
29 | @EpoxyAttribute String fontAwesomeCode;
30 |
31 | @Override
32 | public void bind(LinearLayout view)
33 | {
34 | ButterKnife.bind(this, view);
35 | tvIcon.setText(fontAwesomeCode);
36 | tvIcon.setTextColor(Color.parseColor(hexCode));
37 | tvText.setText(friendlyText);
38 | lytLink.setOnClickListener(onLinkClick);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/artist/ViewReleasesModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.artist;
2 |
3 | import android.view.View;
4 | import android.widget.LinearLayout;
5 |
6 | import com.airbnb.epoxy.EpoxyAttribute;
7 | import com.airbnb.epoxy.EpoxyModel;
8 | import com.airbnb.epoxy.EpoxyModelClass;
9 |
10 | import bj.vinylbrowser.R;
11 | import butterknife.BindView;
12 | import butterknife.ButterKnife;
13 |
14 | import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash;
15 |
16 | /**
17 | * Created by Josh Laird on 21/04/2017.
18 | */
19 | @EpoxyModelClass(layout = R.layout.model_view_releases)
20 | public abstract class ViewReleasesModel extends EpoxyModel
21 | {
22 | @BindView(R.id.lytReleases) LinearLayout lytReleases;
23 | @EpoxyAttribute(DoNotHash) View.OnClickListener onViewReleasesClicked;
24 |
25 | @Override
26 | public void bind(LinearLayout view)
27 | {
28 | ButterKnife.bind(this, view);
29 | lytReleases.setOnClickListener(onViewReleasesClicked);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/common/BaseEpxController.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.common;
2 |
3 | import com.airbnb.epoxy.AutoModel;
4 | import com.airbnb.epoxy.EpoxyController;
5 |
6 | /**
7 | * Created by Josh Laird on 25/04/2017.
8 | */
9 | public abstract class BaseEpxController extends EpoxyController
10 | {
11 | public String title = "";
12 | public String subtitle = "";
13 | public String imageUrl = "";
14 |
15 | @AutoModel protected HeaderModel_ header;
16 |
17 | public void setTitle(String title)
18 | {
19 | this.title = title;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/common/CenterTextModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.common;
2 |
3 | import android.widget.LinearLayout;
4 | import android.widget.TextView;
5 |
6 | import com.airbnb.epoxy.EpoxyAttribute;
7 | import com.airbnb.epoxy.EpoxyModel;
8 | import com.airbnb.epoxy.EpoxyModelClass;
9 |
10 | import bj.vinylbrowser.R;
11 | import butterknife.BindView;
12 | import butterknife.ButterKnife;
13 | import butterknife.Unbinder;
14 |
15 | /**
16 | * Created by Josh Laird on 27/04/2017.
17 | */
18 | @EpoxyModelClass(layout = R.layout.model_center_text)
19 | public abstract class CenterTextModel extends EpoxyModel
20 | {
21 | @BindView(R.id.tvMessage) TextView tvMessage;
22 | @EpoxyAttribute String text;
23 | private Unbinder unbinder;
24 |
25 | @Override
26 | public void unbind(LinearLayout view)
27 | {
28 | super.unbind(view);
29 | unbinder.unbind();
30 | }
31 |
32 | @Override
33 | public void bind(LinearLayout view)
34 | {
35 | unbinder = ButterKnife.bind(this, view);
36 | tvMessage.setText(text);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/common/DividerModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.common;
2 |
3 | import android.view.View;
4 |
5 | import com.airbnb.epoxy.EpoxyModel;
6 | import com.airbnb.epoxy.EpoxyModelClass;
7 |
8 | import bj.vinylbrowser.R;
9 |
10 | /**
11 | * Created by Josh Laird on 18/04/2017.
12 | */
13 | @EpoxyModelClass(layout = R.layout.divider)
14 | public abstract class DividerModel extends EpoxyModel
15 | {
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/common/EmptySpaceModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.common;
2 |
3 | import android.widget.LinearLayout;
4 |
5 | import com.airbnb.epoxy.EpoxyModel;
6 | import com.airbnb.epoxy.EpoxyModelClass;
7 |
8 | import bj.vinylbrowser.R;
9 |
10 | /**
11 | * Created by Josh Laird on 04/05/2017.
12 | */
13 | @EpoxyModelClass(layout = R.layout.model_empty_space)
14 | public abstract class EmptySpaceModel extends EpoxyModel
15 | {
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/common/LoadingModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.common;
2 |
3 | import android.widget.ImageView;
4 | import android.widget.LinearLayout;
5 |
6 | import com.airbnb.epoxy.EpoxyAttribute;
7 | import com.airbnb.epoxy.EpoxyModel;
8 | import com.airbnb.epoxy.EpoxyModelClass;
9 |
10 | import bj.vinylbrowser.R;
11 | import bj.vinylbrowser.utils.ImageViewAnimator;
12 | import butterknife.BindView;
13 | import butterknife.ButterKnife;
14 |
15 | /**
16 | * Created by Josh Laird on 17/04/2017.
17 | */
18 | @EpoxyModelClass(layout = R.layout.model_loading)
19 | public abstract class LoadingModel extends EpoxyModel
20 | {
21 | @BindView(R.id.ivLoading) ImageView ivLoading;
22 | @EpoxyAttribute ImageViewAnimator imageViewAnimator;
23 |
24 | @Override
25 | public void bind(LinearLayout view)
26 | {
27 | ButterKnife.bind(this, view);
28 | imageViewAnimator.rotateImage(ivLoading);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/common/PaddedCenterTextModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.common;
2 |
3 | import android.support.constraint.ConstraintLayout;
4 | import android.widget.TextView;
5 |
6 | import com.airbnb.epoxy.EpoxyAttribute;
7 | import com.airbnb.epoxy.EpoxyModel;
8 | import com.airbnb.epoxy.EpoxyModelClass;
9 |
10 | import bj.vinylbrowser.R;
11 | import butterknife.BindView;
12 | import butterknife.ButterKnife;
13 | import butterknife.Unbinder;
14 |
15 | /**
16 | * Created by Josh Laird on 24/04/2017.
17 | */
18 | @EpoxyModelClass(layout = R.layout.model_no_listings)
19 | public abstract class PaddedCenterTextModel extends EpoxyModel
20 | {
21 | private Unbinder unbinder;
22 | @EpoxyAttribute String text;
23 | @BindView(R.id.textView) TextView textView;
24 |
25 | @Override
26 | public void bind(ConstraintLayout view)
27 | {
28 | unbinder = ButterKnife.bind(this, view);
29 | textView.setText(text);
30 | }
31 |
32 | @Override
33 | public void unbind(ConstraintLayout view)
34 | {
35 | super.unbind(view);
36 | unbinder.unbind();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/common/RetryModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.common;
2 |
3 | import android.view.View;
4 | import android.widget.LinearLayout;
5 | import android.widget.TextView;
6 |
7 | import com.airbnb.epoxy.EpoxyAttribute;
8 | import com.airbnb.epoxy.EpoxyModel;
9 | import com.airbnb.epoxy.EpoxyModelClass;
10 |
11 | import bj.vinylbrowser.R;
12 | import butterknife.BindView;
13 | import butterknife.ButterKnife;
14 | import butterknife.Unbinder;
15 |
16 | import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash;
17 |
18 | /**
19 | * Created by Josh Laird on 27/04/2017.
20 | */
21 | @EpoxyModelClass(layout = R.layout.model_error)
22 | public abstract class RetryModel extends EpoxyModel
23 | {
24 | @EpoxyAttribute(DoNotHash) View.OnClickListener onClick;
25 | @EpoxyAttribute String errorString;
26 | @BindView(R.id.lytError) LinearLayout lytError;
27 | @BindView(R.id.tvError) TextView tvError;
28 | private Unbinder unbinder;
29 |
30 | @Override
31 | public void bind(LinearLayout view)
32 | {
33 | unbinder = ButterKnife.bind(this, view);
34 | tvError.setText(errorString);
35 | lytError.setOnClickListener(onClick);
36 | }
37 |
38 | @Override
39 | public void unbind(LinearLayout view)
40 | {
41 | super.unbind(view);
42 | unbinder.unbind();
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/common/SmallEmptySpaceModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.common;
2 |
3 | import android.widget.LinearLayout;
4 |
5 | import com.airbnb.epoxy.EpoxyModel;
6 | import com.airbnb.epoxy.EpoxyModelClass;
7 |
8 | import bj.vinylbrowser.R;
9 |
10 | /**
11 | * Created by Josh Laird on 08/05/2017.
12 | */
13 | @EpoxyModelClass(layout = R.layout.model_empty_space_half)
14 | public abstract class SmallEmptySpaceModel extends EpoxyModel
15 | {
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/common/SubDividerModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.common;
2 |
3 | import android.widget.LinearLayout;
4 |
5 | import com.airbnb.epoxy.EpoxyModel;
6 | import com.airbnb.epoxy.EpoxyModelClass;
7 |
8 | import bj.vinylbrowser.R;
9 |
10 | /**
11 | * Created by Josh Laird on 25/04/2017.
12 | */
13 | @EpoxyModelClass(layout = R.layout.divider_marketplace)
14 | public abstract class SubDividerModel extends EpoxyModel
15 | {
16 | @Override
17 | public void bind(LinearLayout view)
18 | {
19 | super.bind(view);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/common/SubHeaderModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.common;
2 |
3 | import android.widget.LinearLayout;
4 | import android.widget.TextView;
5 |
6 | import com.airbnb.epoxy.EpoxyAttribute;
7 | import com.airbnb.epoxy.EpoxyModel;
8 | import com.airbnb.epoxy.EpoxyModelClass;
9 |
10 | import bj.vinylbrowser.R;
11 | import butterknife.BindView;
12 | import butterknife.ButterKnife;
13 |
14 | /**
15 | * Created by Josh Laird on 21/04/2017.
16 | */
17 | @EpoxyModelClass(layout = R.layout.model_subheader)
18 | public abstract class SubHeaderModel extends EpoxyModel
19 | {
20 | @BindView(R.id.tvSubheader) TextView tvSubheader;
21 | @EpoxyAttribute String subheader;
22 |
23 | @Override
24 | public void bind(LinearLayout view)
25 | {
26 | ButterKnife.bind(this, view);
27 | tvSubheader.setText(subheader);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/common/WholeLineModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.common;
2 |
3 | import android.view.View;
4 | import android.widget.LinearLayout;
5 | import android.widget.TextView;
6 |
7 | import com.airbnb.epoxy.EpoxyAttribute;
8 | import com.airbnb.epoxy.EpoxyModel;
9 | import com.airbnb.epoxy.EpoxyModelClass;
10 |
11 | import bj.vinylbrowser.R;
12 | import butterknife.BindView;
13 | import butterknife.ButterKnife;
14 |
15 | import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash;
16 |
17 | /**
18 | * Created by Josh Laird on 23/04/2017.
19 | */
20 | @EpoxyModelClass(layout = R.layout.model_view_on_discogs)
21 | public abstract class WholeLineModel extends EpoxyModel
22 | {
23 | @EpoxyAttribute(DoNotHash) View.OnClickListener onClickListener;
24 | @EpoxyAttribute String text;
25 | @BindView(R.id.lytViewOnDiscogs) LinearLayout lytViewOnDiscogs;
26 | @BindView(R.id.tvText) TextView tvText;
27 |
28 | @Override
29 | public void bind(LinearLayout view)
30 | {
31 | ButterKnife.bind(this, view);
32 | tvText.setText(text);
33 | lytViewOnDiscogs.setOnClickListener(onClickListener);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/main/InfoTextModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.main;
2 |
3 | import android.view.View;
4 | import android.widget.LinearLayout;
5 | import android.widget.TextView;
6 |
7 | import com.airbnb.epoxy.EpoxyAttribute;
8 | import com.airbnb.epoxy.EpoxyModel;
9 | import com.airbnb.epoxy.EpoxyModelClass;
10 |
11 | import bj.vinylbrowser.R;
12 | import butterknife.BindView;
13 | import butterknife.ButterKnife;
14 | import butterknife.Unbinder;
15 |
16 | import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash;
17 |
18 | /**
19 | * Created by Josh Laird on 02/05/2017.
20 | */
21 | @EpoxyModelClass(layout = R.layout.model_info_text)
22 | public abstract class InfoTextModel extends EpoxyModel
23 | {
24 | @EpoxyAttribute(DoNotHash) View.OnClickListener onClickListener;
25 | @EpoxyAttribute String infoText;
26 | @BindView(R.id.lytVerifyEmail) LinearLayout lytVerifyEmail;
27 | @BindView(R.id.tvInfo) TextView tvInfo;
28 | private Unbinder unbinder;
29 |
30 | @Override
31 | public void unbind(LinearLayout view)
32 | {
33 | super.unbind(view);
34 | unbinder.unbind();
35 | }
36 |
37 | @Override
38 | public void bind(LinearLayout view)
39 | {
40 | unbinder = ButterKnife.bind(this, view);
41 | lytVerifyEmail.setOnClickListener(onClickListener);
42 | tvInfo.setText(infoText);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/main/MainTitleModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.main;
2 |
3 | import android.view.View;
4 | import android.widget.LinearLayout;
5 | import android.widget.TextView;
6 |
7 | import com.airbnb.epoxy.EpoxyAttribute;
8 | import com.airbnb.epoxy.EpoxyModel;
9 | import com.airbnb.epoxy.EpoxyModelClass;
10 |
11 | import bj.vinylbrowser.R;
12 | import butterknife.BindView;
13 | import butterknife.ButterKnife;
14 |
15 | import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash;
16 |
17 | /**
18 | * Created by Josh Laird on 17/04/2017.
19 | */
20 |
21 | @EpoxyModelClass(layout = R.layout.model_main_title)
22 | public abstract class MainTitleModel extends EpoxyModel
23 | {
24 | @EpoxyAttribute(DoNotHash) View.OnClickListener onClickListener;
25 | @EpoxyAttribute String title;
26 | @EpoxyAttribute String tvButtonText;
27 | @EpoxyAttribute Integer size;
28 | @BindView(R.id.tvSeeAll) TextView tvButton;
29 | @BindView(R.id.tvHeader) TextView tvHeader;
30 |
31 | @Override
32 | public void bind(LinearLayout view)
33 | {
34 | ButterKnife.bind(this, view);
35 | tvHeader.setText(title);
36 | if (tvButtonText != null)
37 | tvButton.setText(tvButtonText);
38 | if (size != null && size > 5)
39 | {
40 | tvButton.setVisibility(View.VISIBLE);
41 | tvButton.setOnClickListener(onClickListener);
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/main/MainUserModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.main;
2 |
3 | import android.content.Context;
4 | import android.widget.ImageView;
5 | import android.widget.LinearLayout;
6 | import android.widget.TextView;
7 |
8 | import com.airbnb.epoxy.EpoxyAttribute;
9 | import com.airbnb.epoxy.EpoxyModel;
10 | import com.airbnb.epoxy.EpoxyModelClass;
11 | import com.bumptech.glide.Glide;
12 |
13 | import bj.vinylbrowser.R;
14 | import butterknife.BindView;
15 | import butterknife.ButterKnife;
16 |
17 | /**
18 | * Created by Josh Laird on 20/04/2017.
19 | */
20 | @EpoxyModelClass(layout = R.layout.model_main_user)
21 | public abstract class MainUserModel extends EpoxyModel
22 | {
23 | @EpoxyAttribute String username;
24 | @EpoxyAttribute String avatarUrl;
25 | @BindView(R.id.tvUsername) TextView tvUsername;
26 | @BindView(R.id.ivProfilePic) ImageView ivProfilePic;
27 | private Context context;
28 |
29 | public MainUserModel(Context context)
30 | {
31 | this.context = context;
32 | }
33 |
34 | @Override
35 | public void bind(LinearLayout view)
36 | {
37 | ButterKnife.bind(this, view);
38 | tvUsername.setText(username);
39 | Glide.with(context)
40 | .load(avatarUrl)
41 | .into(ivProfilePic);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/main/NoOrderModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.main;
2 |
3 | import android.widget.LinearLayout;
4 | import android.widget.TextView;
5 |
6 | import com.airbnb.epoxy.EpoxyAttribute;
7 | import com.airbnb.epoxy.EpoxyModel;
8 | import com.airbnb.epoxy.EpoxyModelClass;
9 |
10 | import bj.vinylbrowser.R;
11 | import butterknife.BindView;
12 | import butterknife.ButterKnife;
13 |
14 | /**
15 | * Created by Josh Laird on 17/04/2017.
16 | */
17 | @EpoxyModelClass(layout = R.layout.model_no_orders)
18 | public abstract class NoOrderModel extends EpoxyModel
19 | {
20 | @BindView(R.id.textView) TextView textView;
21 | @EpoxyAttribute String text;
22 |
23 | @Override
24 | public void bind(LinearLayout view)
25 | {
26 | ButterKnife.bind(this, view);
27 | textView.setText(text);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/main/ViewMoreModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.main;
2 |
3 | import android.view.View;
4 | import android.widget.LinearLayout;
5 | import android.widget.TextView;
6 |
7 | import com.airbnb.epoxy.EpoxyAttribute;
8 | import com.airbnb.epoxy.EpoxyModel;
9 | import com.airbnb.epoxy.EpoxyModelClass;
10 |
11 | import bj.vinylbrowser.R;
12 | import butterknife.BindView;
13 | import butterknife.ButterKnife;
14 |
15 | import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash;
16 |
17 | /**
18 | * Created by Josh Laird on 18/04/2017.
19 | */
20 | @EpoxyModelClass(layout = R.layout.model_view_more)
21 | public abstract class ViewMoreModel extends EpoxyModel
22 | {
23 | @EpoxyAttribute String title;
24 | @EpoxyAttribute float textSize;
25 | @EpoxyAttribute(DoNotHash) View.OnClickListener onClickListener;
26 | @BindView(R.id.textView) TextView textView;
27 | @BindView(R.id.lytViewMore) LinearLayout lytViewMore;
28 |
29 | @Override
30 | public void bind(LinearLayout view)
31 | {
32 | ButterKnife.bind(this, view);
33 | textView.setTextSize(textSize);
34 | textView.setText(title);
35 | lytViewMore.setOnClickListener(onClickListener);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/order/OrderMessageModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.order;
2 |
3 | import android.widget.LinearLayout;
4 |
5 | import com.airbnb.epoxy.EpoxyModel;
6 | import com.airbnb.epoxy.EpoxyModelClass;
7 |
8 | import bj.vinylbrowser.R;
9 | import butterknife.ButterKnife;
10 | import butterknife.Unbinder;
11 |
12 | /**
13 | * Created by Josh Laird on 01/05/2017.
14 | */
15 | @EpoxyModelClass(layout = R.layout.model_order_message)
16 | public abstract class OrderMessageModel extends EpoxyModel
17 | {
18 | private Unbinder unbinder;
19 |
20 | @Override
21 | public void unbind(LinearLayout view)
22 | {
23 | super.unbind(view);
24 | unbinder.unbind();
25 | }
26 |
27 | @Override
28 | public void bind(LinearLayout view)
29 | {
30 | unbinder = ButterKnife.bind(this, view);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/order/OrderReleaseModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.order;
2 |
3 | import android.widget.LinearLayout;
4 | import android.widget.TextView;
5 |
6 | import com.airbnb.epoxy.EpoxyAttribute;
7 | import com.airbnb.epoxy.EpoxyModel;
8 | import com.airbnb.epoxy.EpoxyModelClass;
9 |
10 | import java.text.NumberFormat;
11 |
12 | import bj.vinylbrowser.R;
13 | import butterknife.BindView;
14 | import butterknife.ButterKnife;
15 |
16 | /**
17 | * Created by Josh Laird on 18/04/2017.
18 | */
19 | @EpoxyModelClass(layout = R.layout.model_order_item)
20 | public abstract class OrderReleaseModel extends EpoxyModel
21 | {
22 | @BindView(R.id.tvReleaseName) TextView tvReleaseName;
23 | @BindView(R.id.tvPrice) TextView tvPrice;
24 | @EpoxyAttribute String releaseName;
25 | @EpoxyAttribute Double price;
26 |
27 | @Override
28 | public void bind(LinearLayout view)
29 | {
30 | ButterKnife.bind(this, view);
31 | NumberFormat numberFormat = NumberFormat.getCurrencyInstance();
32 | tvPrice.setText(numberFormat.format(price));
33 | tvReleaseName.setText(releaseName);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/order/TotalModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.order;
2 |
3 | import android.widget.LinearLayout;
4 | import android.widget.TextView;
5 |
6 | import com.airbnb.epoxy.EpoxyAttribute;
7 | import com.airbnb.epoxy.EpoxyModel;
8 | import com.airbnb.epoxy.EpoxyModelClass;
9 |
10 | import java.text.NumberFormat;
11 |
12 | import bj.vinylbrowser.R;
13 | import butterknife.BindView;
14 | import butterknife.ButterKnife;
15 |
16 | /**
17 | * Created by Josh Laird on 18/04/2017.
18 | */
19 | @EpoxyModelClass(layout = R.layout.model_order_total)
20 | public abstract class TotalModel extends EpoxyModel
21 | {
22 | @BindView(R.id.tvTotal) TextView tvTotal;
23 | @EpoxyAttribute Double total;
24 |
25 | @Override
26 | public void bind(LinearLayout view)
27 | {
28 | ButterKnife.bind(this, view);
29 | NumberFormat numberFormat = NumberFormat.getCurrencyInstance();
30 | tvTotal.setText(numberFormat.format(total));
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/release/MarketplaceListingsHeader.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.release;
2 |
3 | import android.widget.LinearLayout;
4 | import android.widget.TextView;
5 |
6 | import com.airbnb.epoxy.EpoxyAttribute;
7 | import com.airbnb.epoxy.EpoxyModel;
8 | import com.airbnb.epoxy.EpoxyModelClass;
9 |
10 | import bj.vinylbrowser.R;
11 | import butterknife.BindView;
12 | import butterknife.ButterKnife;
13 |
14 | /**
15 | * Created by Josh Laird on 24/04/2017.
16 | */
17 | @EpoxyModelClass(layout = R.layout.model_release_marketplace_header)
18 | public abstract class MarketplaceListingsHeader extends EpoxyModel
19 | {
20 | @EpoxyAttribute String lowestPrice;
21 | @EpoxyAttribute String numForSale;
22 | @BindView(R.id.tvHeader) TextView tvHeader;
23 | @BindView(R.id.tvMarketplaceSummary) TextView tvMarketplaceSummary;
24 |
25 | @Override
26 | public void bind(LinearLayout view)
27 | {
28 | ButterKnife.bind(this, view);
29 | if (numForSale.equals("0"))
30 | {
31 | tvHeader.setText("Listings: ");
32 | tvMarketplaceSummary.setText("");
33 | }
34 | else
35 | tvMarketplaceSummary.setText(numForSale + " from " + lowestPrice);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/release/TrackModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.release;
2 |
3 | import android.widget.LinearLayout;
4 | import android.widget.TextView;
5 |
6 | import com.airbnb.epoxy.EpoxyAttribute;
7 | import com.airbnb.epoxy.EpoxyModel;
8 | import com.airbnb.epoxy.EpoxyModelClass;
9 |
10 | import bj.vinylbrowser.R;
11 | import butterknife.BindView;
12 | import butterknife.ButterKnife;
13 |
14 | /**
15 | * Created by Josh Laird on 24/04/2017.
16 | */
17 | @EpoxyModelClass(layout = R.layout.model_track)
18 | public abstract class TrackModel extends EpoxyModel
19 | {
20 | @EpoxyAttribute String trackNumber;
21 | @EpoxyAttribute String trackName;
22 | @BindView(R.id.tvTrackNumber) TextView tvTrackNumber;
23 | @BindView(R.id.tvTrack) TextView tvTrack;
24 |
25 | @Override
26 | public void bind(LinearLayout view)
27 | {
28 | ButterKnife.bind(this, view);
29 | tvTrackNumber.setText(trackNumber);
30 | tvTrack.setText(trackName);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/epoxy/search/PastSearchModel.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.epoxy.search;
2 |
3 | import android.support.v7.widget.CardView;
4 | import android.view.View;
5 | import android.widget.TextView;
6 |
7 | import com.airbnb.epoxy.EpoxyAttribute;
8 | import com.airbnb.epoxy.EpoxyModel;
9 | import com.airbnb.epoxy.EpoxyModelClass;
10 |
11 | import bj.vinylbrowser.R;
12 | import butterknife.BindView;
13 | import butterknife.ButterKnife;
14 |
15 | import static com.airbnb.epoxy.EpoxyAttribute.Option.DoNotHash;
16 |
17 | /**
18 | * Created by Josh Laird on 25/04/2017.
19 | */
20 | @EpoxyModelClass(layout = R.layout.model_past_search)
21 | public abstract class PastSearchModel extends EpoxyModel
22 | {
23 | @BindView(R.id.lytSearchTerm) CardView lytSearchTerm;
24 | @BindView(R.id.tvSearchTerm) TextView tvSearchTerm;
25 | @EpoxyAttribute(DoNotHash) View.OnClickListener onClickListener;
26 | @EpoxyAttribute String searchTerm;
27 |
28 | @Override
29 | public void bind(CardView view)
30 | {
31 | ButterKnife.bind(this, view);
32 | tvSearchTerm.setText(searchTerm);
33 | lytSearchTerm.setOnClickListener(onClickListener);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/greendao/DaoModule.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.greendao;
2 |
3 | import android.content.Context;
4 |
5 | import org.greenrobot.greendao.database.Database;
6 |
7 | import javax.inject.Singleton;
8 |
9 | import dagger.Module;
10 | import dagger.Provides;
11 |
12 | /**
13 | * Created by Josh Laird on 16/05/2017.
14 | */
15 | @Module
16 | public class DaoModule
17 | {
18 | @Provides
19 | @Singleton
20 | protected DaoSession providesDaoSession(Context applicationContext)
21 | {
22 | DaoMaster.DevOpenHelper helper = new DaoMaster.DevOpenHelper(applicationContext, "search-db");
23 | // Use when changing schema
24 | // helper.onUpgrade(helper.getWritableDatabase(), 7, 8);
25 | Database db = helper.getWritableDb();
26 | return new DaoMaster(db).newSession();
27 | }
28 |
29 | @Provides
30 | @Singleton
31 | protected DaoManager providesDaoInteractor(DaoSession daoSession)
32 | {
33 | return new DaoManager(daoSession);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/home/HomeComponent.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.home;
2 |
3 | import org.jetbrains.annotations.NotNull;
4 |
5 | import bj.vinylbrowser.di.scopes.FragmentScope;
6 | import dagger.Subcomponent;
7 |
8 | /**
9 | * Created by j on 18/02/2017.
10 | */
11 | @FragmentScope
12 | @Subcomponent(modules = {HomeModule.class})
13 | public interface HomeComponent
14 | {
15 | void inject(@NotNull HomeController homeController);
16 |
17 | @Subcomponent.Builder
18 | interface Builder
19 | {
20 | Builder mainActivityModule(HomeModule module);
21 |
22 | HomeComponent build();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/label/LabelComponent.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.label;
2 |
3 | import bj.vinylbrowser.di.scopes.FragmentScope;
4 | import dagger.Subcomponent;
5 |
6 | /**
7 | * Created by Josh Laird on 23/04/2017.
8 | */
9 | @FragmentScope
10 | @Subcomponent(modules = {LabelModule.class})
11 | public interface LabelComponent
12 | {
13 | void inject(LabelController labelController);
14 |
15 | @Subcomponent.Builder
16 | interface Builder
17 | {
18 | Builder labelActivityModule(LabelModule module);
19 |
20 | LabelComponent build();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/label/LabelContract.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.label;
2 |
3 | import bj.vinylbrowser.common.DetailedView;
4 | import bj.vinylbrowser.common.RecyclerViewPresenter;
5 |
6 | /**
7 | * Created by Josh Laird on 23/04/2017.
8 | */
9 |
10 | public interface LabelContract
11 | {
12 | interface View extends DetailedView
13 | {
14 | void displayRelease(String id, String title);
15 | }
16 |
17 | interface Presenter extends RecyclerViewPresenter
18 | {
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/login/LoginComponent.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.login;
2 |
3 | import bj.vinylbrowser.di.scopes.ActivityScope;
4 | import dagger.Subcomponent;
5 |
6 | /**
7 | * Created by Josh Laird on 15/04/2017.
8 | */
9 | @ActivityScope
10 | @Subcomponent(modules = {LoginModule.class})
11 | public interface LoginComponent
12 | {
13 | void inject(LoginActivity loginActivity);
14 |
15 | @Subcomponent.Builder
16 | interface Builder
17 | {
18 | Builder loginActivityModule(LoginModule module);
19 |
20 | LoginComponent build();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/login/LoginContract.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.login;
2 |
3 | /**
4 | * Created by Josh Laird on 15/04/2017.
5 | */
6 |
7 | public interface LoginContract
8 | {
9 | interface View
10 | {
11 | void finishActivityLaunchMain();
12 |
13 | void displayErrorDialog();
14 |
15 | LoginActivity getActivity();
16 | }
17 |
18 | interface Presenter
19 | {
20 | void beginLogin();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/login/LoginModule.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.login;
2 |
3 | import com.github.scribejava.core.oauth.OAuth10aService;
4 |
5 | import bj.vinylbrowser.di.scopes.ActivityScope;
6 | import bj.vinylbrowser.utils.SharedPrefsManager;
7 | import bj.vinylbrowser.wrappers.RxSocialConnectWrapper;
8 | import dagger.Module;
9 | import dagger.Provides;
10 |
11 | /**
12 | * Created by Josh Laird on 15/04/2017.
13 | */
14 | @Module
15 | public class LoginModule
16 | {
17 | private LoginContract.View view;
18 |
19 | public LoginModule(LoginContract.View view)
20 | {
21 | this.view = view;
22 | }
23 |
24 | @Provides
25 | @ActivityScope
26 | protected LoginContract.View provideView()
27 | {
28 | return view;
29 | }
30 |
31 | @Provides
32 | @ActivityScope
33 | protected LoginPresenter providePresenter(SharedPrefsManager sharedPrefsManager, RxSocialConnectWrapper wrapper, OAuth10aService service)
34 | {
35 | return new LoginPresenter(view, sharedPrefsManager, wrapper, service);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/main/MainContract.kt:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.main
2 |
3 | /**
4 | * Created by Josh Laird on 29/05/2017.
5 | */
6 | interface MainContract {
7 | interface View {
8 | fun initialiseDraggablePanel()
9 | fun displayDraggablePanel()
10 | fun minimiseDraggablePanel()
11 | }
12 |
13 | interface Presenter {
14 | fun minimiseDraggablePanel()
15 | }
16 | }
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/main/MainPresenter.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.main;
2 |
3 | import bj.vinylbrowser.main.panel.YouTubePlayerPresenter;
4 | import bj.vinylbrowser.model.release.Video;
5 |
6 | /**
7 | * Created by Josh Laird on 18/02/2017.
8 | */
9 | public class MainPresenter implements MainContract.Presenter
10 | {
11 | private final String TAG = getClass().getSimpleName();
12 | private MainContract.View view;
13 | private YouTubePlayerPresenter youTubePlayerPresenter;
14 |
15 | public MainPresenter(MainContract.View view)
16 | {
17 | this.view = view;
18 | }
19 |
20 | public void addVideo(Video video)
21 | {
22 | view.displayDraggablePanel();
23 | youTubePlayerPresenter.addVideo(video);
24 | }
25 |
26 | public void bindYouTubePresenter(YouTubePlayerPresenter presenter)
27 | {
28 | youTubePlayerPresenter = presenter;
29 | }
30 |
31 | public void minimiseDraggablePanel()
32 | {
33 | view.minimiseDraggablePanel();
34 | }
35 |
36 | public YouTubePlayerPresenter getYouTubePlayerPresenter()
37 | {
38 | return youTubePlayerPresenter;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/main/RouterAttacher.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.main;
2 |
3 | import com.bluelinelabs.conductor.Controller;
4 | import com.bluelinelabs.conductor.Router;
5 | import com.bluelinelabs.conductor.RouterTransaction;
6 |
7 | import bj.vinylbrowser.home.HomeController;
8 |
9 | /**
10 | * Created by Josh Laird on 01/06/2017.
11 | *
12 | * During tests I want to mock this so I don't always attach the HomeController.
13 | */
14 | public class RouterAttacher
15 | {
16 | public void attachRoot(Router router)
17 | {
18 | HomeController homeController = new HomeController();
19 | homeController.setRetainViewMode(Controller.RetainViewMode.RETAIN_DETACH);
20 | if (!router.hasRootController())
21 | {
22 | router.setRoot(RouterTransaction.with(homeController)
23 | .tag("HomeController"));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/main/panel/YouTubeListComponent.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.main.panel;
2 |
3 | import bj.vinylbrowser.di.scopes.ChildFragmentScope;
4 | import bj.vinylbrowser.di.scopes.FragmentScope;
5 | import dagger.Subcomponent;
6 |
7 | /**
8 | * Created by Josh Laird on 01/06/2017.
9 | */
10 | @ChildFragmentScope
11 | @Subcomponent(modules = {YouTubeListModule.class})
12 | public interface YouTubeListComponent
13 | {
14 | void inject(YouTubeListFragment fragment);
15 |
16 | @Subcomponent.Builder
17 | interface Builder
18 | {
19 | Builder youTubeListModule(YouTubeListModule module);
20 |
21 | YouTubeListComponent build();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/main/panel/YouTubeListModule.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.main.panel;
2 |
3 | import android.content.Context;
4 |
5 | import bj.vinylbrowser.di.scopes.ChildFragmentScope;
6 | import bj.vinylbrowser.main.MainPresenter;
7 | import dagger.Module;
8 | import dagger.Provides;
9 |
10 | /**
11 | * Created by Josh Laird on 01/06/2017.
12 | */
13 | @Module
14 | public class YouTubeListModule
15 | {
16 | private YouTubeListFragment mFragment;
17 |
18 | public YouTubeListModule(YouTubeListFragment fragment)
19 | {
20 | mFragment = fragment;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/marketplace/MarketplaceComponent.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.marketplace;
2 |
3 | import bj.vinylbrowser.di.scopes.FragmentScope;
4 | import dagger.Subcomponent;
5 |
6 | /**
7 | * Created by Josh Laird on 13/04/2017.
8 | */
9 | @FragmentScope
10 | @Subcomponent(modules = {MarketplaceModule.class})
11 | public interface MarketplaceComponent
12 | {
13 | void inject(MarketplaceController controller);
14 |
15 | @Subcomponent.Builder
16 | interface Builder
17 | {
18 | Builder marketplaceModule(MarketplaceModule module);
19 |
20 | MarketplaceComponent build();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/marketplace/MarketplaceContract.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.marketplace;
2 |
3 | import bj.vinylbrowser.common.BaseView;
4 |
5 | /**
6 | * Created by Josh Laird on 13/04/2017.
7 | */
8 |
9 | public interface MarketplaceContract
10 | {
11 | interface View extends BaseView
12 | {
13 | void viewOnDiscogs(String listingUri);
14 |
15 | void viewSellerShipping(String shippingDetails, String username);
16 | }
17 |
18 | interface Presenter
19 | {
20 | void getListingDetails(String listingId);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/master/MasterComponent.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.master;
2 |
3 | import bj.vinylbrowser.di.scopes.FragmentScope;
4 | import dagger.Subcomponent;
5 |
6 | /**
7 | * Created by Josh Laird on 23/04/2017.
8 | */
9 | @FragmentScope
10 | @Subcomponent(modules = {MasterModule.class})
11 | public interface MasterComponent
12 | {
13 | void inject(MasterController controller);
14 |
15 | @Subcomponent.Builder
16 | interface Builder
17 | {
18 | Builder masterActivityModule(MasterModule module);
19 |
20 | MasterComponent build();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/master/MasterContract.java:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.master;
2 |
3 | import bj.vinylbrowser.common.RecyclerViewPresenter;
4 |
5 | /**
6 | * Created by Josh Laird on 23/04/2017.
7 | */
8 | public interface MasterContract
9 | {
10 | interface View
11 | {
12 | void displayRelease(String title, String id);
13 |
14 | void retry();
15 | }
16 |
17 | interface Presenter extends RecyclerViewPresenter {}
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/model/artist/ArtistWantedUrl.kt:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.model.artist
2 |
3 | import android.os.Parcel
4 | import android.os.Parcelable
5 |
6 | /**
7 | * Created by Josh Laird on 19/05/2017.
8 | */
9 | data class ArtistWantedUrl(val url: String,
10 | val displayText: String,
11 | val hexCode: String,
12 | val fontAwesomeString: String) : Parcelable {
13 |
14 | override fun writeToParcel(dest: Parcel, flags: Int) {
15 | dest.writeString(url)
16 | dest.writeString(displayText)
17 | dest.writeString(hexCode)
18 | dest.writeString(fontAwesomeString)
19 | }
20 |
21 | override fun describeContents(): Int {
22 | return 0
23 | }
24 | }
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/model/artist/Member.kt:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.model.artist
2 |
3 | import android.os.Parcel
4 | import android.os.Parcelable
5 | import com.google.gson.annotations.SerializedName
6 |
7 | /**
8 | * Created by Josh Laird on 19/05/2017.
9 | */
10 | data class Member(var active: String = "",
11 | var id: String = "",
12 | var url: String = "",
13 | var name: String = "",
14 | @SerializedName("resource_url") var resourceUrl: String = "") : Parcelable {
15 |
16 | override fun writeToParcel(dest: Parcel, flags: Int) {
17 | dest.writeString(active)
18 | dest.writeString(id)
19 | dest.writeString(url)
20 | dest.writeString(name)
21 | dest.writeString(resourceUrl)
22 | }
23 |
24 | override fun describeContents(): Int {
25 | return 0
26 | }
27 | }
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/model/artistrelease/RootArtistReleaseResponse.kt:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.model.artistrelease
2 |
3 | import bj.vinylbrowser.model.common.Pagination
4 | import com.google.gson.annotations.SerializedName
5 |
6 | /**
7 | * Created by Josh Laird on 19/05/2017.
8 | */
9 | data class RootArtistReleaseResponse(val pagination: Pagination,
10 | @SerializedName("releases") val artistReleases: List)
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/model/collection/AddToCollectionResponse.kt:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.model.collection
2 |
3 | import com.google.gson.annotations.SerializedName
4 |
5 | /**
6 | * Created by Josh Laird on 19/05/2017.
7 | */
8 | data class AddToCollectionResponse(@SerializedName("instance_id") var instanceId: String = "",
9 | @SerializedName("resource_url") var resouceUrl: String = "")
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/model/collection/Format.kt:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.model.collection
2 |
3 | import android.os.Parcel
4 | import android.os.Parcelable
5 |
6 | /**
7 | * Created by Josh Laird on 19/05/2017.
8 | */
9 | data class Format(val qty: String,
10 | val descriptions: List,
11 | val name: String) : Parcelable {
12 |
13 | override fun writeToParcel(dest: Parcel, flags: Int) {
14 | dest.writeString(qty)
15 | dest.writeList(descriptions)
16 | dest.writeString(name)
17 | }
18 |
19 | override fun describeContents(): Int {
20 | return 0
21 | }
22 | }
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/model/collection/Note.kt:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.model.collection
2 |
3 | import android.os.Parcel
4 | import android.os.Parcelable
5 | import com.google.gson.annotations.SerializedName
6 |
7 | /**
8 | * Created by Josh Laird on 19/05/2017.
9 | */
10 | data class Note(@SerializedName("field_id") val fieldId: Int, val value: String) : Parcelable {
11 |
12 | override fun writeToParcel(dest: Parcel, flags: Int) {
13 | dest.writeInt(fieldId)
14 | dest.writeString(value)
15 | }
16 |
17 | override fun describeContents(): Int {
18 | return 0
19 | }
20 | }
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/model/collection/RootCollectionRelease.kt:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.model.collection
2 |
3 | import bj.vinylbrowser.model.common.Pagination
4 | import com.google.gson.annotations.SerializedName
5 |
6 | /**
7 | * Created by Josh Laird on 19/05/2017.
8 | */
9 | data class RootCollectionRelease(val pagination: Pagination,
10 | @SerializedName("releases") val collectionReleases: List)
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/model/common/Artist.kt:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.model.common
2 |
3 | import android.os.Parcel
4 | import android.os.Parcelable
5 | import com.google.gson.annotations.SerializedName
6 |
7 | /**
8 | * Created by Josh Laird on 19/05/2017.
9 | */
10 | data class Artist(var anv: String = "",
11 | var id: Int = 0,
12 | var join: String = "",
13 | var name: String = "",
14 | @SerializedName("resource_url") var resourceUrl: String = "",
15 | var role: String = "",
16 | var tracks: String = "") : Parcelable {
17 |
18 | override fun writeToParcel(dest: Parcel, flags: Int) {
19 | dest.writeString(anv)
20 | dest.writeInt(id)
21 | dest.writeString(join)
22 | dest.writeString(name)
23 | dest.writeString(resourceUrl)
24 | dest.writeString(role)
25 | dest.writeString(tracks)
26 | }
27 |
28 | override fun describeContents(): Int {
29 | return 0
30 | }
31 | }
--------------------------------------------------------------------------------
/app/src/main/java/bj/vinylbrowser/model/common/BasicInformation.kt:
--------------------------------------------------------------------------------
1 | package bj.vinylbrowser.model.common
2 |
3 | import android.os.Parcel
4 | import android.os.Parcelable
5 | import bj.vinylbrowser.model.collection.Format
6 | import com.google.gson.annotations.SerializedName
7 |
8 | /**
9 | * Created by Josh Laird on 19/05/2017.
10 | */
11 | data class BasicInformation(var formats: List = emptyList(),
12 | var thumb: String = "",
13 | var title: String = "",
14 | var labels: List