README.md 4.8 KB
Newer Older
1 2 3
Android Architecture Components samples
===================================

J
Jose Alcérreca 已提交
4
A collection of samples using the [Architecture Components](https://developer.android.com/arch):
5

C
Chris Craik 已提交
6 7 8 9 10
- [Room](https://developer.android.com/topic/libraries/architecture/room)
- [Lifecycle-aware components](https://developer.android.com/topic/libraries/architecture/lifecycle)
- [ViewModels](https://developer.android.com/topic/libraries/architecture/viewmodel)
- [LiveData](https://developer.android.com/topic/libraries/architecture/livedata)
- [Paging](https://developer.android.com/topic/libraries/architecture/paging/)
J
Jisha Abubaker 已提交
11
- [Navigation](https://developer.android.com/topic/libraries/architecture/navigation/)
12
- [ViewBinding](https://developer.android.com/topic/libraries/view-binding)
J
Jisha Abubaker 已提交
13
- [WorkManager](https://developer.android.com/topic/libraries/architecture/workmanager/)
14 15 16

### Samples

17
* **[BasicSample](https://github.com/googlesamples/android-architecture-components/blob/master/BasicSample)** - Shows how to persist data using a SQLite database and Room. Also uses ViewModels and LiveData.
18

19 20
* **[PersistenceContentProviderSample](https://github.com/googlesamples/android-architecture-components/blob/master/PersistenceContentProviderSample)** - Shows how to expose data via a Content Provider using Room.

21
* **[GithubBrowserSample](https://github.com/googlesamples/android-architecture-components/blob/master/GithubBrowserSample)** - An **advanced**  sample that uses the Architecture components, Dagger and the Github API, in Kotlin.
22

J
Jose Alcérreca 已提交
23 24 25 26
* **[BasicRxJavaSample](https://github.com/googlesamples/android-architecture-components/blob/master/BasicRxJavaSample)** - Shows how to use Room with RxJava 2. Also uses ViewModels.

* **[PersistenceMigrationsSample](https://github.com/googlesamples/android-architecture-components/blob/master/PersistenceMigrationsSample)** - Shows how to implement migrations in Room.

F
Florina Muntenescu 已提交
27
* **[BasicRxJavaKotlinSample](https://github.com/googlesamples/android-architecture-components/blob/master/BasicRxJavaSampleKotlin)** - Shows
28 29 30
how to use ViewModels and Room together with RxJava, in Kotlin.

 * **[PagingSample](https://github.com/googlesamples/android-architecture-components/tree/master/PagingSample)** - Shows
31
  how to use the Paging library with Room, in Kotlin.
32

33
 * **[PagingNetworkSample](https://github.com/googlesamples/android-architecture-components/tree/master/PagingWithNetworkSample)** - Shows
34
  how to use the Paging library with a backend API via Retrofit, in Kotlin.
35

C
Chris Craik 已提交
36
* **[NavigationBasicSample](https://github.com/googlesamples/android-architecture-components/tree/master/NavigationBasicSample)** - Shows
J
Jisha Abubaker 已提交
37
  how to use Navigation to perform navigation and deep linking in Kotlin.
38 39 40

* **[NavigationAdvancedSample](https://github.com/googlesamples/android-architecture-components/tree/master/NavigationAdvancedSample)** - Shows
  how to handle multiple back stacks with Navigation and a BottomNavigationView.
41

I
Ian Lake 已提交
42 43 44
* **[LiveDataSample](https://github.com/googlesamples/android-architecture-components/tree/master/LiveDataSample)** - Shows
  how to integrate Kotlin coroutines with Architecture Components such as `LiveData`.

45 46
* **[ViewBindingSample](https://github.com/googlesamples/android-architecture-components/tree/master/ViewBindingSample)** - Shows how to use view bindings in an activity and in fragments.

47
* **[WorkManagerSample](https://github.com/googlesamples/android-architecture-components/tree/master/WorkManagerSample)** - Shows
J
Jisha Abubaker 已提交
48
  how to use WorkManager to do background work, in Kotlin.
49

50 51
* **[WorkManagerMultiprocessSample](https://github.com/googlesamples/android-architecture-components/tree/master/WorkManagerMultiprocessSample)** - Shows how to use WorkManager in apps that manage multiple processes.

52

J
Jose Alcérreca 已提交
53 54 55 56
### Reporting Issues

You can report an [Issue](https://github.com/googlesamples/android-architecture-components/issues) on the samples using this repository. If you find an issue with the Architecture Components, report it using the [Architecture Components Issue Tracker](https://issuetracker.google.com/issues/new?component=197448&template=878802)

57 58 59
License
-------

60
Copyright 2018 The Android Open Source Project, Inc.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75

Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements.  See the NOTICE file distributed with this work for
additional information regarding copyright ownership.  The ASF licenses this
file to you under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.  You may obtain a copy of
the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
License for the specific language governing permissions and limitations under
the License.