├── .circleci
└── config.yml
├── .github
└── issue_template.md
├── .gitignore
├── BasicRxJavaSample
├── .gitignore
├── .google
│ └── packaging.yaml
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── observability
│ │ │ └── persistence
│ │ │ ├── LocalUserDataSourceTest.java
│ │ │ └── UserDaoTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── android
│ │ │ │ └── observability
│ │ │ │ ├── Injection.java
│ │ │ │ ├── UserDataSource.java
│ │ │ │ ├── persistence
│ │ │ │ ├── LocalUserDataSource.java
│ │ │ │ ├── User.java
│ │ │ │ ├── UserDao.java
│ │ │ │ └── UsersDatabase.java
│ │ │ │ └── ui
│ │ │ │ ├── UserActivity.java
│ │ │ │ ├── UserViewModel.java
│ │ │ │ └── ViewModelFactory.java
│ │ └── res
│ │ │ ├── layout
│ │ │ └── activity_user.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── observability
│ │ └── UserViewModelTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── versions.gradle
├── BasicRxJavaSampleKotlin
├── .gitignore
├── .google
│ └── packaging.yaml
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── observability
│ │ │ └── persistence
│ │ │ └── UserDaoTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── android
│ │ │ │ └── observability
│ │ │ │ ├── Injection.kt
│ │ │ │ ├── persistence
│ │ │ │ ├── User.kt
│ │ │ │ ├── UserDao.kt
│ │ │ │ └── UsersDatabase.kt
│ │ │ │ └── ui
│ │ │ │ ├── UserActivity.kt
│ │ │ │ ├── UserViewModel.kt
│ │ │ │ └── ViewModelFactory.kt
│ │ └── res
│ │ │ ├── layout
│ │ │ └── activity_user.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── observability
│ │ ├── MockitoKotlinHelpers.kt
│ │ └── UserViewModelTest.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── versions.gradle
├── BasicSample
├── .gitignore
├── .google
│ └── packaging.yaml
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── app
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ ├── EspressoTestUtil.java
│ │ │ ├── LiveDataTestUtil.java
│ │ │ ├── db
│ │ │ ├── CommentDaoTest.java
│ │ │ ├── ProductDaoTest.java
│ │ │ └── TestData.java
│ │ │ └── ui
│ │ │ └── MainActivityTest.java
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ ├── AppExecutors.java
│ │ │ ├── BasicApp.java
│ │ │ ├── DataRepository.java
│ │ │ ├── db
│ │ │ ├── AppDatabase.java
│ │ │ ├── DataGenerator.java
│ │ │ ├── converter
│ │ │ │ └── DateConverter.java
│ │ │ ├── dao
│ │ │ │ ├── CommentDao.java
│ │ │ │ └── ProductDao.java
│ │ │ └── entity
│ │ │ │ ├── CommentEntity.java
│ │ │ │ ├── ProductEntity.java
│ │ │ │ └── ProductFtsEntity.java
│ │ │ ├── model
│ │ │ ├── Comment.java
│ │ │ └── Product.java
│ │ │ ├── ui
│ │ │ ├── BindingAdapters.java
│ │ │ ├── CommentAdapter.java
│ │ │ ├── CommentClickCallback.java
│ │ │ ├── MainActivity.java
│ │ │ ├── ProductAdapter.java
│ │ │ ├── ProductClickCallback.java
│ │ │ ├── ProductFragment.java
│ │ │ └── ProductListFragment.java
│ │ │ └── viewmodel
│ │ │ ├── ProductListViewModel.java
│ │ │ └── ProductViewModel.java
│ │ └── res
│ │ ├── drawable
│ │ └── ic_search_black_24dp.xml
│ │ ├── layout
│ │ ├── comment_item.xml
│ │ ├── list_fragment.xml
│ │ ├── main_activity.xml
│ │ ├── product_fragment.xml
│ │ └── product_item.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
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── product_app.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── docs
│ └── images
│ │ ├── VM_diagram.png
│ │ └── VM_subscriptions.png
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── versions.gradle
├── CONTRIBUTING.md
├── GithubBrowserSample
├── .gitignore
├── .google
│ └── packaging.yaml
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── android
│ │ │ └── example
│ │ │ └── github
│ │ │ ├── TestApp.kt
│ │ │ ├── db
│ │ │ ├── DbTest.kt
│ │ │ ├── RepoDaoTest.kt
│ │ │ └── UserDaoTest.kt
│ │ │ ├── ui
│ │ │ ├── repo
│ │ │ │ └── RepoFragmentTest.kt
│ │ │ ├── search
│ │ │ │ └── SearchFragmentTest.kt
│ │ │ └── user
│ │ │ │ └── UserFragmentTest.kt
│ │ │ └── util
│ │ │ ├── AutoClearedValueTest.kt
│ │ │ ├── CountingAppExecutorsRule.kt
│ │ │ ├── DataBindingIdlingResource.kt
│ │ │ ├── DataBindingIdlingResourceRule.kt
│ │ │ ├── DataBindingIdlingResourceTest.kt
│ │ │ ├── EspressoTestUtil.kt
│ │ │ ├── GithubTestRunner.kt
│ │ │ ├── RecyclerViewMatcher.kt
│ │ │ ├── TaskExecutorWithIdlingResourceRule.kt
│ │ │ └── ViewModelUtil.kt
│ │ ├── debug
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ │ └── com
│ │ │ └── android
│ │ │ └── example
│ │ │ └── github
│ │ │ └── testing
│ │ │ ├── OpenForTesting.kt
│ │ │ └── SingleFragmentActivity.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── android
│ │ │ │ └── example
│ │ │ │ └── github
│ │ │ │ ├── AppExecutors.kt
│ │ │ │ ├── GithubApp.kt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── api
│ │ │ │ ├── ApiResponse.kt
│ │ │ │ ├── GithubService.kt
│ │ │ │ └── RepoSearchResponse.kt
│ │ │ │ ├── binding
│ │ │ │ ├── BindingAdapters.kt
│ │ │ │ ├── FragmentBindingAdapters.kt
│ │ │ │ └── FragmentDataBindingComponent.kt
│ │ │ │ ├── db
│ │ │ │ ├── GithubDb.kt
│ │ │ │ ├── GithubTypeConverters.kt
│ │ │ │ ├── RepoDao.kt
│ │ │ │ └── UserDao.kt
│ │ │ │ ├── di
│ │ │ │ ├── AppComponent.kt
│ │ │ │ ├── AppInjector.kt
│ │ │ │ ├── AppModule.kt
│ │ │ │ ├── FragmentBuildersModule.kt
│ │ │ │ ├── Injectable.kt
│ │ │ │ ├── MainActivityModule.kt
│ │ │ │ ├── ViewModelKey.kt
│ │ │ │ └── ViewModelModule.kt
│ │ │ │ ├── repository
│ │ │ │ ├── FetchNextSearchPageTask.kt
│ │ │ │ ├── NetworkBoundResource.kt
│ │ │ │ ├── RepoRepository.kt
│ │ │ │ └── UserRepository.kt
│ │ │ │ ├── ui
│ │ │ │ ├── common
│ │ │ │ │ ├── DataBoundListAdapter.kt
│ │ │ │ │ ├── DataBoundViewHolder.kt
│ │ │ │ │ ├── RepoListAdapter.kt
│ │ │ │ │ └── RetryCallback.kt
│ │ │ │ ├── repo
│ │ │ │ │ ├── ContributorAdapter.kt
│ │ │ │ │ ├── RepoFragment.kt
│ │ │ │ │ └── RepoViewModel.kt
│ │ │ │ ├── search
│ │ │ │ │ ├── SearchFragment.kt
│ │ │ │ │ └── SearchViewModel.kt
│ │ │ │ └── user
│ │ │ │ │ ├── UserFragment.kt
│ │ │ │ │ └── UserViewModel.kt
│ │ │ │ ├── util
│ │ │ │ ├── AbsentLiveData.kt
│ │ │ │ ├── AutoClearedValue.kt
│ │ │ │ ├── LiveDataCallAdapter.kt
│ │ │ │ ├── LiveDataCallAdapterFactory.kt
│ │ │ │ └── RateLimiter.kt
│ │ │ │ ├── viewmodel
│ │ │ │ └── GithubViewModelFactory.kt
│ │ │ │ └── vo
│ │ │ │ ├── Contributor.kt
│ │ │ │ ├── Repo.kt
│ │ │ │ ├── RepoSearchResult.kt
│ │ │ │ ├── Resource.kt
│ │ │ │ ├── Status.kt
│ │ │ │ └── User.kt
│ │ └── res
│ │ │ ├── layout
│ │ │ ├── contributor_item.xml
│ │ │ ├── loading_state.xml
│ │ │ ├── main_activity.xml
│ │ │ ├── repo_fragment.xml
│ │ │ ├── repo_item.xml
│ │ │ ├── search_fragment.xml
│ │ │ └── user_fragment.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── navigation
│ │ │ └── main.xml
│ │ │ ├── transition
│ │ │ └── move.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ ├── release
│ │ └── java
│ │ │ └── com
│ │ │ └── android
│ │ │ └── example
│ │ │ └── github
│ │ │ └── testing
│ │ │ └── OpenForTesting.kt
│ │ ├── test-common
│ │ └── java
│ │ │ └── com
│ │ │ └── android
│ │ │ └── example
│ │ │ └── github
│ │ │ └── util
│ │ │ ├── CountingAppExecutors.kt
│ │ │ ├── LiveDataTestUtil.kt
│ │ │ ├── MockitoExt.kt
│ │ │ └── TestUtil.kt
│ │ └── test
│ │ ├── java
│ │ └── com
│ │ │ └── android
│ │ │ └── example
│ │ │ └── github
│ │ │ ├── api
│ │ │ ├── ApiResponseTest.kt
│ │ │ └── GithubServiceTest.kt
│ │ │ ├── repository
│ │ │ ├── FetchNextSearchPageTaskTest.kt
│ │ │ ├── NetworkBoundResourceTest.kt
│ │ │ ├── RepoRepositoryTest.kt
│ │ │ └── UserRepositoryTest.kt
│ │ │ ├── ui
│ │ │ ├── repo
│ │ │ │ └── RepoViewModelTest.kt
│ │ │ ├── search
│ │ │ │ ├── NextPageHandlerTest.kt
│ │ │ │ └── SearchViewModelTest.kt
│ │ │ └── user
│ │ │ │ └── UserViewModelTest.kt
│ │ │ └── util
│ │ │ ├── ApiUtil.kt
│ │ │ └── InstantAppExecutors.kt
│ │ └── resources
│ │ └── api-response
│ │ ├── contributors.json
│ │ ├── repos-yigit.json
│ │ ├── search.json
│ │ └── user-yigit.json
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── lint.xml
├── settings.gradle
└── versions.gradle
├── LICENSE
├── NavigationAdvancedSample
├── .gitignore
├── .google
│ └── packaging.yaml
├── .idea
│ └── runConfigurations
│ │ ├── app.xml
│ │ └── deeplink.xml
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ ├── sampledata
│ │ └── rank.json
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── navigationadvancedsample
│ │ │ ├── BottomNavigationTest.kt
│ │ │ └── DeepLinkTest.kt
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── navigationadvancedsample
│ │ │ ├── MainActivity.kt
│ │ │ ├── NavigationExtensions.kt
│ │ │ ├── formscreen
│ │ │ ├── Register.kt
│ │ │ └── Registered.kt
│ │ │ ├── homescreen
│ │ │ ├── About.kt
│ │ │ └── Title.kt
│ │ │ └── listscreen
│ │ │ ├── Leaderboard.kt
│ │ │ └── UserProfile.kt
│ │ └── res
│ │ ├── anim
│ │ ├── fade_in.xml
│ │ └── fade_out.xml
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── avatar_1_raster.png
│ │ ├── avatar_2_raster.png
│ │ ├── avatar_3_raster.png
│ │ ├── avatar_4_raster.png
│ │ ├── avatar_5_raster.png
│ │ ├── avatar_6_raster.png
│ │ ├── button_press.xml
│ │ ├── button_press_dark.xml
│ │ ├── circle.xml
│ │ ├── ic_feedback.xml
│ │ ├── ic_home.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── ic_list.xml
│ │ ├── image_category_entertainment_raster.png
│ │ ├── purple_frame.xml
│ │ ├── rounded_button.xml
│ │ └── rounded_rect.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── fragment_about.xml
│ │ ├── fragment_leaderboard.xml
│ │ ├── fragment_register.xml
│ │ ├── fragment_registered.xml
│ │ ├── fragment_title.xml
│ │ ├── fragment_user_profile.xml
│ │ ├── layout_picker.xml
│ │ ├── list_view_item.xml
│ │ └── user_card.xml
│ │ ├── menu
│ │ └── bottom_nav.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── navigation
│ │ ├── form.xml
│ │ ├── home.xml
│ │ └── list.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshot.png
├── settings.gradle
└── versions.gradle
├── NavigationBasicSample
├── .gitignore
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ ├── sampledata
│ │ └── rank.json
│ └── src
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── android
│ │ │ │ └── navigationsample
│ │ │ │ ├── GameOver.kt
│ │ │ │ ├── InGame.kt
│ │ │ │ ├── Leaderboard.kt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── Match.kt
│ │ │ │ ├── Register.kt
│ │ │ │ ├── ResultsWinner.kt
│ │ │ │ ├── TitleScreen.kt
│ │ │ │ └── UserProfile.kt
│ │ └── res
│ │ │ ├── anim
│ │ │ ├── fade_in.xml
│ │ │ ├── fade_out.xml
│ │ │ ├── slide_in_left.xml
│ │ │ ├── slide_in_right.xml
│ │ │ ├── slide_out_left.xml
│ │ │ └── slide_out_right.xml
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable
│ │ │ ├── avatar_10_raster.png
│ │ │ ├── avatar_11_raster.png
│ │ │ ├── avatar_12_raster.png
│ │ │ ├── avatar_13_raster.png
│ │ │ ├── avatar_14_raster.png
│ │ │ ├── avatar_15_raster.png
│ │ │ ├── avatar_16_raster.png
│ │ │ ├── avatar_1_raster.png
│ │ │ ├── avatar_2_raster.png
│ │ │ ├── avatar_3_raster.png
│ │ │ ├── avatar_4_raster.png
│ │ │ ├── avatar_5_raster.png
│ │ │ ├── avatar_6_raster.png
│ │ │ ├── avatar_7_raster.png
│ │ │ ├── avatar_8_raster.png
│ │ │ ├── avatar_9_raster.png
│ │ │ ├── button_press.xml
│ │ │ ├── button_press_dark.xml
│ │ │ ├── circle.xml
│ │ │ ├── dark_frame.xml
│ │ │ ├── ic_launcher_background.xml
│ │ │ ├── icon_category_leaderboard_raster.png
│ │ │ ├── image_category_entertainment_raster.png
│ │ │ ├── image_category_tvmovies_raster.png
│ │ │ ├── lose_button.xml
│ │ │ ├── mask.xml
│ │ │ ├── purple_frame.xml
│ │ │ ├── rounded_button.xml
│ │ │ ├── rounded_button_dark.xml
│ │ │ ├── rounded_button_white.xml
│ │ │ ├── rounded_rect.xml
│ │ │ ├── white_outline.xml
│ │ │ └── win_button.xml
│ │ │ ├── layout
│ │ │ ├── activity_main.xml
│ │ │ ├── fragment_game_over.xml
│ │ │ ├── fragment_in_game.xml
│ │ │ ├── fragment_leaderboard.xml
│ │ │ ├── fragment_match.xml
│ │ │ ├── fragment_register.xml
│ │ │ ├── fragment_results_winner.xml
│ │ │ ├── fragment_title_screen.xml
│ │ │ ├── fragment_user_profile.xml
│ │ │ ├── layout_picker.xml
│ │ │ ├── list_view_item.xml
│ │ │ └── user_card.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── navigation
│ │ │ └── navigation.xml
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── uiTest
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── navigationsample
│ │ ├── TitleScreenTestJava.java
│ │ └── TitleScreenTestKotlin.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── screenshot.png
├── settings.gradle
└── versions.gradle
├── PagingSample
├── .gitignore
├── .google
│ └── packaging.yaml
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── paging
│ │ │ └── android
│ │ │ └── example
│ │ │ └── com
│ │ │ └── pagingsample
│ │ │ └── MainActivityTest.java
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── paging
│ │ │ └── android
│ │ │ └── example
│ │ │ └── com
│ │ │ └── pagingsample
│ │ │ ├── Cheese.kt
│ │ │ ├── CheeseAdapter.kt
│ │ │ ├── CheeseDao.kt
│ │ │ ├── CheeseDb.kt
│ │ │ ├── CheeseViewHolder.kt
│ │ │ ├── CheeseViewModel.kt
│ │ │ ├── Executors.kt
│ │ │ └── MainActivity.kt
│ │ └── res
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ └── cheese_item.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── versions.gradle
├── PagingWithNetworkSample
├── .gitignore
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── android
│ │ │ └── example
│ │ │ └── paging
│ │ │ └── pagingwithnetwork
│ │ │ └── reddit
│ │ │ └── ui
│ │ │ └── RedditActivityTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ ├── androidx
│ │ │ │ └── paging
│ │ │ │ │ └── PagingRequestHelper.java
│ │ │ └── com
│ │ │ │ └── android
│ │ │ │ └── example
│ │ │ │ └── paging
│ │ │ │ └── pagingwithnetwork
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── RedditAppGlideModule.kt
│ │ │ │ └── reddit
│ │ │ │ ├── ServiceLocator.kt
│ │ │ │ ├── api
│ │ │ │ └── RedditApi.kt
│ │ │ │ ├── db
│ │ │ │ ├── RedditDb.kt
│ │ │ │ └── RedditPostDao.kt
│ │ │ │ ├── repository
│ │ │ │ ├── Listing.kt
│ │ │ │ ├── NetworkState.kt
│ │ │ │ ├── RedditPostRepository.kt
│ │ │ │ ├── inDb
│ │ │ │ │ ├── DbRedditPostRepository.kt
│ │ │ │ │ └── SubredditBoundaryCallback.kt
│ │ │ │ └── inMemory
│ │ │ │ │ ├── byItem
│ │ │ │ │ ├── InMemoryByItemRepository.kt
│ │ │ │ │ ├── ItemKeyedSubredditDataSource.kt
│ │ │ │ │ └── SubRedditDataSourceFactory.kt
│ │ │ │ │ └── byPage
│ │ │ │ │ ├── InMemoryByPageKeyRepository.kt
│ │ │ │ │ ├── PageKeyedSubredditDataSource.kt
│ │ │ │ │ └── SubRedditDataSourceFactory.kt
│ │ │ │ ├── ui
│ │ │ │ ├── NetworkStateItemViewHolder.kt
│ │ │ │ ├── PostsAdapter.kt
│ │ │ │ ├── RedditActivity.kt
│ │ │ │ ├── RedditPostViewHolder.kt
│ │ │ │ └── SubRedditViewModel.kt
│ │ │ │ ├── util
│ │ │ │ └── PagingRequestHelperExt.kt
│ │ │ │ └── vo
│ │ │ │ └── RedditPost.kt
│ │ └── res
│ │ │ ├── drawable-hdpi
│ │ │ └── ic_insert_photo_black_48dp.png
│ │ │ ├── drawable-mdpi
│ │ │ └── ic_insert_photo_black_48dp.png
│ │ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ │ ├── drawable-xhdpi
│ │ │ └── ic_insert_photo_black_48dp.png
│ │ │ ├── drawable-xxhdpi
│ │ │ └── ic_insert_photo_black_48dp.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ └── ic_insert_photo_black_48dp.png
│ │ │ ├── drawable
│ │ │ └── ic_launcher_background.xml
│ │ │ ├── layout
│ │ │ ├── activity_main.xml
│ │ │ ├── activity_reddit.xml
│ │ │ ├── network_state_item.xml
│ │ │ └── reddit_post_item.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ ├── test-common
│ │ └── java
│ │ │ └── com
│ │ │ └── android
│ │ │ └── example
│ │ │ └── paging
│ │ │ └── pagingwithnetwork
│ │ │ └── repository
│ │ │ ├── FakeRedditApi.kt
│ │ │ └── PostFactory.kt
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── android
│ │ └── example
│ │ └── paging
│ │ └── pagingwithnetwork
│ │ └── reddit
│ │ └── repository
│ │ └── inMemory
│ │ └── InMemoryRepositoryTest.kt
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── versions.gradle
├── PersistenceContentProviderSample
├── .gitignore
├── .google
│ └── packaging.yaml
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ ├── schemas
│ │ └── com.example.android.contentprovidersample.data.SampleDatabase
│ │ │ └── 1.json
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── contentprovidersample
│ │ │ ├── CheeseTest.java
│ │ │ └── SampleContentProviderTest.java
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── contentprovidersample
│ │ │ ├── MainActivity.java
│ │ │ ├── data
│ │ │ ├── Cheese.java
│ │ │ ├── CheeseDao.java
│ │ │ └── SampleDatabase.java
│ │ │ └── provider
│ │ │ └── SampleContentProvider.java
│ │ └── res
│ │ ├── layout
│ │ └── main_activity.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
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── versions.gradle
├── PersistenceMigrationsSample
├── .gitignore
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ ├── schemas
│ │ └── com.example.android.persistence.migrations.UsersDatabase
│ │ │ ├── 2.json
│ │ │ ├── 3.json
│ │ │ ├── 4.json
│ │ │ └── 5.json
│ └── src
│ │ ├── androidTestRoom
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ └── migrations
│ │ │ ├── LocalUserDataSourceTest.java
│ │ │ ├── MigrationTest.java
│ │ │ └── UserDaoTest.java
│ │ ├── androidTestRoom2
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ └── migrations
│ │ │ ├── LocalUserDataSourceTest.java
│ │ │ └── MigrationTest.java
│ │ ├── androidTestRoom3
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ └── migrations
│ │ │ ├── LocalUserDataSourceTest.java
│ │ │ └── MigrationTest.java
│ │ ├── androidTestRoom_Common
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ └── migrations
│ │ │ ├── SqliteDatabaseTestHelper.java
│ │ │ └── SqliteTestDbOpenHelper.java
│ │ ├── androidTestSqlite
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ └── migrations
│ │ │ └── LocalUserDataSourceTest.java
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── android
│ │ │ │ └── persistence
│ │ │ │ └── migrations
│ │ │ │ ├── AppExecutors.java
│ │ │ │ ├── LoadUserCallback.java
│ │ │ │ ├── UpdateUserCallback.java
│ │ │ │ ├── UserActivity.java
│ │ │ │ ├── UserDataSource.java
│ │ │ │ ├── UserPresenter.java
│ │ │ │ └── UserView.java
│ │ └── res
│ │ │ ├── layout
│ │ │ └── activity_user.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ ├── room
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ └── migrations
│ │ │ ├── User.java
│ │ │ ├── UserRepository.java
│ │ │ └── UsersDatabase.java
│ │ ├── room2
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ └── migrations
│ │ │ ├── DateConverter.java
│ │ │ ├── User.java
│ │ │ ├── UserRepository.java
│ │ │ └── UsersDatabase.java
│ │ ├── room3
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ └── migrations
│ │ │ ├── DateConverter.java
│ │ │ ├── User.java
│ │ │ ├── UserRepository.java
│ │ │ └── UsersDatabase.java
│ │ ├── room_common
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ └── migrations
│ │ │ ├── LocalUserDataSource.java
│ │ │ └── UserDao.java
│ │ ├── sqlite
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── android
│ │ │ └── persistence
│ │ │ └── migrations
│ │ │ ├── LocalUserDataSource.java
│ │ │ ├── User.java
│ │ │ ├── UserPersistenceContract.java
│ │ │ ├── UserRepository.java
│ │ │ └── UsersDbHelper.java
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── example
│ │ └── android
│ │ └── persistence
│ │ └── migrations
│ │ ├── SingleExecutors.java
│ │ ├── UserPresenterTest.java
│ │ └── UserRepositoryTest.java
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── versions.gradle
├── README.md
├── WorkManagerSample
├── .gitignore
├── ASSETS_LICENSE.md
├── README.md
├── app
│ ├── .gitignore
│ ├── build.gradle
│ ├── proguard-rules.pro
│ └── src
│ │ ├── androidTest
│ │ ├── assets
│ │ │ └── test_outputs
│ │ │ │ └── grayscale.png
│ │ └── java
│ │ │ └── com
│ │ │ └── example
│ │ │ └── background
│ │ │ ├── ImageOperationsTest.kt
│ │ │ └── TestLifeCycleOwner.kt
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── assets
│ │ └── images
│ │ │ ├── jetpack.png
│ │ │ ├── lit_pier.jpg
│ │ │ ├── parting_ways.jpg
│ │ │ └── wrong_way.jpg
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── background
│ │ │ ├── App.kt
│ │ │ ├── Constants.kt
│ │ │ ├── FilterActivity.kt
│ │ │ ├── FilterViewModel.kt
│ │ │ ├── ImageOperations.kt
│ │ │ ├── SelectImageActivity.kt
│ │ │ ├── StockImages.kt
│ │ │ ├── imgur
│ │ │ ├── ImgurApi.kt
│ │ │ ├── ImgurService.kt
│ │ │ └── PostImageResponse.kt
│ │ │ └── workers
│ │ │ ├── BaseFilterWorker.kt
│ │ │ ├── BlurEffectFilterWorker.kt
│ │ │ ├── CleanupWorker.kt
│ │ │ ├── GrayScaleFilterWorker.kt
│ │ │ ├── SaveImageToGalleryWorker.kt
│ │ │ ├── UploadWorker.kt
│ │ │ └── WaterColorFilterWorker.kt
│ │ ├── res
│ │ ├── drawable-v24
│ │ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ │ ├── activity_processing.xml
│ │ │ └── activity_select.xml
│ │ ├── mipmap-anydpi-v26
│ │ │ ├── ic_launcher.xml
│ │ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_launcher_round.png
│ │ └── values
│ │ │ ├── colors.xml
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── rs
│ │ ├── grayscale.rs
│ │ └── waterColorEffect.rs
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
└── versions.gradle
├── gradle-wrapper.properties
├── run_all_tests.sh
├── test_all_ftl.sh
├── update_versions.sh
└── versions.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .idea
3 | .gradle
4 | /local.properties
5 | .DS_Store
6 | build/
7 | /captures
8 | .externalNativeBuild
9 |
--------------------------------------------------------------------------------
/BasicRxJavaSample/.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 |
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/BasicRxJavaSample/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/florinam/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/layout/activity_user.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
15 |
16 |
20 |
21 |
26 |
27 |
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | BasicRxJavaSample
3 | Update username
4 |
5 |
--------------------------------------------------------------------------------
/BasicRxJavaSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/BasicRxJavaSample/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | apply from: 'versions.gradle'
5 | addRepos(repositories)
6 | dependencies {
7 | classpath deps.android_gradle_plugin
8 |
9 | // NOTE: Do not place your application dependencies here; they belong
10 | // in the individual module build.gradle files
11 | }
12 | }
13 |
14 | allprojects {
15 | addRepos(repositories)
16 | }
17 |
18 | task clean(type: Delete) {
19 | delete rootProject.buildDir
20 | }
--------------------------------------------------------------------------------
/BasicRxJavaSample/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 |
--------------------------------------------------------------------------------
/BasicRxJavaSample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/BasicRxJavaSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/BasicRxJavaSample/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | .idea
5 | /.idea/workspace.xml
6 | /.idea/libraries
7 | .DS_Store
8 | /build
9 | /captures
10 | .externalNativeBuild
11 | .idea/
12 |
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/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/florinam/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/java/com/example/android/observability/persistence/User.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.observability.persistence
18 |
19 | import androidx.room.ColumnInfo
20 | import androidx.room.Entity
21 | import androidx.room.PrimaryKey
22 | import java.util.*
23 |
24 | @Entity(tableName = "users")
25 | data class User(@PrimaryKey
26 | @ColumnInfo(name = "userid")
27 | val id: String = UUID.randomUUID().toString(),
28 | @ColumnInfo(name = "username")
29 | val userName: String)
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSampleKotlin/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | BasicRxJavaSampleKotlin
3 | Update username
4 |
5 |
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/app/src/test/java/com/example/android/observability/MockitoKotlinHelpers.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.observability
18 |
19 | import org.mockito.ArgumentCaptor
20 |
21 | /**
22 | * Returns ArgumentCaptor.capture() as nullable type to avoid java.lang.IllegalStateException
23 | * when null is returned.
24 | */
25 | fun capture(argumentCaptor: ArgumentCaptor): T = argumentCaptor.capture()
26 |
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/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 |
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicRxJavaSampleKotlin/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/BasicRxJavaSampleKotlin/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/BasicSample/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .idea
3 | .gradle
4 | /local.properties
5 | .DS_Store
6 | build/
7 | /captures
8 | .externalNativeBuild
9 |
--------------------------------------------------------------------------------
/BasicSample/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 /usr/local/google/home/jalc/sw/android-sdks/android-sdk-linux/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 |
--------------------------------------------------------------------------------
/BasicSample/app/src/androidTest/java/com/example/android/persistence/db/TestData.java:
--------------------------------------------------------------------------------
1 | package com.example.android.persistence.db;
2 |
3 | import com.example.android.persistence.db.entity.CommentEntity;
4 | import com.example.android.persistence.db.entity.ProductEntity;
5 |
6 | import java.util.Arrays;
7 | import java.util.Date;
8 | import java.util.List;
9 |
10 | /**
11 | * Utility class that holds values to be used for testing.
12 | */
13 | public class TestData {
14 |
15 | static final ProductEntity PRODUCT_ENTITY = new ProductEntity(1, "name", "desc",
16 | 3);
17 | static final ProductEntity PRODUCT_ENTITY2 = new ProductEntity(2, "name2", "desc2",
18 | 20);
19 |
20 | static final List PRODUCTS = Arrays.asList(PRODUCT_ENTITY, PRODUCT_ENTITY2);
21 |
22 | static final CommentEntity COMMENT_ENTITY = new CommentEntity(1, PRODUCT_ENTITY.getId(),
23 | "desc", new Date());
24 | static final CommentEntity COMMENT_ENTITY2 = new CommentEntity(2,
25 | PRODUCT_ENTITY2.getId(), "desc2", new Date());
26 |
27 | static final List COMMENTS = Arrays.asList(COMMENT_ENTITY, COMMENT_ENTITY2);
28 |
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/BasicSample/app/src/main/java/com/example/android/persistence/db/converter/DateConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.persistence.db.converter;
18 |
19 | import androidx.room.TypeConverter;
20 | import java.util.Date;
21 |
22 | public class DateConverter {
23 | @TypeConverter
24 | public static Date toDate(Long timestamp) {
25 | return timestamp == null ? null : new Date(timestamp);
26 | }
27 |
28 | @TypeConverter
29 | public static Long toTimestamp(Date date) {
30 | return date == null ? null : date.getTime();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/BasicSample/app/src/main/java/com/example/android/persistence/model/Comment.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.persistence.model;
18 |
19 | import java.util.Date;
20 |
21 | public interface Comment {
22 | int getId();
23 | int getProductId();
24 | String getText();
25 | Date getPostedAt();
26 | }
27 |
--------------------------------------------------------------------------------
/BasicSample/app/src/main/java/com/example/android/persistence/model/Product.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.persistence.model;
18 |
19 | public interface Product {
20 | int getId();
21 | String getName();
22 | String getDescription();
23 | int getPrice();
24 | }
25 |
--------------------------------------------------------------------------------
/BasicSample/app/src/main/java/com/example/android/persistence/ui/BindingAdapters.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.persistence.ui;
18 |
19 | import androidx.databinding.BindingAdapter;
20 | import android.view.View;
21 |
22 |
23 | public class BindingAdapters {
24 | @BindingAdapter("visibleGone")
25 | public static void showHide(View view, boolean show) {
26 | view.setVisibility(show ? View.VISIBLE : View.GONE);
27 | }
28 | }
--------------------------------------------------------------------------------
/BasicSample/app/src/main/java/com/example/android/persistence/ui/CommentClickCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.persistence.ui;
18 |
19 | import com.example.android.persistence.model.Comment;
20 |
21 | public interface CommentClickCallback {
22 | void onClick(Comment comment);
23 | }
24 |
--------------------------------------------------------------------------------
/BasicSample/app/src/main/java/com/example/android/persistence/ui/ProductClickCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.persistence.ui;
18 |
19 | import com.example.android.persistence.model.Product;
20 |
21 | public interface ProductClickCallback {
22 | void onClick(Product product);
23 | }
24 |
--------------------------------------------------------------------------------
/BasicSample/app/src/main/res/drawable/ic_search_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/BasicSample/app/src/main/res/layout/main_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
23 |
--------------------------------------------------------------------------------
/BasicSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/BasicSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | #3F51B5
20 | #303F9F
21 | #FF4081
22 |
23 | #d6d6d6
24 |
25 |
--------------------------------------------------------------------------------
/BasicSample/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 | 16dp
20 | 8dp
21 | 16dp
22 | 16dp
23 | 8dp
24 | 64dp
25 |
26 |
--------------------------------------------------------------------------------
/BasicSample/app/src/main/res/values/product_app.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | Price: $%d
20 | 100dp
21 |
--------------------------------------------------------------------------------
/BasicSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/BasicSample/docs/images/VM_diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicSample/docs/images/VM_diagram.png
--------------------------------------------------------------------------------
/BasicSample/docs/images/VM_subscriptions.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicSample/docs/images/VM_subscriptions.png
--------------------------------------------------------------------------------
/BasicSample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/BasicSample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/BasicSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/BasicSample/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include ':app'
18 |
--------------------------------------------------------------------------------
/GithubBrowserSample/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .idea
3 | .gradle
4 | /local.properties
5 | .DS_Store
6 | build/
7 | /captures
8 | .externalNativeBuild
9 | app/build
10 | build
11 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea
5 | /.idea/workspace.xml
6 | /.idea/libraries
7 | .DS_Store
8 | /build
9 | /captures
10 |
--------------------------------------------------------------------------------
/GithubBrowserSample/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/yboyar/android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/androidTest/java/com/android/example/github/TestApp.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github
18 |
19 | import android.app.Application
20 |
21 | /**
22 | * We use a separate App for tests to prevent initializing dependency injection.
23 | *
24 | * See [com.android.example.github.util.GithubTestRunner].
25 | */
26 | class TestApp : Application()
27 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/debug/java/com/android/example/github/testing/OpenForTesting.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.testing
18 |
19 | /**
20 | * This annotation allows us to open some classes for mocking purposes while they are final in
21 | * release builds.
22 | */
23 | @Target(AnnotationTarget.ANNOTATION_CLASS)
24 | annotation class OpenClass
25 |
26 | /**
27 | * Annotate a class with [OpenForTesting] if you want it to be extendable in debug builds.
28 | */
29 | @OpenClass
30 | @Target(AnnotationTarget.CLASS)
31 | annotation class OpenForTesting
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/java/com/android/example/github/binding/BindingAdapters.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.binding
18 |
19 | import androidx.databinding.BindingAdapter
20 | import android.view.View
21 |
22 | /**
23 | * Data Binding adapters specific to the app.
24 | */
25 | object BindingAdapters {
26 | @JvmStatic
27 | @BindingAdapter("visibleGone")
28 | fun showHide(view: View, show: Boolean) {
29 | view.visibility = if (show) View.VISIBLE else View.GONE
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/java/com/android/example/github/binding/FragmentDataBindingComponent.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.binding
18 |
19 | import androidx.databinding.DataBindingComponent
20 | import androidx.fragment.app.Fragment
21 |
22 | /**
23 | * A Data Binding Component implementation for fragments.
24 | */
25 | class FragmentDataBindingComponent(fragment: Fragment) : DataBindingComponent {
26 | private val adapter = FragmentBindingAdapters(fragment)
27 |
28 | override fun getFragmentBindingAdapters() = adapter
29 | }
30 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/java/com/android/example/github/di/Injectable.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.di
18 |
19 | /**
20 | * Marks an activity / fragment injectable.
21 | */
22 | interface Injectable
23 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/java/com/android/example/github/di/MainActivityModule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.di
18 |
19 | import com.android.example.github.MainActivity
20 |
21 | import dagger.Module
22 | import dagger.android.ContributesAndroidInjector
23 |
24 | @Suppress("unused")
25 | @Module
26 | abstract class MainActivityModule {
27 | @ContributesAndroidInjector(modules = [FragmentBuildersModule::class])
28 | abstract fun contributeMainActivity(): MainActivity
29 | }
30 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/java/com/android/example/github/di/ViewModelKey.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.di
18 |
19 | import androidx.lifecycle.ViewModel
20 | import dagger.MapKey
21 | import kotlin.reflect.KClass
22 |
23 | @MustBeDocumented
24 | @Target(
25 | AnnotationTarget.FUNCTION,
26 | AnnotationTarget.PROPERTY_GETTER,
27 | AnnotationTarget.PROPERTY_SETTER
28 | )
29 | @Retention(AnnotationRetention.RUNTIME)
30 | @MapKey
31 | annotation class ViewModelKey(val value: KClass)
32 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/java/com/android/example/github/ui/common/DataBoundViewHolder.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.ui.common
18 |
19 | import androidx.databinding.ViewDataBinding
20 | import androidx.recyclerview.widget.RecyclerView
21 |
22 | /**
23 | * A generic ViewHolder that works with a [ViewDataBinding].
24 | * @param The type of the ViewDataBinding.
25 | */
26 | class DataBoundViewHolder constructor(val binding: T) :
27 | RecyclerView.ViewHolder(binding.root)
28 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/java/com/android/example/github/ui/common/RetryCallback.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.ui.common
18 |
19 | /**
20 | * Generic interface for retry buttons.
21 | */
22 | interface RetryCallback {
23 | fun retry()
24 | }
25 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/java/com/android/example/github/vo/RepoSearchResult.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.vo
18 |
19 | import androidx.room.Entity
20 | import androidx.room.TypeConverters
21 | import com.android.example.github.db.GithubTypeConverters
22 |
23 | @Entity(primaryKeys = ["query"])
24 | @TypeConverters(GithubTypeConverters::class)
25 | data class RepoSearchResult(
26 | val query: String,
27 | val repoIds: List,
28 | val totalCount: Int,
29 | val next: Int?
30 | )
31 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/java/com/android/example/github/vo/Status.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.vo
18 |
19 | /**
20 | * Status of a resource that is provided to the UI.
21 | *
22 | *
23 | * These are usually created by the Repository classes where they return
24 | * `LiveData>` to pass back the latest data to the UI with its fetch status.
25 | */
26 | enum class Status {
27 | SUCCESS,
28 | ERROR,
29 | LOADING
30 | }
31 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/GithubBrowserSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/GithubBrowserSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/GithubBrowserSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/GithubBrowserSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/GithubBrowserSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/GithubBrowserSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/GithubBrowserSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/GithubBrowserSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/GithubBrowserSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/GithubBrowserSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/transition/move.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | #3F51B5
19 | #303F9F
20 | #ff4081
21 |
22 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | 64dp
19 | 8dp
20 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/release/java/com/android/example/github/testing/OpenForTesting.kt:
--------------------------------------------------------------------------------
1 | package com.android.example.github.testing
2 |
3 | @Target(AnnotationTarget.CLASS)
4 | annotation class OpenForTesting
5 |
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/test-common/java/com/android/example/github/util/MockitoExt.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.util
18 |
19 | import org.mockito.ArgumentCaptor
20 | import org.mockito.Mockito
21 |
22 | /**
23 | * a kotlin friendly mock that handles generics
24 | */
25 | inline fun mock(): T = Mockito.mock(T::class.java)
26 |
27 | inline fun argumentCaptor(): ArgumentCaptor = ArgumentCaptor.forClass(T::class.java)
--------------------------------------------------------------------------------
/GithubBrowserSample/app/src/test/java/com/android/example/github/util/InstantAppExecutors.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.android.example.github.util
18 |
19 | import com.android.example.github.AppExecutors
20 |
21 | import java.util.concurrent.Executor
22 |
23 | class InstantAppExecutors : AppExecutors(instant, instant, instant) {
24 | companion object {
25 | private val instant = Executor { it.run() }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/GithubBrowserSample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/GithubBrowserSample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/GithubBrowserSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/GithubBrowserSample/lint.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/GithubBrowserSample/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include ':app'
18 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea
5 | .DS_Store
6 | /build
7 | /captures
8 | .externalNativeBuild
9 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/sampledata/rank.json:
--------------------------------------------------------------------------------
1 | {
2 | "data" :[
3 | { "rank":"#1"},
4 | { "rank":"#2"},
5 | { "rank":"#3"},
6 | { "rank":"#4"},
7 | { "rank":"#5"},
8 | { "rank":"#6"},
9 | { "rank":"#7"},
10 | { "rank":"#8"},
11 | { "rank":"#9"},
12 | { "rank":"#10"}
13 | ]
14 | }
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/anim/fade_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/anim/fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/avatar_1_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/drawable/avatar_1_raster.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/avatar_2_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/drawable/avatar_2_raster.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/avatar_3_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/drawable/avatar_3_raster.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/avatar_4_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/drawable/avatar_4_raster.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/avatar_5_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/drawable/avatar_5_raster.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/avatar_6_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/drawable/avatar_6_raster.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/button_press.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/button_press_dark.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/ic_feedback.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/ic_home.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/ic_list.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/image_category_entertainment_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/drawable/image_category_entertainment_raster.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/drawable/rounded_rect.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | #008577
20 | #00574B
21 | #7e53c5
22 |
23 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
18 |
19 | buildscript {
20 | apply from: 'versions.gradle'
21 | addRepos(repositories)
22 | dependencies {
23 | classpath deps.android_gradle_plugin
24 | classpath deps.kotlin.plugin
25 | }
26 | repositories {
27 | google()
28 | }
29 | }
30 |
31 | allprojects {
32 | addRepos(repositories)
33 | }
34 |
35 | task clean(type: Delete) {
36 | delete rootProject.buildDir
37 | }
38 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/NavigationAdvancedSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/NavigationAdvancedSample/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationAdvancedSample/screenshot.png
--------------------------------------------------------------------------------
/NavigationAdvancedSample/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include ':app'
18 |
--------------------------------------------------------------------------------
/NavigationBasicSample/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea
5 | .DS_Store
6 | /build
7 | /captures
8 | .externalNativeBuild
9 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/sampledata/rank.json:
--------------------------------------------------------------------------------
1 | {
2 | "data" :[
3 | { "rank":"#1"},
4 | { "rank":"#2"},
5 | { "rank":"#3"},
6 | { "rank":"#4"},
7 | { "rank":"#5"},
8 | { "rank":"#6"},
9 | { "rank":"#7"},
10 | { "rank":"#8"},
11 | { "rank":"#9"},
12 | { "rank":"#10"}
13 | ]
14 | }
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/java/com/example/android/navigationsample/MainActivity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.navigationsample
18 |
19 | import android.os.Bundle
20 | import androidx.appcompat.app.AppCompatActivity
21 |
22 | /**
23 | * An activity that inflates a layout that has a NavHostFragment.
24 | */
25 | class MainActivity : AppCompatActivity() {
26 |
27 | override fun onCreate(savedInstanceState: Bundle?) {
28 | super.onCreate(savedInstanceState)
29 | setContentView(R.layout.activity_main)
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/anim/fade_in.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
23 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/anim/fade_out.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
23 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/anim/slide_in_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/anim/slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
23 |
24 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/anim/slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
23 |
24 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/anim/slide_out_right.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_10_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_10_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_11_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_11_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_12_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_12_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_13_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_13_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_14_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_14_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_15_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_15_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_16_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_16_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_1_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_1_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_2_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_2_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_3_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_3_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_4_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_4_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_5_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_5_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_6_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_6_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_7_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_7_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_8_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_8_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/avatar_9_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/avatar_9_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/button_press.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/button_press_dark.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/icon_category_leaderboard_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/icon_category_leaderboard_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/image_category_entertainment_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/image_category_entertainment_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/image_category_tvmovies_raster.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/drawable/image_category_tvmovies_raster.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/mask.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/rounded_rect.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
20 |
21 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/drawable/white_outline.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 | -
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | #008577
20 | #00574B
21 | #7e53c5
22 |
23 |
--------------------------------------------------------------------------------
/NavigationBasicSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/NavigationBasicSample/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
18 |
19 | buildscript {
20 | apply from: 'versions.gradle'
21 | addRepos(repositories)
22 | dependencies {
23 | classpath deps.android_gradle_plugin
24 | classpath deps.kotlin.plugin
25 | }
26 | }
27 |
28 | allprojects {
29 | addRepos(repositories)
30 | }
31 |
32 | task clean(type: Delete) {
33 | delete rootProject.buildDir
34 | }
35 |
--------------------------------------------------------------------------------
/NavigationBasicSample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/NavigationBasicSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/NavigationBasicSample/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/NavigationBasicSample/screenshot.png
--------------------------------------------------------------------------------
/NavigationBasicSample/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2018 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include ':app'
18 |
--------------------------------------------------------------------------------
/PagingSample/.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 |
--------------------------------------------------------------------------------
/PagingSample/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/PagingSample/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/PagingSample/app/src/main/java/paging/android/example/com/pagingsample/Cheese.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package paging.android.example.com.pagingsample
18 |
19 | import androidx.room.Entity
20 | import androidx.room.PrimaryKey
21 |
22 | /**
23 | * Data class that represents our items.
24 | */
25 | @Entity
26 | data class Cheese(@PrimaryKey(autoGenerate = true) val id: Int, val name: String)
--------------------------------------------------------------------------------
/PagingSample/app/src/main/java/paging/android/example/com/pagingsample/Executors.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package paging.android.example.com.pagingsample
18 |
19 | import java.util.concurrent.Executors
20 |
21 | private val IO_EXECUTOR = Executors.newSingleThreadExecutor()
22 |
23 | /**
24 | * Utility method to run blocks on a dedicated background thread, used for io/database work.
25 | */
26 | fun ioThread(f : () -> Unit) {
27 | IO_EXECUTOR.execute(f)
28 | }
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | #3F51B5
20 | #303F9F
21 | #FF4081
22 |
23 |
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | 8dp
20 |
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | PagingSample
19 | add cheese
20 | add
21 |
22 |
--------------------------------------------------------------------------------
/PagingSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/PagingSample/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
18 |
19 | buildscript {
20 | apply from: 'versions.gradle'
21 | addRepos(repositories)
22 | dependencies {
23 | classpath deps.android_gradle_plugin
24 | classpath deps.kotlin.plugin
25 | }
26 | }
27 |
28 | allprojects {
29 | addRepos(repositories)
30 | }
31 |
32 | task clean(type: Delete) {
33 | delete rootProject.buildDir
34 | }
35 |
--------------------------------------------------------------------------------
/PagingSample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingSample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/PagingSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/PagingSample/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include ':app'
18 |
--------------------------------------------------------------------------------
/PagingWithNetworkSample/.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 |
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/java/com/android/example/paging/pagingwithnetwork/RedditAppGlideModule.kt:
--------------------------------------------------------------------------------
1 | package com.android.example.paging.pagingwithnetwork
2 |
3 | import com.bumptech.glide.annotation.GlideModule
4 | import com.bumptech.glide.module.AppGlideModule
5 |
6 | @GlideModule
7 | class RedditAppGlideModule : AppGlideModule() {
8 | }
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/java/com/android/example/paging/pagingwithnetwork/reddit/util/PagingRequestHelperExt.kt:
--------------------------------------------------------------------------------
1 | package com.android.example.paging.pagingwithnetwork.reddit.util
2 |
3 | import androidx.lifecycle.LiveData
4 | import androidx.lifecycle.MutableLiveData
5 | import androidx.paging.PagingRequestHelper
6 | import com.android.example.paging.pagingwithnetwork.reddit.repository.NetworkState
7 |
8 | private fun getErrorMessage(report: PagingRequestHelper.StatusReport): String {
9 | return PagingRequestHelper.RequestType.values().mapNotNull {
10 | report.getErrorFor(it)?.message
11 | }.first()
12 | }
13 |
14 | fun PagingRequestHelper.createStatusLiveData(): LiveData {
15 | val liveData = MutableLiveData()
16 | addListener { report ->
17 | when {
18 | report.hasRunning() -> liveData.postValue(NetworkState.LOADING)
19 | report.hasError() -> liveData.postValue(
20 | NetworkState.error(getErrorMessage(report)))
21 | else -> liveData.postValue(NetworkState.LOADED)
22 | }
23 | }
24 | return liveData
25 | }
26 |
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/drawable-hdpi/ic_insert_photo_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/drawable-hdpi/ic_insert_photo_black_48dp.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/drawable-mdpi/ic_insert_photo_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/drawable-mdpi/ic_insert_photo_black_48dp.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/drawable-xhdpi/ic_insert_photo_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/drawable-xhdpi/ic_insert_photo_black_48dp.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/drawable-xxhdpi/ic_insert_photo_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/drawable-xxhdpi/ic_insert_photo_black_48dp.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/drawable-xxxhdpi/ic_insert_photo_black_48dp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/drawable-xxxhdpi/ic_insert_photo_black_48dp.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | #3F51B5
20 | #303F9F
21 | #FF4081
22 |
23 |
--------------------------------------------------------------------------------
/PagingWithNetworkSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/PagingWithNetworkSample/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
18 |
19 | buildscript {
20 | apply from: 'versions.gradle'
21 | addRepos(repositories)
22 | dependencies {
23 | classpath deps.android_gradle_plugin
24 | classpath deps.kotlin.plugin
25 | }
26 | repositories {
27 | google()
28 | }
29 | }
30 |
31 | allprojects {
32 | addRepos(repositories)
33 | }
34 |
35 | task clean(type: Delete) {
36 | delete rootProject.buildDir
37 | }
38 |
--------------------------------------------------------------------------------
/PagingWithNetworkSample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PagingWithNetworkSample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/PagingWithNetworkSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/PagingWithNetworkSample/settings.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | include ':app'
18 |
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/.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 |
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/README.md:
--------------------------------------------------------------------------------
1 | Room with Content Providers Sample
2 | ===================================
3 |
4 | This sample demonstrates how to expose data stored in the Room persistence library with Android's Content Provider
5 | framework.
6 |
7 | License
8 | --------
9 |
10 | Copyright 2017 The Android Open Source Project, Inc.
11 |
12 | Licensed to the Apache Software Foundation (ASF) under one or more contributor
13 | license agreements. See the NOTICE file distributed with this work for
14 | additional information regarding copyright ownership. The ASF licenses this
15 | file to you under the Apache License, Version 2.0 (the "License"); you may not
16 | use this file except in compliance with the License. You may obtain a copy of
17 | the License at
18 |
19 | http://www.apache.org/licenses/LICENSE-2.0
20 |
21 | Unless required by applicable law or agreed to in writing, software
22 | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
23 | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
24 | License for the specific language governing permissions and limitations under
25 | the License.
26 |
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/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 /usr/local/google/home/yaraki/Android/Sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceContentProviderSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceContentProviderSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceContentProviderSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceContentProviderSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceContentProviderSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 | #009688
16 | #00796B
17 | #536DFE
18 |
19 |
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 | ContentProvider Sample
16 |
17 |
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | buildscript {
18 | apply from: 'versions.gradle'
19 | addRepos(repositories)
20 | dependencies {
21 | classpath deps.android_gradle_plugin
22 | }
23 | }
24 |
25 | allprojects {
26 | addRepos(repositories)
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/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 |
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceContentProviderSample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/PersistenceContentProviderSample/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/.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 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/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/florinam/Library/Android/sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
19 | # Uncomment this to preserve the line number information for
20 | # debugging stack traces.
21 | #-keepattributes SourceFile,LineNumberTable
22 |
23 | # If you keep the line number information, uncomment this to
24 | # hide the original source file name.
25 | #-renamesourcefileattribute SourceFile
26 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/java/com/example/android/persistence/migrations/UpdateUserCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.persistence.migrations;
18 |
19 | import androidx.annotation.MainThread;
20 |
21 | /**
22 | * Callback used in notifying when the user has been updated.
23 | */
24 | public interface UpdateUserCallback {
25 |
26 | /**
27 | * Method called when the user was updated.
28 | *
29 | * @param user the updated user.
30 | */
31 | @MainThread
32 | void onUserUpdated(User user);
33 | }
34 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/java/com/example/android/persistence/migrations/UserView.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.persistence.migrations;
18 |
19 | /**
20 | * Specify the contract between the view and the presenter
21 | */
22 | public interface UserView {
23 |
24 | /**
25 | * Display a userName on the screen
26 | *
27 | * @param userName the userName
28 | */
29 | void showUserName(String userName);
30 |
31 | /**
32 | * Hide the userName field.
33 | */
34 | void hideUserName();
35 | }
36 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceMigrationsSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceMigrationsSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceMigrationsSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceMigrationsSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceMigrationsSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceMigrationsSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceMigrationsSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceMigrationsSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceMigrationsSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceMigrationsSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
17 |
18 |
19 | #3F51B5
20 | #303F9F
21 | #FF4081
22 |
23 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 | Persistence Migrations Sample
19 | Update username
20 |
21 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
16 |
17 |
18 |
19 |
20 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/room2/java/com/example/android/persistence/migrations/DateConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.persistence.migrations;
18 |
19 | import androidx.room.TypeConverter;
20 | import java.util.Date;
21 |
22 | public class DateConverter {
23 | @TypeConverter
24 | public static Date toDate(Long timestamp) {
25 | return timestamp == null ? null : new Date(timestamp);
26 | }
27 |
28 | @TypeConverter
29 | public static Long toTimestamp(Date date) {
30 | return date == null ? null : date.getTime();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/app/src/room3/java/com/example/android/persistence/migrations/DateConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2017, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example.android.persistence.migrations;
18 |
19 | import androidx.room.TypeConverter;
20 | import java.util.Date;
21 |
22 | public class DateConverter {
23 | @TypeConverter
24 | public static Date toDate(Long timestamp) {
25 | return timestamp == null ? null : new Date(timestamp);
26 | }
27 |
28 | @TypeConverter
29 | public static Long toTimestamp(Date date) {
30 | return date == null ? null : date.getTime();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | apply from: 'versions.gradle'
5 | addRepos(repositories)
6 |
7 | dependencies {
8 | classpath deps.android_gradle_plugin
9 | }
10 | }
11 |
12 | allprojects {
13 | addRepos(repositories)
14 | }
15 |
16 | task clean(type: Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/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 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/PersistenceMigrationsSample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/PersistenceMigrationsSample/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/WorkManagerSample/.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 | secrets.txt
11 | .settings/
12 | app/release/
--------------------------------------------------------------------------------
/WorkManagerSample/ASSETS_LICENSE.md:
--------------------------------------------------------------------------------
1 | ## Assets License
2 |
3 | * `src/main/assets/images/lit_pier.jpg` courtesy [Romain Guy](https://www.flickr.com/photos/romainguy/)
4 | under [CC-2](https://creativecommons.org/licenses/by/2.0/).
5 | * `src/main/assets/images/parting_ways.jpg` courtesy [Romain Guy](https://www.flickr.com/photos/romainguy/)
6 | under [CC-2](https://creativecommons.org/licenses/by/2.0/).
7 | * `src/main/assets/images/wrong_way.jpg` courtesy [Romain Guy](https://www.flickr.com/photos/romainguy/)
8 | under [CC-2](https://creativecommons.org/licenses/by/2.0/).
9 |
--------------------------------------------------------------------------------
/WorkManagerSample/app/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .idea
3 | .gradle
4 | /local.properties
5 | .DS_Store
6 | build/
7 | /captures
8 | .externalNativeBuild
9 | app/build
10 | build
11 | secrets.txt
12 |
--------------------------------------------------------------------------------
/WorkManagerSample/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
23 | -dontwarn okhttp3.**
24 | -dontwarn okio.**
25 | -dontwarn retrofit2.**
26 |
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/androidTest/assets/test_outputs/grayscale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/androidTest/assets/test_outputs/grayscale.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/assets/images/jetpack.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/assets/images/jetpack.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/assets/images/lit_pier.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/assets/images/lit_pier.jpg
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/assets/images/parting_ways.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/assets/images/parting_ways.jpg
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/assets/images/wrong_way.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/assets/images/wrong_way.jpg
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/java/com/example/background/App.kt:
--------------------------------------------------------------------------------
1 | package com.example.background
2 |
3 | import android.app.Application
4 | import android.util.Log
5 | import androidx.work.Configuration
6 | import androidx.work.WorkManager
7 |
8 | /**
9 | * The [Application]. Responsible for initializing [WorkManager] in [Log.VERBOSE] mode.
10 | */
11 | class App: Application() {
12 | override fun onCreate() {
13 | super.onCreate()
14 | val configuration = Configuration.Builder()
15 | .setMinimumLoggingLevel(Log.VERBOSE)
16 | .build()
17 |
18 | WorkManager.initialize(this, configuration)
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/java/com/example/background/imgur/ImgurService.kt:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * * Copyright (C) 2018 The Android Open Source Project
4 | * *
5 | * * Licensed under the Apache License, Version 2.0 (the "License");
6 | * * you may not use this file except in compliance with the License.
7 | * * You may obtain a copy of the License at
8 | * *
9 | * * http://www.apache.org/licenses/LICENSE-2.0
10 | * *
11 | * * Unless required by applicable law or agreed to in writing, software
12 | * * distributed under the License is distributed on an "AS IS" BASIS,
13 | * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * * See the License for the specific language governing permissions and
15 | * * limitations under the License.
16 | *
17 | */
18 |
19 | package com.example.background.imgur
20 |
21 | import okhttp3.MultipartBody
22 | import retrofit2.Call
23 | import retrofit2.http.Multipart
24 | import retrofit2.http.POST
25 | import retrofit2.http.Part
26 |
27 | /**
28 | * A [retrofit2.Retrofit] interface to the Imgur postImage API.
29 | */
30 | interface ImgurService {
31 | @Multipart
32 | @POST("image")
33 | fun postImage(@Part image: MultipartBody.Part): Call
34 | }
35 |
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 | #607D8B
22 | #455A64
23 | #CFD8DC
24 | #7C4DFF
25 | #212121
26 | #757575
27 | #FFFFFF
28 | #BDBDBD
29 |
30 |
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
18 |
19 |
20 |
21 |
22 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/WorkManagerSample/app/src/main/rs/grayscale.rs:
--------------------------------------------------------------------------------
1 | #pragma version(1)
2 | #pragma rs java_package_name(com.example.background)
3 |
4 | rs_allocation in;
5 | rs_allocation out;
6 | rs_script script;
7 |
8 | uint32_t width;
9 | uint32_t height;
10 |
11 | void root(const uchar4* v_in, uchar4* v_out, const void* usrData, uint32_t x, uint32_t y) {
12 | int r = v_in->r;
13 | int g = v_in->g;
14 | int b = v_in->b;
15 | int gray = (r+g+b)/3;
16 | v_out->r = gray;
17 | v_out->g = gray;
18 | v_out->b = gray;
19 | v_out->a = v_in->a;
20 | }
21 |
22 | void filter() {
23 | rsDebug("Processing image with dimensions for grayscale", width, height);
24 | rsForEach(script, in, out);
25 | }
26 |
--------------------------------------------------------------------------------
/WorkManagerSample/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | apply from: 'versions.gradle'
5 | addRepos(repositories)
6 | dependencies {
7 | classpath deps.android_gradle_plugin
8 | classpath deps.kotlin.plugin
9 | }
10 | }
11 |
12 | allprojects {
13 | addRepos(repositories)
14 | }
15 |
16 | task clean(type: Delete) {
17 | delete rootProject.buildDir
18 | }
19 |
--------------------------------------------------------------------------------
/WorkManagerSample/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 | android.useAndroidX=true
19 | android.enableJetifier=true
--------------------------------------------------------------------------------
/WorkManagerSample/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/matthewzhang007/android-architecture-components/296c08826e35450080328ac2c3870d198627c4c2/WorkManagerSample/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/WorkManagerSample/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/WorkManagerSample/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
--------------------------------------------------------------------------------
/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The Android Open Source Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | #Thu Feb 22 10:53:38 GMT 2018
18 | distributionBase=GRADLE_USER_HOME
19 | distributionPath=wrapper/dists
20 | zipStoreBase=GRADLE_USER_HOME
21 | zipStorePath=wrapper/dists
22 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
23 |
--------------------------------------------------------------------------------
/run_all_tests.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | current_dir=$PWD;
3 | for line in `find . -name 'gradlew'`
4 | do
5 | cd $current_dir;
6 | echo "will run tests for ${line}";
7 | cd $(dirname "${line}");
8 | pwd
9 | #adb shell input keyevent 82 # unlock device
10 | ./gradlew --no-daemon clean test cC;
11 | if [ $? -eq 0 ]
12 | then
13 | echo "tests for ${line} are successful"
14 | else
15 | echo "tests for ${line} FAILED"
16 | exit 1
17 | fi
18 | done
--------------------------------------------------------------------------------
/update_versions.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Copies the master versions.gradle file to each sample, to make them
3 | # compatible with Android Studio's "Import sample" feature.
4 | for line in `find . -name 'gradlew'`
5 | do
6 | p=$(dirname "${line}");
7 | echo "Copying versions.gradle -> ${p}";
8 | cp versions.gradle "$p"
9 |
10 | # remove the "ADMIN" line from the samples themselves
11 | extraArg=""
12 | if [[ $OSTYPE == darwin* ]]; then
13 | # The macOS version of sed requires the backup file extension
14 | # to be specified. Linux requires it not to be.
15 | extraArg=".bak"
16 | fi
17 | sed -i $extraArg 's/.*\[ADMIN\].*//' $p/versions.gradle
18 |
19 | cp gradle-wrapper.properties "$p/gradle/wrapper/."
20 | done
21 | # Remove the generated backup files
22 | echo "Removing backup files"
23 |
24 | # ignore output saying backups not found
25 | find . -name '*.bak' | xargs rm 2> /dev/null
26 |
--------------------------------------------------------------------------------