forked from android/views-widgets-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec691ac
commit 5e29458
Showing
10 changed files
with
102 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
# GOOGLE SAMPLE PACKAGING DATA | ||
# | ||
# This file is used by Google as part of our samples packaging process. | ||
# End users may safely ignore this file. It has no relevance to other systems. | ||
--- | ||
status: PUBLISHED | ||
technologies: [Android] | ||
categories: [Views Widgets] | ||
languages: [Kotlin] | ||
solutions: [Mobile] | ||
github: android/views-widgets | ||
level: INTERMEDIATE | ||
icon: screenshots/icon-web.png | ||
apiRefs: | ||
- androidx.recyclerview.widget.RecyclerView | ||
- androidx.recyclerview.widget.RecyclerView.LayoutManager | ||
- androidx.recyclerview.widget.RecyclerView.ViewHolder | ||
license: apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,52 @@ | ||
#RecyclerView Kotlin | ||
Android RecyclerView Sample (Kotlin) | ||
==================================== | ||
|
||
This application implements a RecyclerView in Kotlin with ListAdapter, onClickListener | ||
and Headers. If you are looking for a simpler sample, look at the RecyclerViewSimple sample | ||
in the directory. | ||
in the directory. | ||
|
||
|
||
Introduction | ||
------------ | ||
|
||
Sample demonstrating the use of [RecyclerView][1] to layout elements with a | ||
[LinearLayoutManager][2]. | ||
|
||
[RecyclerView][1] can display large datasets that can be scrolled | ||
efficiently by recycling a limited number of views. [ListAdapter][3] is used to | ||
efficiently compute diffs when items are added/removed from the list. Click listeners can be | ||
defined when [ViewHolder][4] views are instantiated. | ||
|
||
|
||
[1]: https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView | ||
[2]: https://developer.android.com/reference/androidx/recyclerview/widget/LinearLayoutManager | ||
[3]: https://developer.android.com/reference/androidx/recyclerview/widget/ListAdapter | ||
[4]: https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.ViewHolder | ||
|
||
Pre-requisites | ||
-------------- | ||
|
||
- Android SDK 27 | ||
- Android Gradle Plugin 3.0 | ||
- Android Support Repository | ||
|
||
Screenshots | ||
------------- | ||
|
||
![image](https://user-images.githubusercontent.com/46006059/98028846-8b6df700-1dc3-11eb-9f0b-ad93569be189.png) | ||
|
||
Getting Started | ||
--------------- | ||
|
||
To build this project, use "Import Project" in Android Studio. | ||
|
||
Support | ||
------- | ||
|
||
- Stack Overflow: http://stackoverflow.com/questions/tagged/android | ||
|
||
If you've found an error in this sample, please file an issue: | ||
https://github.com/android/views-widgets | ||
|
||
Patches are encouraged, and may be submitted by forking this project and | ||
submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
RecyclerViewKotlin/app/src/main/res/drawable/ic_add_black_24dp.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
RecyclerViewKotlin/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters