├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_sort_white_asc.png │ │ │ │ ├── ic_sort_white_desc.png │ │ │ │ ├── ic_crop_original_black.png │ │ │ │ └── ic_error_outline_black.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_sort_white_asc.png │ │ │ │ ├── ic_sort_white_desc.png │ │ │ │ ├── ic_crop_original_black.png │ │ │ │ └── ic_error_outline_black.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_sort_white_asc.png │ │ │ │ ├── ic_sort_white_desc.png │ │ │ │ ├── ic_crop_original_black.png │ │ │ │ └── ic_error_outline_black.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_sort_white_asc.png │ │ │ │ ├── ic_sort_white_desc.png │ │ │ │ ├── ic_crop_original_black.png │ │ │ │ └── ic_error_outline_black.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── ic_sort_white_asc.png │ │ │ │ ├── ic_sort_white_desc.png │ │ │ │ ├── ic_crop_original_black.png │ │ │ │ └── ic_error_outline_black.png │ │ │ ├── drawable │ │ │ │ ├── sort_toggle_state_drawable.xml │ │ │ │ └── selector_item_photo.xml │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── layout │ │ │ │ ├── view_progress.xml │ │ │ │ ├── view_retry.xml │ │ │ │ ├── activity_photo_details.xml │ │ │ │ ├── menu_item_sort.xml │ │ │ │ ├── view_photo_details.xml │ │ │ │ ├── list_item_photo.xml │ │ │ │ └── activity_photo_list.xml │ │ │ ├── menu │ │ │ │ └── photos_list.xml │ │ │ └── layout-land │ │ │ │ └── view_photo_details.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── photoviewer │ │ │ │ ├── presentation │ │ │ │ ├── di │ │ │ │ │ └── modules │ │ │ │ │ │ ├── IntegrationTestsStaticModule.java │ │ │ │ │ │ ├── DiActivityModule.java │ │ │ │ │ │ ├── AppModule.java │ │ │ │ │ │ ├── DataModule.java │ │ │ │ │ │ ├── UseCasesModule.java │ │ │ │ │ │ ├── RxModule.java │ │ │ │ │ │ └── ApiModule.java │ │ │ │ ├── model │ │ │ │ │ ├── PhotoModel.java │ │ │ │ │ └── PhotoStatisticsModel.java │ │ │ │ ├── view │ │ │ │ │ ├── PhotoDetailsView.java │ │ │ │ │ ├── activity │ │ │ │ │ │ ├── DiAppCompatActivity.java │ │ │ │ │ │ ├── PhotoDetailsActivity.java │ │ │ │ │ │ └── PhotosListActivity.java │ │ │ │ │ ├── LoadDataView.java │ │ │ │ │ ├── PhotoListView.java │ │ │ │ │ ├── utils │ │ │ │ │ │ └── ImageRoundedCornersTransformation.java │ │ │ │ │ └── adapter │ │ │ │ │ │ └── PhotoAdapter.java │ │ │ │ ├── PhotoViewerApplication.java │ │ │ │ ├── mapper │ │ │ │ │ ├── photo │ │ │ │ │ │ ├── PhotoModelToPhoto.java │ │ │ │ │ │ └── PhotoToPhotoModel.java │ │ │ │ │ └── photostatistics │ │ │ │ │ │ ├── PhotoStatisticsToPhotoStatisticsModel.java │ │ │ │ │ │ └── PhotoStatisticsModelToPhotoStatistics.java │ │ │ │ ├── navigation │ │ │ │ │ └── Navigator.java │ │ │ │ └── presenter │ │ │ │ │ ├── SimplePresenter.java │ │ │ │ │ ├── Presenter.java │ │ │ │ │ ├── PhotoDetailsPresenter.java │ │ │ │ │ └── PhotoListPresenter.java │ │ │ │ ├── domain │ │ │ │ ├── mapper │ │ │ │ │ ├── LayerDataTransformer.java │ │ │ │ │ ├── BaseLayerDataTransformer.java │ │ │ │ │ ├── photo │ │ │ │ │ │ └── PhotoEntityToPhoto.java │ │ │ │ │ └── photostatisctics │ │ │ │ │ │ └── PhotoStatisticsToPhotoStatisticsEntity.java │ │ │ │ ├── PhotoStatistics.java │ │ │ │ ├── Photo.java │ │ │ │ ├── usecases │ │ │ │ │ ├── SimpleSubscriber.java │ │ │ │ │ ├── GetPhotosList.java │ │ │ │ │ ├── UseCase.java │ │ │ │ │ ├── GetPhotoDetails.java │ │ │ │ │ ├── SearchByTitle.java │ │ │ │ │ ├── GetPhotoStatistics.java │ │ │ │ │ └── SavePhotoStatistics.java │ │ │ │ └── repository │ │ │ │ │ ├── PhotoStatisticsRepository.java │ │ │ │ │ └── PhotoRepository.java │ │ │ │ └── data │ │ │ │ ├── preferences │ │ │ │ └── orm │ │ │ │ │ ├── PreferenceFile.java │ │ │ │ │ ├── Preference.java │ │ │ │ │ └── PreferencesDao.java │ │ │ │ ├── network │ │ │ │ └── PhotoRestService.java │ │ │ │ ├── repository │ │ │ │ ├── datastore │ │ │ │ │ ├── ServerPhotoEntityStore.java │ │ │ │ │ ├── PreferencesPhotoStatisticsEntityStore.java │ │ │ │ │ └── DatabasePhotoEntityStore.java │ │ │ │ ├── PhotoStatisticsEntityDataSource.java │ │ │ │ └── PhotoEntityDataSource.java │ │ │ │ ├── entity │ │ │ │ ├── PhotoStatisticsEntity.java │ │ │ │ └── PhotoEntity.java │ │ │ │ └── db │ │ │ │ ├── migrations │ │ │ │ ├── CreatePhotosTable.java │ │ │ │ └── Migration.java │ │ │ │ ├── DatabaseHelper.java │ │ │ │ └── DatabaseManager.java │ │ └── AndroidManifest.xml │ ├── androidTest │ │ ├── java │ │ │ └── com │ │ │ │ └── photoviewer │ │ │ │ ├── di │ │ │ │ └── TestsModule.java │ │ │ │ ├── test │ │ │ │ └── CucumberTestCase.java │ │ │ │ ├── steps │ │ │ │ └── PhotosListSteps.java │ │ │ │ ├── cucumber │ │ │ │ └── CucumberTestRunner.java │ │ │ │ ├── pages │ │ │ │ └── PhotosListPage.java │ │ │ │ └── common │ │ │ │ └── steps │ │ │ │ └── PageObject.java │ │ └── assets │ │ │ └── features │ │ │ └── photosList.feature │ └── test │ │ └── java │ │ └── com │ │ └── photoviewer │ │ ├── domain │ │ └── usecases │ │ │ ├── GetPhotosListTest.kt │ │ │ ├── GetPhotoDetailsTest.kt │ │ │ └── SearchByTitleTest.kt │ │ └── data │ │ └── repository │ │ └── PhotoEntityDataSourceTest.kt ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── gradle.properties ├── README.md ├── gradlew.bat ├── gradlew └── LICENSE /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_sort_white_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-hdpi/ic_sort_white_asc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_sort_white_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-mdpi/ic_sort_white_asc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_sort_white_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-hdpi/ic_sort_white_desc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_sort_white_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-mdpi/ic_sort_white_desc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_sort_white_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xhdpi/ic_sort_white_asc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_sort_white_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xhdpi/ic_sort_white_desc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_sort_white_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xxhdpi/ic_sort_white_asc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_sort_white_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xxhdpi/ic_sort_white_desc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_sort_white_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xxxhdpi/ic_sort_white_asc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_crop_original_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-hdpi/ic_crop_original_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_error_outline_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-hdpi/ic_error_outline_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_crop_original_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-mdpi/ic_crop_original_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_error_outline_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-mdpi/ic_error_outline_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_sort_white_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xxxhdpi/ic_sort_white_desc.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_crop_original_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xhdpi/ic_crop_original_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_error_outline_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xhdpi/ic_error_outline_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_crop_original_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xxhdpi/ic_crop_original_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_error_outline_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xxhdpi/ic_error_outline_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_crop_original_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xxxhdpi/ic_crop_original_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_error_outline_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lifedemons/photoviewer/HEAD/app/src/main/res/drawable-xxxhdpi/ic_error_outline_black.png -------------------------------------------------------------------------------- /app/src/main/java/com/photoviewer/presentation/di/modules/IntegrationTestsStaticModule.java: -------------------------------------------------------------------------------- 1 | package com.photoviewer.presentation.di.modules; 2 | 3 | import dagger.Module; 4 | 5 | @Module(library = true, complete = false) public class IntegrationTestsStaticModule { 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/photoviewer/domain/mapper/LayerDataTransformer.java: -------------------------------------------------------------------------------- 1 | package com.photoviewer.domain.mapper; 2 | 3 | import java.util.Collection; 4 | 5 | public interface LayerDataTransformer { 6 | T transform(F from); 7 | Collection transform(Collection from); 8 | } 9 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun May 21 03:42:21 CEST 2017 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-3.3-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/sort_toggle_state_drawable.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 8 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/photoviewer/di/TestsModule.java: -------------------------------------------------------------------------------- 1 | package com.photoviewer.di; 2 | 3 | import com.photoviewer.common.steps.PageObject; 4 | import com.photoviewer.pages.PhotosListPage; 5 | import com.photoviewer.presentation.di.modules.AppModule; 6 | import dagger.Module; 7 | 8 | @Module(injects = { PageObject.class, PhotosListPage.class }, addsTo = AppModule.class) 9 | public class TestsModule { 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | #DE000000 8 | #8A000000 9 | #42000000 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/photoviewer/domain/PhotoStatistics.java: -------------------------------------------------------------------------------- 1 | package com.photoviewer.domain; 2 | 3 | import lombok.Getter; 4 | import lombok.Setter; 5 | import lombok.experimental.Accessors; 6 | 7 | @Accessors(prefix = "m") 8 | public class PhotoStatistics { 9 | 10 | @Setter 11 | @Getter 12 | private Photo mLastOpenedPhoto; 13 | 14 | @Setter 15 | @Getter 16 | private int mOpenedPhotosCount; 17 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/view_progress.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/view_retry.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 |