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
potatotips-33
Search
Yuya Kaido
September 28, 2016
Programming
680
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
potatotips-33
Yuya Kaido
September 28, 2016
More Decks by Yuya Kaido
See All by Yuya Kaido
droidkaigi-2019
yuyakaido
7
4.9k
matching-dev-meetup-1
yuyakaido
1
240
minami-aoyama-night-6
yuyakaido
1
1.3k
eureka-meetup-10
yuyakaido
0
850
droidkaigi-2018
yuyakaido
4
6.2k
navitime-eureka-1
yuyakaido
0
110
droidkaigi-2017
yuyakaido
11
8.3k
retty-tech-cafe-8
yuyakaido
0
210
mti-eureka-tech-beer
yuyakaido
0
510
Other Decks in Programming
See All in Programming
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
190
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
200
Build-to-own AI: Agentic Development for Humans
inesmontani
PRO
0
130
その節約、円になってますか?
isamumumu
0
530
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
120
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
9
5.8k
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
450
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
110
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
120
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
180
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
490
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
570
Featured
See All Featured
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
560
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Why Our Code Smells
bkeepers
PRO
340
58k
Building Adaptive Systems
keathley
44
3.1k
Technical Leadership for Architectural Decision Making
baasie
3
450
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
230
[SF Ruby Conf 2025] Rails X
palkan
2
1.2k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
230
WCS-LA-2024
lcolladotor
0
770
Transcript
ϖʔδϯάͷ ঢ়ଶཧ͔Β։์͞Ε͍ͨ potatotips #33 yuyakaido
ࣗݾհ • ւ౻༏ʢ͔͍Ͳ͏Ώ͏ʣ • גࣜձࣾΤϨΧ • 1ͷΠϯλʔϯΛܦͯɺ20154݄ʹ৽ଔೖࣾ • ςετ͓͡͞Μ
yuyakaido yuyakaido
ϖʔδϯάͱʁ • ՃಡΈࠐΈ • Ϧετͷ࠷Լ෦ʹ౸ୡͨ͠ΒDBAPI͔Β࣍ ϖʔδͷσʔλΛಡΈࠐΜͰදࣔ͢Δ
ࠓճͷγφϦΦ • RecyclerView • ࠷Լ෦·Ͱ౸ୡͨ͠ΒAPI͔ΒσʔλΛऔಘ • औಘͨ͠σʔλΛ࠷Լ෦ʹՃ
࣮ͯ͠ΈΔ • εΫϩʔϧΛίʔϧόοΫͰड͚औΔ • RecyclerView#OnScrollListener • AbsListView#OnScrollListener • ࠷Լ෦·Ͱ౸ୡͨ͠ΒAPIΛୟ͘
εΫϩʔϧΠϕϯτ recyclerView.scrollEvents() .filter { RecyclerViewUtil.shouldPaginate(layoutManager) } .subscribe({ // Load next
page }) fun shouldPaginate(manager: LinearLayoutManager): Boolean { val totalItemCount = manager.itemCount - 1 val lastVisibleItemPosition = manager.findLastVisibleItemPosition() return totalItemCount == lastVisibleItemPosition } εΫϩʔϧͷݕ ࠷Լ෦ͷఆ
QA͞ΜͱͷΓऔΓ ΞΠςϜ͕ॏෳͯ͠දࣔ͞Ε·͢Ͷ ͦΜͳΘ͚ͳ͍Ζ ɾɾɾ ΄Μ·
Կނͳͷ͔ • ίʔϧόοΫ͕ԿݺΕ͍ͯΔ • Demo
ରॲํ๏ • ಡΈࠐΈதϑϥάΛ࣋ͭ • ϑϥάΛͲ͜ʹ͔࣋ͭ • Activity/FragmentͷϑΟʔϧυ • ཧ͢Δঢ়ଶ͕૿͑ΔͷΠϠ •
ΫϩʔδϟΛ͏ͱ͍͍ײ͡ʹཧͰ͖ΔͷͰ
ΫϩʔδϟͰͷঢ়ଶཧ fun getFetcher(category: Category): () -> Observable<List<Article>> { var isFetching
= false var offset = 0 return fun () = Observable.just(isFetching) .filter { !isFetching } .doOnNext { isFetching = true } .flatMap { repository.getArticles(category, offset) } .doOnNext { isFetching = false } .doOnNext { offset += it.size } } • ಡΈࠐΈதϑϥάͱΦϑηοτΛཧ • ಡΈࠐΈதʹୟ͍ͯԿى͜Βͳ͍ • Activity/Fragment͔ΒΈΔͱɺԿߟ͑ͣʹୟ͚OK
·ͱΊ • ϖʔδϯάͰಡΈࠐΈঢ়ଶΛཧ͢Δඞཁ͋Γ • ঢ়ଶΛΫϥεͷϑΟʔϧυͰཧͨ͘͠ͳ͍ • KotlinΛ͍ͬͯΔ߹ΫϩʔδϟΛɺJavaͷ ߹ແ໊ΫϥεΛ͏ͱͤʹͳΕΔ͔ • https://github.com/yuyakaido/Flow-Android
Thank you :) Credit: NASA Earth Observatory/NOAA NGDC