Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Recycler View - Android Alliance March 2016
Search
Yash Prabhu
March 30, 2016
Technology
220
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Recycler View - Android Alliance March 2016
An intro to RecyclerView
Yash Prabhu
March 30, 2016
More Decks by Yash Prabhu
See All by Yash Prabhu
Getting Started with Conference Speaking
yprabhu
0
250
DroidCon NYC 2019: Being more than an Android developer
yprabhu
0
190
Keynote: Being more than an Android Developer
yprabhu
4
1.5k
Intro to Augmented Reality on Android
yprabhu
0
200
ElaConf2017
yprabhu
1
630
Onboarding Engineers
yprabhu
1
340
Mastering Android's App Resources
yprabhu
5
950
Chicago Roboto - Design Develop Deploy!
yprabhu
2
550
DroidCon NYC 2016 - A Material Design guide for Android developers
yprabhu
2
600
Other Decks in Technology
See All in Technology
AIツールを導入しても生産性はあがらない? カオナビが直面した 3つの壁と乗り越え方。/ Overcoming 3 Barriers to AI-Driven Productivity at kaonavi
kaonavi
0
1.3k
AIは実装を速くする。では、私たちは何を今作るべきか?-立場を越えてリリースに向き合ったチーム開発の実践 / 20260801 Hiromi Nakaya and Naoki Takahashi
shift_evolve
PRO
3
180
『三匹の子ぶた』から学ぶネットワークセキュリティの昔と今 / Network Security: Then and Now Through the Lens of The Three Little Pigs
nttcom
1
710
AI ネイティブな組織に Gemini Enterprise Agent Platform がなぜ必要なのか
asei
1
140
データエンジニアこそ組織のオントロジーに向き合うべき — 問いに答えるAIから、事業を動かすAIへ
gappy50
7
3k
AI時代の強いチームの作り方
yuukiyo
23
13k
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
53k
現場で使える AWS DevOps Agent 活用ノウハウ - Release Management 機能の検証結果を添えて / AWS DevOps Agent Release Management and Know-How
kinunori
5
840
AIがAPIを書く時代に、私たちは何を設計すべきか
nagix
0
200
AIQAのナレッジ構築について
qatonchan
1
140
論語・武士道・産業革命から見る かわるもの、かわらないもの
ichimichi
8
2.1k
Pavlokで始める電撃駆動開発
sgrsn
0
140
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
230
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
200
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Building Applications with DynamoDB
mza
96
7.1k
The Curse of the Amulet
leimatthew05
2
13k
Making the Leap to Tech Lead
cromwellryan
135
10k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Transcript
RecyclerView Yash Prabhu @yashvprabhu github.com/yprabhu yprabhu.com dramafever.com
What is RecyclerView?
What does it look like?
Under the hood Recycler View Layout Manager Adapter Dataset Item
Animator
Show me the code! compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:recyclerview-v7:23.1.1'
Add RecyclerView to your layout <android.support.v7.widget.RecyclerView android:id="@+id/my_recycler_view" android:scrollbars="vertical" android:layout_width="match_parent" android:layout_height="match_parent"/>
View Item <?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android. com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="300dp"
android:layout_height="300dp" android:layout_margin="@dimen/spacing"> <ImageView android:id="@+id/image" android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="centerCrop" tools:src="@mipmap/ic_launcher" /> <TextView android:id="@+id/text" android:layout_width="match_parent" android:layout_height="60dp" android:layout_gravity="bottom" android:textColor="@android:color/white" android:gravity="center" android:background="#80222222" android:padding="@dimen/spacing" tools:text
Show me the code! setContentView(R.layout.recycler_layout); recyclerView = (RecyclerView) findViewById(R.id.my_recycler_view); recyclerView.setHasFixedSize(true);
adapter = new RecyclerAdapter(items, R.layout.grid_view_item); recyclerView.setAdapter(adapter); layoutManager = new GridLayoutManager(this, spanCount); recyclerView.setLayoutManager(layoutManager); recyclerView.setItemAnimator(new DefaultItemAnimator());
Demo RecyclerViewExample
When should I use a RecyclerView?
RecyclerView Yash Prabhu @yashvprabhu github.com/yprabhu yprabhu.com dramafever.com