├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── logo.png │ │ │ │ ├── divider.xml │ │ │ │ └── branded_launch.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 │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_delete_white_24dp.png │ │ │ │ ├── ic_search_white_24dp.png │ │ │ │ ├── ic_title_black_24dp.png │ │ │ │ ├── ic_assignment_black_24dp.png │ │ │ │ ├── ic_date_range_black_24dp.png │ │ │ │ ├── ic_description_black_24dp.png │ │ │ │ ├── ic_delete_forever_white_24dp.png │ │ │ │ └── ic_assignment_turned_in_black_48dp.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_delete_white_24dp.png │ │ │ │ ├── ic_search_white_24dp.png │ │ │ │ ├── ic_title_black_24dp.png │ │ │ │ ├── ic_assignment_black_24dp.png │ │ │ │ ├── ic_date_range_black_24dp.png │ │ │ │ ├── ic_description_black_24dp.png │ │ │ │ ├── ic_delete_forever_white_24dp.png │ │ │ │ └── ic_assignment_turned_in_black_48dp.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_title_black_24dp.png │ │ │ │ ├── ic_delete_white_24dp.png │ │ │ │ ├── ic_search_white_24dp.png │ │ │ │ ├── ic_assignment_black_24dp.png │ │ │ │ ├── ic_date_range_black_24dp.png │ │ │ │ ├── ic_description_black_24dp.png │ │ │ │ ├── ic_delete_forever_white_24dp.png │ │ │ │ └── ic_assignment_turned_in_black_48dp.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_delete_white_24dp.png │ │ │ │ ├── ic_search_white_24dp.png │ │ │ │ ├── ic_title_black_24dp.png │ │ │ │ ├── ic_assignment_black_24dp.png │ │ │ │ ├── ic_date_range_black_24dp.png │ │ │ │ ├── ic_description_black_24dp.png │ │ │ │ ├── ic_delete_forever_white_24dp.png │ │ │ │ └── ic_assignment_turned_in_black_48dp.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── ic_add_white_24dp.png │ │ │ │ ├── ic_delete_white_24dp.png │ │ │ │ ├── ic_search_white_24dp.png │ │ │ │ ├── ic_title_black_24dp.png │ │ │ │ ├── ic_assignment_black_24dp.png │ │ │ │ ├── ic_date_range_black_24dp.png │ │ │ │ ├── ic_description_black_24dp.png │ │ │ │ ├── ic_delete_forever_white_24dp.png │ │ │ │ └── ic_assignment_turned_in_black_48dp.png │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── layout │ │ │ │ ├── datepicker_dialog.xml │ │ │ │ ├── content_add_task.xml │ │ │ │ ├── content_task_list.xml │ │ │ │ ├── activity_add_task.xml │ │ │ │ ├── activity_task_list.xml │ │ │ │ ├── fragment_task_list.xml │ │ │ │ ├── item.xml │ │ │ │ └── fragment_add_task.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── menu │ │ │ │ ├── task_menu.xml │ │ │ │ └── task_list_menu.xml │ │ │ ├── values-v21 │ │ │ │ └── styles.xml │ │ │ └── values-es │ │ │ │ └── strings.xml │ │ ├── java │ │ │ └── io │ │ │ │ └── blackbox_vision │ │ │ │ └── helpers │ │ │ │ ├── helper │ │ │ │ ├── AppConstants.java │ │ │ │ ├── DrawableUtils.java │ │ │ │ └── DateUtils.java │ │ │ │ ├── ui │ │ │ │ ├── activity │ │ │ │ │ ├── TaskListActivity.java │ │ │ │ │ └── AddTaskActivity.java │ │ │ │ ├── behavior │ │ │ │ │ └── RecyclerViewScrollBehavior.java │ │ │ │ ├── adapter │ │ │ │ │ └── TaskListAdapter.java │ │ │ │ └── fragment │ │ │ │ │ ├── TaskListFragment.java │ │ │ │ │ └── AddTaskFragment.java │ │ │ │ ├── logic │ │ │ │ ├── presenter_view │ │ │ │ │ ├── TaskListView.java │ │ │ │ │ └── AddTaskView.java │ │ │ │ ├── error │ │ │ │ │ └── TaskException.java │ │ │ │ ├── interactor │ │ │ │ │ ├── TaskListInteractor.java │ │ │ │ │ └── AddTaskInteractor.java │ │ │ │ └── presenter │ │ │ │ │ ├── TaskListPresenter.java │ │ │ │ │ └── AddTaskPresenter.java │ │ │ │ ├── App.java │ │ │ │ └── data │ │ │ │ └── Task.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── io │ │ │ └── blackbox_vision │ │ │ └── helpers │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── io │ │ └── blackbox_vision │ │ └── helpers │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── library ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ └── values │ │ │ │ └── strings.xml │ │ ├── java │ │ │ └── io │ │ │ │ └── blackbox_vision │ │ │ │ └── mvphelpers │ │ │ │ ├── logic │ │ │ │ ├── view │ │ │ │ │ └── BaseView.kt │ │ │ │ ├── listener │ │ │ │ │ ├── OnErrorListener.kt │ │ │ │ │ └── OnSuccessListener.kt │ │ │ │ ├── factory │ │ │ │ │ └── PresenterFactory.kt │ │ │ │ ├── presenter │ │ │ │ │ └── BasePresenter.kt │ │ │ │ └── interactor │ │ │ │ │ └── BaseInteractor.kt │ │ │ │ ├── utils │ │ │ │ ├── bugfix │ │ │ │ │ ├── helper │ │ │ │ │ │ └── LifecycleCallbacksAdapter.kt │ │ │ │ │ ├── UserManagerLeaks.java │ │ │ │ │ └── IMMLeaks.java │ │ │ │ └── Preconditions.java │ │ │ │ └── ui │ │ │ │ ├── loader │ │ │ │ └── PresenterLoader.kt │ │ │ │ ├── view │ │ │ │ ├── BaseFrameLayout.kt │ │ │ │ ├── BaseRelativeLayout.kt │ │ │ │ └── BaseLinearLayout.kt │ │ │ │ ├── activity │ │ │ │ └── BaseActivity.kt │ │ │ │ └── fragment │ │ │ │ └── BaseFragment.kt │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── io │ │ │ └── blackbox_vision │ │ │ └── mvphelpers │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── io │ │ └── blackbox_vision │ │ └── mvphelpers │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── settings.gradle ├── art ├── logo.png └── mvp-helpers-architecture.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── .travis.yml ├── gradle.properties ├── LICENSE ├── gradlew.bat ├── gradlew └── README.md /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /library/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':library' 2 | -------------------------------------------------------------------------------- /art/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/art/logo.png -------------------------------------------------------------------------------- /art/mvp-helpers-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/art/mvp-helpers-architecture.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /library/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | MVP Helpers 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable/logo.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /library/src/main/java/io/blackbox_vision/mvphelpers/logic/view/BaseView.kt: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.mvphelpers.logic.view 2 | 3 | 4 | interface BaseView 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-hdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-mdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xhdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_delete_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-hdpi/ic_delete_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-hdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_title_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-hdpi/ic_title_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_delete_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-mdpi/ic_delete_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-mdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_title_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-mdpi/ic_title_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_title_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xhdpi/ic_title_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxhdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_add_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxxhdpi/ic_add_white_24dp.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_delete_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xhdpi/ic_delete_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xhdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_delete_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxhdpi/ic_delete_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxhdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_title_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxhdpi/ic_title_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_delete_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxxhdpi/ic_delete_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_search_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxxhdpi/ic_search_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_title_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxxhdpi/ic_title_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_assignment_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-hdpi/ic_assignment_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_date_range_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-hdpi/ic_date_range_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_description_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-hdpi/ic_description_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_assignment_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-mdpi/ic_assignment_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_date_range_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-mdpi/ic_date_range_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_description_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-mdpi/ic_description_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_assignment_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xhdpi/ic_assignment_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_date_range_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xhdpi/ic_date_range_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_delete_forever_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-hdpi/ic_delete_forever_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_delete_forever_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-mdpi/ic_delete_forever_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_description_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xhdpi/ic_description_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_assignment_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxhdpi/ic_assignment_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_date_range_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxhdpi/ic_date_range_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_description_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxhdpi/ic_description_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_assignment_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxxhdpi/ic_assignment_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_date_range_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxxhdpi/ic_date_range_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_description_black_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxxhdpi/ic_description_black_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_delete_forever_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xhdpi/ic_delete_forever_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_delete_forever_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxhdpi/ic_delete_forever_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_delete_forever_white_24dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxxhdpi/ic_delete_forever_white_24dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_assignment_turned_in_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-hdpi/ic_assignment_turned_in_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_assignment_turned_in_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-mdpi/ic_assignment_turned_in_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_assignment_turned_in_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xhdpi/ic_assignment_turned_in_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_assignment_turned_in_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxhdpi/ic_assignment_turned_in_black_48dp.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_assignment_turned_in_black_48dp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BlackBoxVision/mvp-helpers/HEAD/app/src/main/res/drawable-xxxhdpi/ic_assignment_turned_in_black_48dp.png -------------------------------------------------------------------------------- /library/src/main/java/io/blackbox_vision/mvphelpers/logic/listener/OnErrorListener.kt: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.mvphelpers.logic.listener 2 | 3 | 4 | interface OnErrorListener { 5 | 6 | fun onError(error: T) 7 | } 8 | -------------------------------------------------------------------------------- /library/src/main/java/io/blackbox_vision/mvphelpers/logic/listener/OnSuccessListener.kt: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.mvphelpers.logic.listener 2 | 3 | 4 | interface OnSuccessListener { 5 | 6 | fun onSuccess(data: T) 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/divider.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /library/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun May 21 19:46:00 ART 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/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 16dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/layout/datepicker_dialog.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #673AB7 4 | #512DA8 5 | #FF4081 6 | 7 | #e0e0e0 8 | 9 | -------------------------------------------------------------------------------- /library/src/main/java/io/blackbox_vision/mvphelpers/logic/factory/PresenterFactory.kt: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.mvphelpers.logic.factory 2 | 3 | import io.blackbox_vision.mvphelpers.logic.presenter.BasePresenter 4 | 5 | 6 | interface PresenterFactory

> { 7 | 8 | fun create(): P 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/java/io/blackbox_vision/helpers/helper/AppConstants.java: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.helpers.helper; 2 | 3 | public final class AppConstants { 4 | public static final String LAUNCH_MODE = "LAUNCH_MODE"; 5 | public static final String TASK_ID = "TASK_ID"; 6 | 7 | public static final String MODE_CREATE = "create"; 8 | public static final String MODE_EDIT = "edit"; 9 | } 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/branded_launch.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/menu/task_menu.xml: -------------------------------------------------------------------------------- 1 | 2 |

4 | 5 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/test/java/io/blackbox_vision/helpers/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.helpers; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /library/src/test/java/io/blackbox_vision/mvphelpers/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.mvphelpers; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/content_add_task.xml: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_task_list.xml: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: android 2 | jdk: oraclejdk8 3 | 4 | env: 5 | global: 6 | # switch glibc to a memory conserving mode 7 | - MALLOC_ARENA_MAX=2 8 | 9 | android: 10 | components: 11 | - tools 12 | - build-tools-24.0.3 13 | - android-25 14 | - android-24 15 | - android-23 16 | - android-22 17 | - android-21 18 | - android-20 19 | - android-19 20 | - android-18 21 | - android-17 22 | - android-16 23 | - android-15 24 | - android-14 25 | - android-13 26 | - android-12 27 | - android-11 28 | - android-10 29 | - android-9 30 | 31 | before_script: 32 | - chmod +x gradlew -------------------------------------------------------------------------------- /app/src/main/res/menu/task_list_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /library/src/main/java/io/blackbox_vision/mvphelpers/logic/presenter/BasePresenter.kt: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.mvphelpers.logic.presenter 2 | 3 | import io.blackbox_vision.mvphelpers.logic.view.BaseView 4 | 5 | 6 | abstract class BasePresenter { 7 | var view: V? = null 8 | private set 9 | 10 | protected abstract fun onViewAttached(view: V) 11 | 12 | protected abstract fun onViewDetached() 13 | 14 | val isViewAttached: Boolean 15 | get() = this.view != null 16 | 17 | fun attachView(view: V) { 18 | this.view = view 19 | onViewAttached(view) 20 | } 21 | 22 | fun detachView() { 23 | this.view = null 24 | onViewDetached() 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/jonatansalas/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /library/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/jonatansalas/Library/Android/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /app/src/main/java/io/blackbox_vision/helpers/ui/activity/TaskListActivity.java: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.helpers.ui.activity; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.support.v7.widget.Toolbar; 6 | 7 | import butterknife.BindView; 8 | import butterknife.ButterKnife; 9 | 10 | import io.blackbox_vision.helpers.R; 11 | 12 | 13 | public final class TaskListActivity extends AppCompatActivity { 14 | 15 | @BindView(R.id.toolbar) 16 | Toolbar toolbar; 17 | 18 | @Override 19 | protected void onCreate(Bundle savedInstanceState) { 20 | setTheme(R.style.AppTheme_NoActionBar); 21 | super.onCreate(savedInstanceState); 22 | setContentView(R.layout.activity_task_list); 23 | ButterKnife.bind(this); 24 | 25 | setSupportActionBar(toolbar); 26 | setTitle(R.string.view_tasks); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/androidTest/java/io/blackbox_vision/helpers/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.helpers; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("io.blackbox_vision.helpers", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/io/blackbox_vision/helpers/logic/presenter_view/TaskListView.java: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.helpers.logic.presenter_view; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import java.util.List; 6 | 7 | import io.blackbox_vision.helpers.data.Task; 8 | import io.blackbox_vision.mvphelpers.logic.listener.OnErrorListener; 9 | import io.blackbox_vision.mvphelpers.logic.view.BaseView; 10 | 11 | 12 | public interface TaskListView extends BaseView, OnErrorListener { 13 | 14 | void onTaskListFetched(@NonNull List tasks); 15 | 16 | void onTasksRemoved(); 17 | 18 | void onNewTaskRequest(); 19 | 20 | void onTaskDetailRequest(@NonNull Long id); 21 | 22 | void showProgress(); 23 | 24 | void hideProgress(); 25 | 26 | void showTaskList(); 27 | 28 | void hideTaskList(); 29 | 30 | void showErrorView(); 31 | 32 | void hideErrorView(); 33 | 34 | void showEmptyView(); 35 | } 36 | -------------------------------------------------------------------------------- /library/src/androidTest/java/io/blackbox_vision/mvphelpers/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.mvphelpers; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumentation test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("io.blackbox_vision.mvphelpers.test", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/java/io/blackbox_vision/helpers/logic/presenter_view/AddTaskView.java: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.helpers.logic.presenter_view; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | import java.util.Calendar; 6 | 7 | import io.blackbox_vision.mvphelpers.logic.listener.OnErrorListener; 8 | import io.blackbox_vision.mvphelpers.logic.view.BaseView; 9 | 10 | 11 | public interface AddTaskView extends BaseView, OnErrorListener { 12 | 13 | void onLaunchMode(); 14 | 15 | void onError(@NonNull Throwable error); 16 | 17 | void goBack(); 18 | 19 | Long getTaskId(); 20 | 21 | String getTitle(); 22 | 23 | void setTitle(@NonNull String title); 24 | 25 | String getDescription(); 26 | 27 | void setDescription(@NonNull String description); 28 | 29 | String getStartDate(); 30 | 31 | void setStartDate(@NonNull String formattedDate, @NonNull Calendar date); 32 | 33 | String getDueDate(); 34 | 35 | void setDueDate(@NonNull String formattedDate, @NonNull Calendar dueDate); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/io/blackbox_vision/helpers/logic/error/TaskException.java: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.helpers.logic.error; 2 | 3 | import android.support.annotation.NonNull; 4 | 5 | 6 | public final class TaskException extends Exception { 7 | public static final String EMPTY_LIST = "EMPTY TASK LIST"; 8 | public static final String CANNOT_CREATE_TASK = "CANNOT CREATE TASK"; 9 | public static final String CANNOT_UPDATE_TASK = "CANNOT UPDATE TASK"; 10 | public static final String CANNOT_DELETE_ALL_TASKS = "CANNOT DELETE ALL TASKS"; 11 | public static final String CANNOT_DELETE_TASK = "CANNOT DELETE TASK"; 12 | public static final String TITLE_EMPTY_OR_NULL = "TITLE EMPTY OR NULL"; 13 | public static final String DESCRIPTION_EMPTY_OR_NULL = "DESCRIPTION EMPTY OR NULL"; 14 | public static final String START_DATE_EMPTY_OR_NULL = "START DATE EMPTY OR NULL"; 15 | public static final String DUE_DATE_EMPTY_OR_NULL = "DUE DATE EMPTY OR NULL"; 16 | 17 | public TaskException(@NonNull String message) { 18 | super(message); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/java/io/blackbox_vision/helpers/App.java: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.helpers; 2 | 3 | import android.os.Build; 4 | 5 | import com.orm.SugarApp; 6 | import com.squareup.leakcanary.LeakCanary; 7 | 8 | import io.blackbox_vision.mvphelpers.utils.bugfix.IMMLeaks; 9 | import io.blackbox_vision.mvphelpers.utils.bugfix.UserManagerLeaks; 10 | 11 | 12 | public final class App extends SugarApp { 13 | 14 | @Override 15 | public void onCreate() { 16 | super.onCreate(); 17 | 18 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) { 19 | IMMLeaks.fixAllPossiblyFocusedViewLeaks(this); 20 | } 21 | 22 | UserManagerLeaks.fixLeakInGetMethod(this); 23 | 24 | if (BuildConfig.DEBUG) { 25 | if (LeakCanary.isInAnalyzerProcess(this)) { 26 | // This process is dedicated to LeakCanary for heap analysis. 27 | // You should not init your app in this process. 28 | return; 29 | } 30 | 31 | LeakCanary.install(this); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /library/src/main/java/io/blackbox_vision/mvphelpers/utils/bugfix/helper/LifecycleCallbacksAdapter.kt: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.mvphelpers.utils.bugfix.helper 2 | 3 | import android.annotation.TargetApi 4 | import android.app.Activity 5 | import android.app.Application 6 | import android.os.Bundle 7 | 8 | 9 | /** Helper to avoid implementing all lifecycle callback methods. */ 10 | @TargetApi(14) 11 | open class LifecycleCallbacksAdapter : Application.ActivityLifecycleCallbacks { 12 | override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle) { 13 | 14 | } 15 | 16 | override fun onActivityStarted(activity: Activity) { 17 | 18 | } 19 | 20 | override fun onActivityResumed(activity: Activity) { 21 | 22 | } 23 | 24 | override fun onActivityPaused(activity: Activity) { 25 | 26 | } 27 | 28 | override fun onActivityStopped(activity: Activity) { 29 | 30 | } 31 | 32 | override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) { 33 | 34 | } 35 | 36 | override fun onActivityDestroyed(activity: Activity) { 37 | 38 | } 39 | } -------------------------------------------------------------------------------- /app/src/main/java/io/blackbox_vision/helpers/ui/behavior/RecyclerViewScrollBehavior.java: -------------------------------------------------------------------------------- 1 | package io.blackbox_vision.helpers.ui.behavior; 2 | 3 | import android.support.annotation.NonNull; 4 | import android.support.design.widget.FloatingActionButton; 5 | import android.support.v7.widget.RecyclerView; 6 | 7 | public final class RecyclerViewScrollBehavior extends RecyclerView.OnScrollListener { 8 | private final FloatingActionButton fab; 9 | 10 | public RecyclerViewScrollBehavior(@NonNull FloatingActionButton fab) { 11 | this.fab = fab; 12 | } 13 | 14 | @Override 15 | public void onScrollStateChanged(RecyclerView recyclerView, int newState) { 16 | switch (newState) { 17 | case RecyclerView.SCROLL_STATE_SETTLING: 18 | case RecyclerView.SCROLL_STATE_DRAGGING: 19 | fab.hide(); 20 | break; 21 | case RecyclerView.SCROLL_STATE_IDLE: 22 | default: 23 | fab.show(); 24 | break; 25 | } 26 | 27 | super.onScrollStateChanged(recyclerView, newState); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 12 | 13 | 17 | 18 | 22 | 23 |