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
RxJava Droidkaigi
Search
kazy1991
February 20, 2016
Technology
1
90
RxJava Droidkaigi
Droidkaigi 2016で発表した資料です。
kazy1991
February 20, 2016
Tweet
Share
More Decks by kazy1991
See All by kazy1991
基本のAndroid View開発ドキュメント
kazy1991
0
2.6k
Cookpad.apk#1-ReactNativeについて
kazy1991
1
6.3k
いつか使ってみたいOperatorたち
kazy1991
0
460
Cookpad TechKitchen#6-android-with-ml-and-scheduler
kazy1991
0
700
Droidkaigi 2017
kazy1991
5
12k
rx.pdf
kazy1991
0
140
はじめてのvimscipt
kazy1991
1
450
Other Decks in Technology
See All in Technology
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
170
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
2
110
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
37
15k
第3回Snowflake女子会_LT登壇資料(合成データ)_Taro_CCCMK
tarotaro0129
0
200
生成AIをより賢く エンジニアのための RAG入門 - Oracle AI Jam Session #20
kutsushitaneko
4
260
事業貢献を考えるための技術改善の目標設計と改善実績 / Targeted design of technical improvements to consider business contribution and improvement performance
oomatomo
0
100
DevFest 2024 Incheon / Songdo - Compose UI 조합 심화
wisemuji
0
120
KnowledgeBaseDocuments APIでベクトルインデックス管理を自動化する
iidaxs
1
270
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
210
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
開発生産性向上! 育成を「改善」と捉えるエンジニア育成戦略
shoota
2
400
AWS re:Invent 2024で発表された コードを書く開発者向け機能について
maruto
0
200
Featured
See All Featured
Navigating Team Friction
lara
183
15k
Building Applications with DynamoDB
mza
91
6.1k
Writing Fast Ruby
sferik
628
61k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Language of Interfaces
destraynor
154
24k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Typedesign – Prime Four
hannesfritz
40
2.4k
A Tale of Four Properties
chriscoyier
157
23k
Git: the NoSQL Database
bkeepers
PRO
427
64k
4 Signs Your Business is Dying
shpigford
181
21k
Scaling GitHub
holman
458
140k
Transcript
僇傈ַ⢪ִ 3Y+BWB걼⳿ػة٦ٝ
し歊♰鰛 LB[VLJZPTIJEB 荈䊹稱➜ 䎃䏝ך倜⼼Ⰵ爡➙➬✲דכBOESPJEꨄגSBJMT剅ְגתׅկկ DPPLQBE*OD RJJUBLB[Z HJUIVCLB[Z UXJUUFS!LB[
し歊♰鰛 DPPLQBE*OD RJJUBLB[Z HJUIVCLB[Z UXJUUFS!LB[ LB[VLJZPTIJEB 荈䊹稱➜ LB[Z ַׄ٦ דֶיְָ׃תׅ
ְֲֲֿ➂ח耀ְגק׃ְ 3Y+BWBךⰅ鎸✲铣דծ ➬✲ד⢪גְה䙼גְ倯 PS 醱꧟ז➬圫䭯א،فٔ涪׃גְגծ 剑鵚㹋鄲ך鋅鸐׃ָ䝤ֻזגֹה䠬ׄ倯 ءٝفٕז،فٔ أؙٔ٦ٝ"1*ؙٔؒأز ך㜥さכծ3Y+BWB㼪Ⰵ׃גֿתדًٔحزזְַ׃תׇկ
➙傈鑧ֿׅה ➙傈כ3Y+BWB⢪ "1*הךꬊず劍Ⳣ椚חאְג鑧׃תׅ 3Y+BWBחכ➭חծ4VCKFDU⢪31涸ז⢪ְ倯װծKBWBך4USFBN"1*ך➿欽ה׃ג⢪ְ倯זו֮תׅկ
ז"1*הךꬊず劍Ⳣ椚ח鑧穾ךַ 葿ղז俑腞ך鑧ָ幉ׄהַֽזֻז "1*הךꬊず劍Ⳣ椚ח㔭ג➂ָ♧殢㢳ֲ "1*הךꬊず劍Ⳣ椚ַ3Y+BWB㨣ךָؔأأً ז"1*הךꬊず劍Ⳣ椚ח鑧穾ךַ $PPLQBEך،فٔ3Y+BWB⢪גְךכծקהוָ"1*הךꬊず劍Ⳣ椚ך鿇ⴓדׅկ
ז3Y+BWBאֲַךַ 3Y+BWBכוך״ֲז㉏겗鍑寸ׅךַ
ꬊず劍؝٦ٕغحؙך铬겗 ꬊず劍؝٦ٕغحؙ儗➿ך铬겗 HFU"DUJWJUZ OVMM㉏겗 'SBHNFOUⰻדך؝٦ٕغحؙⳢ椚דضٕهׅ ꬊず劍؝٦ٕغحؙך⚛⻉湫⻉זו醱꧟ז㹋鄲ׅה 〳铣䚍⡚ֻծ爡ⰻדكأزفؙٓذ؍أָ 㹀תגזַ 鑫׃ֻכֿחծIUUQUFDIMJGFDPPLQBEDPNFOUSZ
הٖ֮ءؾ؟٦ؽأך嗚稊歗ך⢽ 3Y+BWBⵃ欽ׅה 知⽃חⳢ椚ָٓ؎ؿ؟؎ؙٕחCJOE⳿勻կ BOE 醱꧟ז➬圫דծ䓼⸂זؔلٖ٦ة٦⢪ֲֿהדծ 㹑鎉涸ח鎸鶢ָ〳腉חז〳铣䚍䬐⥂ׁկ ؔلٖ٦ة٦הכ0CTFSWBCMFַ鷏גֻ⦼㢌䳔ׅꟼ侧纇דׅկ
הٖ֮ءؾ؟٦ؽأך嗚稊歗ך⢽ הٖ֮ءؾ؟٦ؽأך嗚稊歗⡲鑧⢽חծ 3Y+BWBך걼⳿ػة٦ְֻٝאַ׀稱➜׃תׅկ DPPLQBEDPNהכⰋֻꟼ⤘זְךה罋ִג♴ְׁ
#FGPSF3Y+BWB儗➿ כׄחꬊず劍؝٦ٕغحؙ⢪גծ 嗚稊歗㹋鄲׃גתׅկ
#FGPSF3Y+BWB儗➿ public interface Callback { void onSuccess(List<Recipe> recipes); void onError(Throwable
t); } public void searchRecipe(String keyword, Callback callback) { recipeApiClient.search(keyword, callback); } ⢽ ٖءؾ嗚稊ׅꬊず劍Ⳣ椚ך؝٦س
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ 铣鴥דְתׅ
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ 铣鴥דְתׅ
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ 铣鴥דְתׅ
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ !
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ ! !
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ ! ! !
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ ! ! ! !
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊ח㣟侁׃㜥さ 铣鴥דְתׅ
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊ח㣟侁׃㜥さ 铣鴥דְתׅ
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊ח㣟侁׃㜥さ 铣鴥דְתׅ
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊ח㣟侁׃㜥さ
#FGPSF3Y+BWB儗➿ searchRecipe(“εςʔΩ”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ addToList(recipes); } @Override public void onError(Throwable t) { showErrorView(t); } }); } ⢽ չأذ٦ؗպךٖءؾ嗚稊ח㣟侁׃㜥さ ٔٗ٦سׅ 铣鴥ח㣟侁׃ת׃ "
3Y+BWBך㼪Ⰵ ➙ךⳢ椚3Y+BWBד剅ֹ䳔ִגתׅկ
3Y+BWB㼪Ⰵך㛇燉 3Y+BWBךؙٓأ⢪ִ״ֲחׅח CVJMEHSBEMFח⣛㶷鷄⸇׃ת׃׳ֲկ # app/build.gradle dependencies { compile 'io.reactivex:rxjava:1.1.1' compile
'io.reactivex:rxandroid:1.1.0' } 植㖈WFSָ剑倜דׅկSY"OESPJEחאְגכ䖓קו稱➜׃תׅկ
0CTFSWBCMFך⡲倯 TFBSDI3FDJQFًاحس0CTFSWBCMFח㢌䳔׃תׅ public void searchRecipe(String keyword, Callback callback) { recipeApiClient.search(keyword,
callback); }
0CTFSWBCMFך⡲倯 TFBSDI3FDJQFًاحس0CTFSWBCMFח㢌䳔׃תׅ public void searchRecipe(String keyword, Callback callback) { recipeApiClient.search(keyword,
callback); }
0CTFSWBCMFך⡲倯 TFBSDI3FDJQFًاحس0CTFSWBCMFח㢌䳔׃תׅ public void searchRecipe(String keyword, Callback callback) { recipeApiClient.search(keyword,
callback); }
0CTFSWBCMFך⡲倯 public void searchRecipe(String keyword) { recipeApiClient.search(keyword, new Callback()
{ @Override public void onSuccess(List<Recipe> recipes) { } @Override public void onError(Throwable t) { } }); } 痥✳䒷侧ךDBMMCBDL嶊׃גⰻ鿇ד搀せؙٓأ⡲תׅ
0CTFSWBCMFך⡲倯 public void searchRecipe(String keyword) { recipeApiClient.search(keyword, new Callback()
{ @Override public void onSuccess(List<Recipe> recipes) { } @Override public void onError(Throwable t) { } }); } 痥✳䒷侧ךDBMMCBDL嶊׃גⰻ鿇ד搀せؙٓأ⡲תׅ
0CTFSWBCMFך⡲倯 public Observable<List<Recipe>> searchRecipe(String keyword) { recipeApiClient.search(keyword, new Callback()
{ @Override public void onSuccess(List<Recipe> recipes) { } @Override public void onError(Throwable t) { } }); } 鵤⦼0CTFSWBCMF-JTU3FDJQFח㢌刿׃תׅ ֿך儗挿דכծ؝ٝػ؎ٕؒٓ٦חזתׅկ
0CTFSWBCMFך⡲倯 public Observable<List<Recipe>> searchRecipe(String keyword) { recipeApiClient.search(keyword, new Callback()
{ @Override public void onSuccess(List<Recipe> recipes) { } @Override public void onError(Throwable t) { } }); } 鵤⦼0CTFSWBCMF-JTU3FDJQFח㢌刿׃תׅ ֿך儗挿דכծ؝ٝػ؎ٕؒٓ٦חזתׅկ
0CTFSWBCMFך⡲倯 ⰻ鿇ךⳢ椚0CTFSWBCMFד⺪ת׃׳ֲ public Observable<List<Recipe>> searchRecipe(String keyword) { return Observable.create(subscriber ->
{ }); } void recipeApiClient.search(keyword, new Callback() { @Override public void onSuccess(List<Recipe> recipes) { } @Override public void onError(Throwable t) { } }); 0CTFSWBCMFכ؝ٝأزؙٓةָꦀ誊ׁגְךדծ0CTFSWBCMFDSFBUF穗歋ד؎ٝأةٝأ⡲תׅկ
0CTFSWBCMFך⡲倯 0CTFSWBCMFך⚥חٗآحؙ剅ֹת׃׳ֲ public Observable<List<Recipe>> searchRecipe(String keyword) { return Observable.create(subscriber ->
{ recipeApiClient.search(keyword, new Callback() { @Override public void onSuccess(List<Recipe> recipes) { } @Override public void onError(Throwable t) { } }); }); } void
0CTFSWBCMFך⡲倯 TVCTDSJCFSח؎كٝز鸐濼׃ג֮־״ֲ public Observable<List<Recipe>> searchRecipe(String keyword) { return Observable.create(subscriber ->
{ recipeApiClient.search(keyword, new Callback() { @Override public void onSuccess(List<Recipe> recipes) { subscriber.onNext(recipes);// イベントの通知 subscriber.onCompleted(); // 全イベントが終了した通知 } @Override public void onError(Throwable t) { subscriber.onError(t); // 処理内で失敗した通知 } }); }); } void ֿד0CTFSWBCMF⻉כ㸣䧭דׅկ
0CTFSWBCMFך⡲倯 TVCTDSJCFSח؎كٝز鸐濼׃ג֮־״ֲ public Observable<List<Recipe>> searchRecipe(String keyword) { return Observable.create(subscriber ->
{ recipeApiClient.search(keyword, new Callback() { @Override public void onSuccess(List<Recipe> recipes) { subscriber.onNext(recipes);// イベントの通知 subscriber.onCompleted(); // 全イベントが終了した通知 } @Override public void onError(Throwable t) { subscriber.onError(t); // 処理内で失敗した通知 } }); }); } void ֿד0CTFSWBCMF⻉כ㸣䧭דׅկ
0CTFSWBCMFך⡲倯 TVCTDSJCFSח؎كٝز鸐濼׃ג֮־״ֲ public Observable<List<Recipe>> searchRecipe(String keyword) { return Observable.create(subscriber ->
{ recipeApiClient.search(keyword, new Callback() { @Override public void onSuccess(List<Recipe> recipes) { subscriber.onNext(recipes);// イベントの通知 subscriber.onCompleted(); // 全イベントが終了した通知 } @Override public void onError(Throwable t) { subscriber.onError(t); // 処理内で失敗した通知 } }); }); } void ֿד0CTFSWBCMF⻉כ㸣䧭דׅկ
ず劍ًاحسך0CTFSWBCMF⻉ public List<Recipe> searchRecipe(String keyword) throws HttpException { // okhttpͱ͔HttpClientͰಉظ௨৴
} public Observable<List<Recipe>> searchRecipe(String keyword) { return Observable.create(subscriber -> { try{ List<Recipe> recipes = ApiClient.search(keyword); subscriber.onNext(recipes); subscriber.onFinished(); } catch(HttpException e) { subscriber.onError(e); } } ⡭锑 ず劍ًاحس0CTFSWBCMF⻉ׅ㜥さ 搀꼽זأٖحس欰䧭鼘ֽחծ0CTFSWBCMFך⚥魦כ⳿勻ꣲず劍Ⳣ椚ח׃ת׃׳ֲկ
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribe(new Subscriber<List<Recipe>>() { @Override public void onNext(List<Recipe> recipe)
{ addToList(recipes); } @Override public void onError(Throwable e) { showErrorMessage(t); } @Override public void onCompleted() { }); ); ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ 3Y晛 铣鴥דְתׅ
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribe(new Subscriber<List<Recipe>>() { @Override public void onNext(List<Recipe> recipe)
{ addToList(recipes); } @Override public void onError(Throwable e) { showErrorMessage(t); } @Override public void onCompleted() { }); ); ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ 3Y晛 铣鴥דְתׅ
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribe(new Subscriber<List<Recipe>>() { @Override public void onNext(List<Recipe> recipe)
{ addToList(recipes); } @Override public void onError(Throwable e) { showErrorMessage(t); } @Override public void onCompleted() { }); ); ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ 3Y晛 铣鴥דְתׅ
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribe(new Subscriber<List<Recipe>>() { @Override public void onNext(List<Recipe> recipe)
{ addToList(recipes); } @Override public void onError(Throwable e) { showErrorMessage(t); } @Override public void onCompleted() { }); ); ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ 3Y晛
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribe(new Subscriber<List<Recipe>>() { @Override public void onNext(List<Recipe> recipe)
{ addToList(recipes); } @Override public void onError(Throwable e) { showErrorMessage(t); } @Override public void onCompleted() { }); ); ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ 3Y晛 !
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribe(new Subscriber<List<Recipe>>() { @Override public void onNext(List<Recipe> recipe)
{ addToList(recipes); } @Override public void onError(Throwable e) { showErrorMessage(t); } @Override public void onCompleted() { }); ); ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ 3Y晛 ! !
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribe(new Subscriber<List<Recipe>>() { @Override public void onNext(List<Recipe> recipe)
{ addToList(recipes); } @Override public void onError(Throwable e) { showErrorMessage(t); } @Override public void onCompleted() { }); ); ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ 3Y晛 ! ! !
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribe(new Subscriber<List<Recipe>>() { @Override public void onNext(List<Recipe> recipe)
{ addToList(recipes); } @Override public void onError(Throwable e) { showErrorMessage(t); } @Override public void onCompleted() { }); ); ⢽ չأذ٦ؗպךٖءؾ嗚稊׃גٔأزח鷄⸇ 3Y晛 ! ! ! !
-BNCEBⵃ欽׃㜥さ searchRecipe(“εςʔΩ”) .subscribe(recipes -> { addToList(recipes); }, throwable -> {
showErrorMessage(t); }, () -> { // লུՄೳ } ); 0CTFSWBCMFTVCTDSJCF חכٓيت䒭床ֿׅה⳿勻 铣鴥דְתׅ +BWBָ⢪ִ橆㞮ד֮לծSYGVODUJPOT"DUJPOהSYGVODUJPOT"DUJPOָٓيتח㢌䳔דֹתׅկ
-BNCEBⵃ欽׃㜥さ searchRecipe(“εςʔΩ”) .subscribe(recipes -> { addToList(recipes); }, throwable -> {
showErrorMessage(t); }, () -> { // লུՄೳ } ); 0CTFSWBCMFTVCTDSJCF חכٓيت䒭床ֿׅה⳿勻 铣鴥דְתׅ +BWBָ⢪ִ橆㞮ד֮לծSYGVODUJPOT"DUJPOהSYGVODUJPOT"DUJPOָٓيتח㢌䳔דֹתׅկ
-BNCEBⵃ欽׃㜥さ searchRecipe(“εςʔΩ”) .subscribe(recipes -> { addToList(recipes); }, throwable -> {
showErrorMessage(t); }, () -> { // লུՄೳ } ); 0CTFSWBCMFTVCTDSJCF חכٓيت䒭床ֿׅה⳿勻 +BWBָ⢪ִ橆㞮ד֮לծSYGVODUJPOT"DUJPOהSYGVODUJPOT"DUJPOָٓيتח㢌䳔דֹתׅկ
-BNCEBⵃ欽׃㜥さ searchRecipe(“εςʔΩ”) .subscribe(recipes -> { addToList(recipes); }, throwable -> {
showErrorMessage(t); }, () -> { // লུՄೳ } ); 0CTFSWBCMFTVCTDSJCF חכٓيت䒭床ֿׅה⳿勻 ! ! ! ! +BWBָ⢪ִ橆㞮ד֮לծSYGVODUJPOT"DUJPOהSYGVODUJPOT"DUJPOָٓيتח㢌䳔דֹתׅկ
-BNCEBⵃ欽׃㜥さ 姻然חכծ0CTFSWBCMFך㹋鄲ח״גطحزٙ٦ؙⳢ椚ָ6*أٖحسד㹋遤ׁגؙٓحءُ׃תׅկ 㹋כתծ姻䌢ח⹛ֹתׇ!
0CTFSWBCMFך㹋遤أٖحس㉏겗 0CTFSWBCMFחず劍㹋遤ꬊず劍㹋遤ך嚊䙀כזְ 䭷㹀ךזְ㜥さך0CTFSWBCMFך㹋遤أٖحسךⴻ倖כꨇ׃ְךדծ4DIFEVMFSכ嫣㔐䭷㹀׃ת׃׳ֲկ
0CTFSWBCMFך㹋遤أٖحس㉏겗 0CTFSWBCMFחず劍㹋遤ꬊず劍㹋遤ך嚊䙀כזְ 䭷㹀ךזְ㜥さך0CTFSWBCMFך㹋遤أٖحسךⴻ倖כꨇ׃ְךדծ4DIFEVMFSכ嫣㔐䭷㹀׃ת׃׳ֲկ
0CTFSWBCMFך㹋遤أٖحس㉏겗 0CTFSWBCMFחず劍㹋遤ꬊず劍㹋遤ך嚊䙀כזְ 䭷㹀ָזְ㜥さכ 㛇劤涸ח ㄎלأٖحسד㹋遤ׁ 䭷㹀ךזְ㜥さך0CTFSWBCMFך㹋遤أٖحسךⴻ倖כꨇ׃ְךדծ4DIFEVMFSכ嫣㔐䭷㹀׃ת׃׳ֲկ
0CTFSWBCMFך㹋遤أٖحس㉏겗 0CTFSWBCMFחず劍㹋遤ꬊず劍㹋遤ך嚊䙀כזְ 䭷㹀ָזְ㜥さכ 㛇劤涸ח ㄎלأٖحسד㹋遤ׁ 䭷㹀ךזְ㜥さך0CTFSWBCMFך㹋遤أٖحسךⴻ倖כꨇ׃ְךדծ4DIFEVMFSכ嫣㔐䭷㹀׃ת׃׳ֲկ
0CTFSWBCMFך㹋遤أٖحس㉏겗 0CTFSWBCMFחず劍㹋遤ꬊず劍㹋遤ך嚊䙀כזְ 䭷㹀ָזְ㜥さכ 㛇劤涸ח ㄎלأٖحسד㹋遤ׁ 4DIFEVMFS⢪ג僇爙涸ח㹋遤أٖحس䭷㹀׃ת׃׳ֲ 䭷㹀ךזְ㜥さך0CTFSWBCMFך㹋遤أٖحسךⴻ倖כꨇ׃ְךדծ4DIFEVMFSכ嫣㔐䭷㹀׃ת׃׳ֲկ
HFU"DUJWJUZOVMM㉏겗 0CTFSWBCMFTVCTDSJCF0O 0CTFSWBCMFPCTFSWF0O 4DIFEVMFSח״㹋遤أٖحسךⵖ䖴
0CTFSWBCMFTVCTDSJCF0O 0CTFSWBCMFTVCTDSJCF0Oחאְג searchRecipeBy(“εςʔΩ”) .map(recipes -> { /* todo something */
}) .subscribeOn(Schedulers.io()) .map(recipes -> { /* todo something */ }) .subscribe(recipes -> {}); 0CTFSWBCMFⰋ⡤ך㹋遤أٖحس䭷㹀ׅؔلٖ٦ة٦ וֿד䭷㹀׃גꟼ⤘זְ 醱侧㔐䭷㹀ׁ㜥さכծ♧殢♳ד䭷㹀ׁךָ黝䘔ׁ
0CTFSWBCMFTVCTDSJCF0O 0CTFSWBCMFTVCTDSJCF0Oחאְג searchRecipeBy(“εςʔΩ”) .map(recipes -> { /* todo something */
}) .subscribeOn(Schedulers.io()) .map(recipes -> { /* todo something */ }) .subscribe(recipes -> {}); 0CTFSWBCMFⰋ⡤ך㹋遤أٖحس䭷㹀ׅؔلٖ٦ة٦ וֿד䭷㹀׃גꟼ⤘זְ 醱侧㔐䭷㹀ׁ㜥さכծ♧殢♳ד䭷㹀ׁךָ黝䘔ׁ 4DIFEVMFSTJP כ♳ꣲךזְأٖحسف٦ַٕأٖحسⶴ䔲גגֻתׅկ ⰋגךⳢ椚ָTDIFEVMFSTJP ָⶴ䮶 ٙ٦ؕ٦أٖحسד㹋遤ׁ
0CTFSWBCMFPCTFSWF0O 0CTFSWBCMFPCTFSWF0Oחאְג searchRecipeBy(“εςʔΩ”) .map(recipes -> { /* todo something */
}) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .map(recipes -> { /* todo something */ }) .observeOn(Schedulers.io()) .subscribe(recipes -> {}); 0CTFSWBCMFַちֹ⳿ׁ⦼「ֽ《أٖحسⴖ剏ִ 䭷㹀ׁ皘䨽״♴ךؔلٖ٦ة٦ךأٖحسָ㢌刿ׁ ًاحسثؑ٦ٝך⚥ד醱侧㔐ㄎן⳿ֿׅה⳿勻
0CTFSWBCMFPCTFSWF0O 0CTFSWBCMFPCTFSWF0Oחאְג searchRecipeBy(“εςʔΩ”) .map(recipes -> { /* todo something */
}) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .map(recipes -> { /* todo something */ }) .observeOn(Schedulers.io()) .subscribe(recipes -> {}); 0CTFSWBCMFַちֹ⳿ׁ⦼「ֽ《أٖحسⴖ剏ִ 䭷㹀ׁ皘䨽״♴ךؔلٖ٦ة٦ךأٖحسָ㢌刿ׁ ًاحسثؑ٦ٝך⚥ד醱侧㔐ㄎן⳿ֿׅה⳿勻 ٙ٦ؕ٦أٖحس ד㹋遤ׁ 6*أٖحسד㹋遤ׁ ٙ٦ؕ٦أٖحس ד㹋遤ׁ ➭ך涪罏ָ幉✉׃ַיזְךדծPCTFSWF0O醱侧㔐ㄎעךכ֮ת⢪ְֻזְדׅיկ
4DIFEVMFSⵃ欽儗ךذٝفٖ 4DIFEVMFSך䭷㹀ך״ֻ֮ػة٦ٝ searchRecipeBy(“εςʔΩ”) .map(recipes -> { /* todo something */
}) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> {}); 0CTFSWBCMF⿹ןNBQזוךؔلٖ٦ة٦ָٙ٦ؕ٦أٖحسד㹋遤ׁծ TVCTDSJCFח床׃4VCTDSJCFS "DUJPO ָ6*أٖحسד㹋遤ׁתׅկ
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addToList(recipes); }, throwable
-> { showErrorMessage(t); } ); ٖءؾ嗚稊ך㹋鄲ח4DIFEVMFSך䭷㹀鎸鶢 铣鴥דְתׅ ֿדծ0CTFSWBCMF⻉ ךㄎ⳿׃תדָ姻׃ֻ遤״ֲחזת׃կ
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addToList(recipes); }, throwable
-> { showErrorMessage(t); } ); ٖءؾ嗚稊ך㹋鄲ח4DIFEVMFSך䭷㹀鎸鶢 铣鴥דְתׅ ֿדծ0CTFSWBCMF⻉ ךㄎ⳿׃תדָ姻׃ֻ遤״ֲחזת׃կ
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addToList(recipes); }, throwable
-> { showErrorMessage(t); } ); ٖءؾ嗚稊ך㹋鄲ח4DIFEVMFSך䭷㹀鎸鶢 ֿדծ0CTFSWBCMF⻉ ךㄎ⳿׃תדָ姻׃ֻ遤״ֲחזת׃կ
3Y+BWB㼪Ⰵך㛇燉 searchRecipe(“εςʔΩ”) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addToList(recipes); }, throwable
-> { showErrorMessage(t); } ); ٖءؾ嗚稊ך㹋鄲ח4DIFEVMFSך䭷㹀鎸鶢 ! ! ! ! ֿדծ0CTFSWBCMF⻉ ךㄎ⳿׃תדָ姻׃ֻ遤״ֲחזת׃կ
HFU"DUJWJUZOVMM㉏겗 HFU"DUJWJUZ OVMM㉏겗
HFU"DUJWJUZOVMM㉏겗 HFU"DUJWJUZ OVMM㉏겗הכ 'SBHNFOUⰻךꬊず劍Ⳣ椚ָ鵤גֻחծ "DUJWJUZָ灶唱ׁהծ؝٦ٕغحؙⰻד鍑佝ׁ ؎ٝأةٝأח،ؙإأ׃㜥さضٕهָ涪欰ׅ
HFU"DUJWJUZOVMM㉏겗 searchRecipeBy(“ϋϯόʔά”, new Callback() { @Override public void onSuccess(List<Recipe> recipes)
{ if(getActivity() == null) { return; } addToList(recipes); } @Override public void onError(Throwable t) { if(getActivity() == null) { return; } showErrorMessage(t); } }); } HFU"DUJWJUZ OVMM㉏겗ח㼎䘔 ꬊず劍؝٦ٕغحؙ晛
HFU"DUJWJUZOVMM㉏겗 3Y+BWBד涪ׅ㜥さכծ USFMMP3Y-JGFDZDMF⢪ג㼎䘔׃ת׃׳ֲ 4VCTDSJQUJPOⵃ欽ׅ倯岀ָ♧菙涸דָׅծعؤه؎ٝزך㼰זְ3Y-JGFDZDMF稱➜׃תׅկ # app/build.gradle dependencies { compile 'com.trello:rxlifecycle:0.4.0'
compile 'com.trello:rxlifecycle-components:0.4.0' }
HFU"DUJWJUZOVMM㉏겗 searchRecipeBy(“ϋϯόʔά”) .compose(bindToLifecycle()) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addList(recipes); },
throwable -> { showErrorMessage(t); } ); HFU"DUJWJUZ OVMM㉏겗ח㼎䘔 3Y晛 3Y"DUJWJUZ竰䪫ׅ䗳銲ָ֮תָׅծ傀㶷ך#BTF"DUJWJUZח穈鴥ֿה㺁僒דׅկ 铣鴥דְתׅ
HFU"DUJWJUZOVMM㉏겗 searchRecipeBy(“ϋϯόʔά”) .compose(bindToLifecycle()) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addList(recipes); },
throwable -> { showErrorMessage(t); } ); HFU"DUJWJUZ OVMM㉏겗ח㼎䘔 3Y晛 3Y"DUJWJUZ竰䪫ׅ䗳銲ָ֮תָׅծ傀㶷ך#BTF"DUJWJUZח穈鴥ֿה㺁僒דׅկ 铣鴥דְתׅ
HFU"DUJWJUZOVMM㉏겗 searchRecipeBy(“ϋϯόʔά”) .compose(bindToLifecycle()) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addList(recipes); },
throwable -> { showErrorMessage(t); } ); HFU"DUJWJUZ OVMM㉏겗ח㼎䘔 3Y晛 3Y"DUJWJUZ竰䪫ׅ䗳銲ָ֮תָׅծ傀㶷ך#BTF"DUJWJUZח穈鴥ֿה㺁僒דׅկ
HFU"DUJWJUZOVMM㉏겗 searchRecipeBy(“ϋϯόʔά”) .compose(bindToLifecycle()) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addList(recipes); },
throwable -> { showErrorMessage(t); } ); HFU"DUJWJUZ OVMM㉏겗ח㼎䘔 3Y晛 3Y"DUJWJUZ竰䪫ׅ䗳銲ָ֮תָׅծ傀㶷ך#BTF"DUJWJUZח穈鴥ֿה㺁僒דׅկ ! ! ! !
HFU"DUJWJUZOVMM㉏겗 searchRecipeBy(“ϋϯόʔά”) .compose(bindToLifecycle()) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addList(recipes); },
throwable -> { showErrorMessage(t); } ); ׃ծٖءؾ嗚稊穠卓ָ鵤גֻח歗ָ䨱גְծ 铣鴥דְתׅ 3Y"DUJWJUZ竰䪫ׅ䗳銲ָ֮תָׅծ傀㶷ך#BTF"DUJWJUZח穈鴥ֿה㺁僒דׅկ
HFU"DUJWJUZOVMM㉏겗 searchRecipeBy(“ϋϯόʔά”) .compose(bindToLifecycle()) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addList(recipes); },
throwable -> { showErrorMessage(t); } ); ׃ծٖءؾ嗚稊穠卓ָ鵤גֻח歗ָ䨱גְծ 3Y"DUJWJUZ竰䪫ׅ䗳銲ָ֮תָׅծ傀㶷ך#BTF"DUJWJUZח穈鴥ֿה㺁僒דׅկ
HFU"DUJWJUZOVMM㉏겗 searchRecipeBy(“ϋϯόʔά”) .compose(bindToLifecycle()) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addList(recipes); },
throwable -> { showErrorMessage(t); } ); ׃ծٖءؾ嗚稊穠卓ָ鵤גֻח歗ָ䨱גְծ מהאך歗ָ 邌爙ׁגְ 3Y"DUJWJUZ竰䪫ׅ䗳銲ָ֮תָׅծ傀㶷ך#BTF"DUJWJUZח穈鴥ֿה㺁僒דׅկ
HFU"DUJWJUZOVMM㉏겗 searchRecipeBy(“ϋϯόʔά”) .compose(bindToLifecycle()) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(recipes -> { addList(recipes); },
throwable -> { showErrorMessage(t); } ); ׃ծٖءؾ嗚稊穠卓ָ鵤גֻח歗ָ䨱גְծ מהאך歗ָ 邌爙ׁגְ Y TVCTDSJCFⰻךⳢ椚כㄎלזְ 3Y"DUJWJUZ竰䪫ׅ䗳銲ָ֮תָׅծ傀㶷ך#BTF"DUJWJUZח穈鴥ֿה㺁僒דׅկ
0CTFSWBCMFחًׅٔحز 0CTFSWBCMFח׃ֿהדծ 醱꧟ז➬圫㹑鎉涸ח剅ֽ״ֲחזկ 鑐׃ח堣腉鷄⸇׃גְֹת׃׳ֲ
倜堣腉ך鷄⸇ չא湡ך単חؗ٦ٙ٦س鸬⹛㘗ך䎢デⰅպ 倜堣腉ך鷄⸇ך
ؗ٦ٙ٦س鸬⹛㘗䎢デחאְג 暴㹀ךؗ٦ٙ٦سָ嗚稊ׁ儗ֽ אך単ָ䎢デחⴖ剏 չؗ٦ٙ٦س鸬⹛㘗䎢デպך➬圫 䎢デ䞔㜠כⴽך"1*חؙٔؒأزׅ䗳銲ָ֮
ؗ٦ٙ٦س鸬⹛㘗䎢デך䮶莸ְ չةو؞պה嗚稊׃ג邌爙ׁזְ # # # # չأذ٦ؗպה嗚稊ׅה邌爙ׁ ! !
!
ؗ٦ٙ٦س鸬⹛㘗䎢デך䮶莸ְ չةو؞պה嗚稊׃ג邌爙ׁזְ # # # # չأذ٦ؗպה嗚稊ׅה邌爙ׁ ! !
!
״ֻזְ㹋鄲ך⢽ ״ֻזְ⢽ ٖءؾה䎢デ杝甧ח铣鴥ד邌爙ׇׁ㜥さ ! ! ! أذ٦ؗךٖءؾ《䖤 أذ٦ؗךꟼ鸬ך䎢デ《䖤 չأذ٦ؗպד嗚稊 铣鴥דְתׅ
״ֻזְ㹋鄲ך⢽ ״ֻזְ⢽ ٖءؾה䎢デ杝甧ח铣鴥ד邌爙ׇׁ㜥さ ! ! ! أذ٦ؗךٖءؾ《䖤 أذ٦ؗךꟼ鸬ך䎢デ《䖤 嗚稊歗חٖءؾ鷄⸇ չأذ٦ؗպד嗚稊
铣鴥דְתׅ
״ֻזְ㹋鄲ך⢽ ״ֻזְ⢽ ٖءؾה䎢デ杝甧ח铣鴥ד邌爙ׇׁ㜥さ ! ! ! أذ٦ؗךٖءؾ《䖤 أذ٦ؗךꟼ鸬ך䎢デ《䖤 嗚稊歗חٖءؾ鷄⸇ չأذ٦ؗպד嗚稊
״ֻזְ㹋鄲ך⢽ ״ֻזְ⢽ ٖءؾה䎢デ杝甧ח铣鴥ד邌爙ׇׁ㜥さ ! ! ! أذ٦ؗךٖءؾ《䖤 أذ٦ؗךꟼ鸬ך䎢デ《䖤 嗚稊歗חٖءؾ鷄⸇ չأذ٦ؗպד嗚稊
״ֻזְ㹋鄲ך⢽ ״ֻזְ⢽ ٖءؾה䎢デ杝甧ח铣鴥ד邌爙ׇׁ㜥さ ! ! ! أذ٦ؗךٖءؾ《䖤 أذ٦ؗךꟼ鸬ך䎢デ《䖤 嗚稊歗חٖءؾ鷄⸇ չأذ٦ؗպד嗚稊
״ֻזְ㹋鄲ך⢽ ״ֻזְ⢽ ٖءؾה䎢デ杝甧ח铣鴥ד邌爙ׇׁ㜥さ ! ! ! أذ٦ؗךٖءؾ《䖤 أذ٦ؗךꟼ鸬ך䎢デ《䖤 嗚稊歗חٖءؾ鷄⸇ 嗚稊歗ך媮湡ח䎢デ䯏Ⰵ
չأذ٦ؗպד嗚稊
״ֻזְ㹋鄲ך⢽ ״ֻזְ⢽ ٖءؾה䎢デ杝甧ח铣鴥ד邌爙ׇׁ㜥さ ! ! ! أذ٦ؗךٖءؾ《䖤 أذ٦ؗךꟼ鸬ך䎢デ《䖤 嗚稊歗חٖءؾ鷄⸇ 嗚稊歗ך媮湡ח䎢デ䯏Ⰵ
չأذ٦ؗպד嗚稊
״ֻזְ㹋鄲ך⢽ ״ֻזְ⢽ ٖءؾה䎢デ杝甧ח铣鴥ד邌爙ׇׁ㜥さ ! ! ! أذ٦ؗךٖءؾ《䖤 أذ٦ؗךꟼ鸬ך䎢デ《䖤 嗚稊歗חٖءؾ鷄⸇ 嗚稊歗ך媮湡ח䎢デ䯏Ⰵ
չأذ٦ؗպד嗚稊
״ֻזְ㹋鄲ך⢽ ״ֻזְ⢽ ٖءؾה䎢デ杝甧ח铣鴥ד邌爙ׇׁ㜥さ ! ! ! أذ٦ؗךٖءؾ《䖤 أذ٦ؗךꟼ鸬ך䎢デ《䖤 嗚稊歗חٖءؾ鷄⸇ 嗚稊歗ך媮湡ח䎢デ䯏Ⰵ
չأذ٦ؗպד嗚稊 铎ةحف涪欰׃װְׅ6*כ鼘ְֽ
椚䟝涸ז㹋鄲ך⢽ ⢽ չأذ٦ؗպה嗚稊ׅהא湡ך単ָꟼ鸬׃䎢デחז չأذ٦ؗպד嗚稊 أذ٦ؗךٖءؾ《䖤 أذ٦ؗךٖءؾ邌爙׃אאծא湡ח䎢デ邌爙ׇׁ أذ٦ؗا٦أך䎢デ《䖤 䖉さׇⳢ椚
椚䟝涸ז㹋鄲ך⢽ ⢽ չأذ٦ؗպה嗚稊ׅהא湡ך単ָꟼ鸬׃䎢デחז ! չأذ٦ؗպד嗚稊 أذ٦ؗךٖءؾ《䖤 أذ٦ؗךٖءؾ邌爙׃אאծא湡ח䎢デ邌爙ׇׁ أذ٦ؗا٦أך䎢デ《䖤 䖉さׇⳢ椚
椚䟝涸ז㹋鄲ך⢽ ⢽ չأذ٦ؗպה嗚稊ׅהא湡ך単ָꟼ鸬׃䎢デחז ! չأذ٦ؗպד嗚稊 أذ٦ؗךٖءؾ《䖤 أذ٦ؗךٖءؾ邌爙׃אאծא湡ח䎢デ邌爙ׇׁ أذ٦ؗا٦أך䎢デ《䖤 䖉さׇⳢ椚
椚䟝涸ז㹋鄲ך⢽ ⢽ չأذ٦ؗպה嗚稊ׅהא湡ך単ָꟼ鸬׃䎢デחז ! ! չأذ٦ؗպד嗚稊 أذ٦ؗךٖءؾ《䖤 أذ٦ؗךٖءؾ邌爙׃אאծא湡ח䎢デ邌爙ׇׁ أذ٦ؗا٦أך䎢デ《䖤
䖉さׇⳢ椚
椚䟝涸ז㹋鄲ך⢽ ⢽ չأذ٦ؗպה嗚稊ׅהא湡ך単ָꟼ鸬׃䎢デחז ! ! ! չأذ٦ؗպד嗚稊 أذ٦ؗךٖءؾ《䖤 أذ٦ؗךٖءؾ邌爙׃אאծא湡ח䎢デ邌爙ׇׁ
أذ٦ؗا٦أך䎢デ《䖤 䖉さׇⳢ椚
䖉さׇⳢ椚 椚䟝涸ז㹋鄲ך⢽ ⢽ չأذ٦ؗպה嗚稊ׅהא湡ך単ָꟼ鸬׃䎢デחז ! ! ! չأذ٦ؗպד嗚稊 أذ٦ؗךٖءؾ《䖤
أذ٦ؗךٖءؾ邌爙׃אאծא湡ח䎢デ邌爙ׇׁ أذ٦ؗا٦أך䎢デ《䖤
3Y+BWBדך䖉さׇⳢ椚 DPNCJOF-BUFTU 0CTFSWBCMF 0CTFSWBCMF 'VOD 3Y+BWBדך⚛Ⳣ椚 Observable.combineLatest( Observable.just(1), Observable.just(2), (i1,i2)
-> i1 + i2 // ͜ͷ߹ɺ3͕࣍ͷΦϖϨʔλʔʹΔ ); אך0CTFSWBCMFךⳢ椚䖉ծ「ֽ《⦼'VODד⦼さ䧭ׅؔلٖ٦ة٦
3Y+BWBדך⚛Ⳣ椚 Observable.combineLatest( Observable.just(1), Observable.just(2), (i1,i2) -> Pair.create(i1, i2) ); Observable.combineLatest(
Observable.just(1), Observable.just(2), Pair::create ); DPNCJOF-BUFTUה1BJS⢪䖉さׇⳢ椚 ٓيت䒭ך䒷侧הًاحسך⟎䒷侧ָ♧荜׃㜥さחכծ♴ך״ֲחًاحسٔؿ؋ٖٝأהְֲ俑岀ָ⢪ִկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), // ࠂใΛऔಘ͢ΔϝιουͩͱࢥͬͯԼ͍͞ Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(pair -> { addToListWithBannerIfExist(pair.first, pair.second); }, throwable -> { showErrorMessage(t); } ); ⢽ չأذ٦ؗպךٖءؾ嗚稊 ꟼ鸬䎢デך嗚稊 DPNCJOF-BUFTUך➿ח[JQؔلٖ٦ة٦⢪ֲֿה⳿勻תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), // ࠂใΛऔಘ͢ΔϝιουͩͱࢥͬͯԼ͍͞ Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(pair -> { addToListWithBannerIfExist(pair.first, pair.second); }, throwable -> { showErrorMessage(t); } ); ⢽ չأذ٦ؗպךٖءؾ嗚稊 ꟼ鸬䎢デך嗚稊 DPNCJOF-BUFTUך➿ח[JQؔلٖ٦ة٦⢪ֲֿה⳿勻תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), // ࠂใΛऔಘ͢ΔϝιουͩͱࢥͬͯԼ͍͞ Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(pair -> { addToListWithBannerIfExist(pair.first, pair.second); }, throwable -> { showErrorMessage(t); } ); ⢽ չأذ٦ؗպךٖءؾ嗚稊 ꟼ鸬䎢デך嗚稊 DPNCJOF-BUFTUך➿ח[JQؔلٖ٦ة٦⢪ֲֿה⳿勻תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), // ࠂใΛऔಘ͢ΔϝιουͩͱࢥͬͯԼ͍͞ Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(pair -> { addToListWithBannerIfExist(pair.first, pair.second); }, throwable -> { showErrorMessage(t); } ); ⢽ չأذ٦ؗպךٖءؾ嗚稊 ꟼ鸬䎢デך嗚稊 DPNCJOF-BUFTUך➿ח[JQؔلٖ٦ة٦⢪ֲֿה⳿勻תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), // ࠂใΛऔಘ͢ΔϝιουͩͱࢥͬͯԼ͍͞ Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(pair -> { addToListWithBannerIfExist(pair.first, pair.second); }, throwable -> { showErrorMessage(t); } ); ⢽ չأذ٦ؗպךٖءؾ嗚稊 ꟼ鸬䎢デך嗚稊 DPNCJOF-BUFTUך➿ח[JQؔلٖ٦ة٦⢪ֲֿה⳿勻תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), // ࠂใΛऔಘ͢ΔϝιουͩͱࢥͬͯԼ͍͞ Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(pair -> { addToListWithBannerIfExist(pair.first, pair.second); }, throwable -> { showErrorMessage(t); } ); ⢽ չأذ٦ؗպךٖءؾ嗚稊 ꟼ鸬䎢デך嗚稊 ٖءؾךٔأز DPNCJOF-BUFTUך➿ח[JQؔلٖ٦ة٦⢪ֲֿה⳿勻תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), // ࠂใΛऔಘ͢ΔϝιουͩͱࢥͬͯԼ͍͞ Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(pair -> { addToListWithBannerIfExist(pair.first, pair.second); }, throwable -> { showErrorMessage(t); } ); ⢽ չأذ٦ؗպךٖءؾ嗚稊 ꟼ鸬䎢デך嗚稊 ٖءؾךٔأز DPNCJOF-BUFTUך➿ח[JQؔلٖ٦ة٦⢪ֲֿה⳿勻תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), // ࠂใΛऔಘ͢ΔϝιουͩͱࢥͬͯԼ͍͞ Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(pair -> { addToListWithBannerIfExist(pair.first, pair.second); }, throwable -> { showErrorMessage(t); } ); ⢽ չأذ٦ؗպךٖءؾ嗚稊 ꟼ鸬䎢デך嗚稊 ٖءؾךٔأز 䎢デך䞔㜠 DPNCJOF-BUFTUך➿ח[JQؔلٖ٦ة٦⢪ֲֿה⳿勻תׅկ
DPNCJOF-BUJTU⢪ֲꥷך岣䠐挿 DPNCJOF-BUFTU⢪ֲהֹך岣䠐挿 ˖ 晙倯ךⳢ椚ָ㣟侁ׅהPO&SSPSָㄎל㉏겗 ˖ ⚛Ⳣ椚ׅ0CTFSWBCMFך㹋遤أٖحسך㉏겗
DPNCJOF-BUJTU⢪ֲꥷך岣䠐挿 ⢽ ٖءؾך《䖤ח䧭⸆ծ䎢デך《䖤ח㣟侁ך㜥さ չأذ٦ؗպד嗚稊 ٔٗ٦سׅ 铣鴥ח㣟侁׃ת׃ 铣鴥דְתׅ
DPNCJOF-BUJTU⢪ֲꥷך岣䠐挿 ⢽ ٖءؾך《䖤ח䧭⸆ծ䎢デך《䖤ח㣟侁ך㜥さ չأذ٦ؗպד嗚稊 أذ٦ؗךٖءؾ《䖤 ٔٗ٦سׅ 铣鴥ח㣟侁׃ת׃ 铣鴥דְתׅ
DPNCJOF-BUJTU⢪ֲꥷך岣䠐挿 ⢽ ٖءؾך《䖤ח䧭⸆ծ䎢デך《䖤ח㣟侁ך㜥さ չأذ٦ؗպד嗚稊 أذ٦ؗךٖءؾ《䖤 䎢デ䞔㜠ך铣鴥ח㣟侁 ٔٗ٦سׅ 铣鴥ח㣟侁׃ת׃ 铣鴥דְתׅ
DPNCJOF-BUJTU⢪ֲꥷך岣䠐挿 ⢽ ٖءؾך《䖤ח䧭⸆ծ䎢デך《䖤ח㣟侁ך㜥さ չأذ٦ؗպד嗚稊 أذ٦ؗךٖءؾ《䖤 䎢デ䞔㜠ך铣鴥ח㣟侁 PO&SSPSָㄎלծⱄ铣鴥歗ָ邌爙ׁ " ٔٗ٦سׅ 铣鴥ח㣟侁׃ת׃
铣鴥דְתׅ
DPNCJOF-BUJTU⢪ֲꥷך岣䠐挿 ⢽ ٖءؾך《䖤ח䧭⸆ծ䎢デך《䖤ח㣟侁ך㜥さ չأذ٦ؗպד嗚稊 أذ٦ؗךٖءؾ《䖤 䎢デ䞔㜠ך铣鴥ח㣟侁 PO&SSPSָㄎלծⱄ铣鴥歗ָ邌爙ׁ " ٔٗ٦سׅ 铣鴥ח㣟侁׃ת׃
DPNCJOF-BUJTU⢪ֲꥷך岣䠐挿 ⢽ ٖءؾך《䖤ח䧭⸆ծ䎢デך《䖤ח㣟侁ך㜥さ չأذ٦ؗպד嗚稊 أذ٦ؗךٖءؾ《䖤 䎢デ䞔㜠ך铣鴥ח㣟侁 PO&SSPSָㄎלծⱄ铣鴥歗ָ邌爙ׁ " ٔٗ٦سׅ 铣鴥ח㣟侁׃ת׃
ٖءؾ䞔㜠כ《䖤דֹגְךדծ䎢デָ㣟侁׃גٔأزכ邌爙׃ְ
3Y+BWBדךؒٓ٦Ⳣ椚 PO&SSPS3FUVSO 'VOD5ISPXBCMF FYUFOET5 3Y+BWBדךؒٓ٦Ⳣ椚 AdObservable(“λϚΰ”) .onErrorReturn(throwable ->
AdModel.EmptyData()); PO&SSPS3FUVSO㹀纏ֿׅהדծ4VCTDSJCFSחFSSPSָ鸐濼ׁזֻזתׅկ
䎢デ《䖤ׅ0CTFSWBCMF何葺ׅ public Observable<AdModel> searchAd(String keyword) { return Observable.create(subscriber ->
{ try{ AdModel adModel = adClient.search(keyword); subscriber.onNext(adModel); } catch(HttpException e) { subscriber.onError(e); }) .onErrorReturn(e -> { return AdModel.createEmptyData(); }); } 䎢デ嗚稊ׅ0CTFSWBCMFחؒٓ٦Ⳣ椚鷄⸇ׅ
䎢デ《䖤ׅ0CTFSWBCMF何葺ׅ public Observable<AdModel> searchAd(String keyword) { return Observable.create(subscriber ->
{ try{ AdModel adModel = adClient.search(keyword); subscriber.onNext(adModel); } catch(HttpException e) { subscriber.onError(e); }) .onErrorReturn(e -> { return AdModel.createEmptyData(); }); } 䎢デ嗚稊ׅ0CTFSWBCMFחؒٓ٦Ⳣ椚鷄⸇ׅ
䎢デ《䖤ׅ0CTFSWBCMF何葺ׅ public Observable<AdModel> searchAd(String keyword) { return Observable.create(subscriber ->
{ try{ AdModel adModel = adClient.search(keyword); subscriber.onNext(adModel); } catch(HttpException e) { subscriber.onError(e); }) .onErrorReturn(e -> { return AdModel.createEmptyData(); }); } 䎢デ嗚稊ׅ0CTFSWBCMFחؒٓ٦Ⳣ椚鷄⸇ׅ
䎢デ《䖤ׅ0CTFSWBCMF何葺ׅ public Observable<AdModel> searchAd(String keyword) { return Observable.create(subscriber ->
{ try{ AdModel adModel = adClient.search(keyword); subscriber.onNext(adModel); } catch(HttpException e) { subscriber.onError(e); }) .onErrorReturn(e -> { return AdModel.createEmptyData(); }); } 䎢デ嗚稊ׅ0CTFSWBCMFחؒٓ٦Ⳣ椚鷄⸇ׅ ⢽㢩ָ涪欰׃㜥さַך瑞ךر٦ة٦鵤ׅ
䎢デ《䖤ׅ0CTFSWBCMF何葺ׅ public Observable<AdModel> searchAd(String keyword) { return Observable.create(subscriber ->
{ try{ AdModel adModel = adClient.search(keyword); subscriber.onNext(adModel); } catch(HttpException e) { subscriber.onError(e); }) .onErrorReturn(e -> { return AdModel.createEmptyData(); }); } 䎢デ嗚稊ׅ0CTFSWBCMFחؒٓ٦Ⳣ椚鷄⸇ׅ ⢽㢩ָ涪欰׃㜥さַך瑞ךر٦ة٦鵤ׅ PO&SSPSָㄎלזֻזծPO/FYUח瑞ך䎢デ䞔㜠ָ床״ֲחז
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe( /*
লུ */ ); ⚛Ⳣ椚ׅ0CTFSWBCMFך㹋遤أٖحسך㉏겗 ˖ TFBSDI3FDJQF הTFBSDI"E כTVCTDSJCF0Oָ劢䭷㹀ך朐䡾կ ˖ ֿך㜥さDPNCJOF-BUJTUך⚥魦כ♧אךأٖحسד㹋遤ׁկ DPNCJOF-BUJTUכ⚛Ⳣ椚׃ְָծأٖحسָـٗحׁؙגְג⚛Ⳣ椚חזזְ✲ָ֮תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe( /*
লུ */ ); ⚛Ⳣ椚ׅ0CTFSWBCMFך㹋遤أٖحسך㉏겗 ˖ TFBSDI3FDJQF הTFBSDI"E כTVCTDSJCF0Oָ劢䭷㹀ך朐䡾կ ˖ ֿך㜥さDPNCJOF-BUJTUך⚥魦כ♧אךأٖحسד㹋遤ׁկ DPNCJOF-BUJTUכ⚛Ⳣ椚׃ְָծأٖحسָـٗحׁؙגְג⚛Ⳣ椚חזזְ✲ָ֮תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe( /*
লུ */ ); ⚛Ⳣ椚ׅ0CTFSWBCMFך㹋遤أٖحسך㉏겗 ˖ TFBSDI3FDJQF הTFBSDI"E כTVCTDSJCF0Oָ劢䭷㹀ך朐䡾կ ˖ ֿך㜥さDPNCJOF-BUJTUך⚥魦כ♧אךأٖحسד㹋遤ׁկ DPNCJOF-BUJTUכ⚛Ⳣ椚׃ְָծأٖحسָـٗحׁؙגְג⚛Ⳣ椚חזזְ✲ָ֮תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe( /*
লུ */ ); ⚛Ⳣ椚ׅ0CTFSWBCMFך㹋遤أٖحسך㉏겗 ˖ TFBSDI3FDJQF הTFBSDI"E כTVCTDSJCF0Oָ劢䭷㹀ך朐䡾կ ˖ ֿך㜥さDPNCJOF-BUJTUך⚥魦כ♧אךأٖحسד㹋遤ׁկ DPNCJOF-BUJTUכ⚛Ⳣ椚׃ְָծأٖحسָـٗحׁؙגְג⚛Ⳣ椚חזזְ✲ָ֮תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”), searchAd(“εςʔΩ”), Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe( /*
লུ */ ); ⚛Ⳣ椚ׅ0CTFSWBCMFך㹋遤أٖحسך㉏겗 ˖ TFBSDI3FDJQF הTFBSDI"E כTVCTDSJCF0Oָ劢䭷㹀ך朐䡾կ ˖ ֿך㜥さDPNCJOF-BUJTUך⚥魦כ♧אךأٖحسד㹋遤ׁկ TFBSDI3FDJQFךⳢ椚ָ穄✪׃䖓ח㹋遤ׁ DPNCJOF-BUJTUכ⚛Ⳣ椚׃ְָծأٖحسָـٗحׁؙגְג⚛Ⳣ椚חזזְ✲ָ֮תׅկ
嗚稊歗ך㹋鄲ךⰋ⡤⫷ Observable.combineLatest( searchRecipe(“εςʔΩ”).subscribeOn(schedulers.io()), searchAd(“εςʔΩ”).subscribeOn(schedulers.io()), Pair::create ) .subscribeOn(schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe( /*
লུ */ ); ⚛Ⳣ椚ׅ0CTFSWBCMFך㹋遤أٖحسך㉏겗 ⚥魦ך0CTFSWBCMFחTVCTDSJCF0O䭷㹀׃גծחⴽأٖحسⶴ䔲ג DPNCJOF-BUJTUך⚥魦ָ⚛Ⳣ椚ׁ״ֲחזկ
瑱搫ךֶ격ְ չ䎢デBQJ؟٦غ٦כ♧儗涸ח♶㸜㹀זךד 㔐תדٔزٓ؎Ⳣ椚׃גְֻׁպ 瑱搫ך䎢デث٦يַךֶ격ְ
3Y+BWBדךؒٓ٦Ⳣ椚 SFUSZ MPOH 3Y+BWBדךؒٓ٦Ⳣ椚 AdObservable(“λϚΰ”) .retry(1); // ྫ֎͕ൃੜͨ͠߹̍ճ͚ͩϦτϥΠ͢Δ
SFUSZ 'VOD*OUFHFS 5ISPXBCMF #PPMFBOQSFEJDBUF AdObservable(“λϚΰ”) .retry((count, throwable) -> count > 2)
䎢デ《䖤ׅ0CTFSWBCMF何葺ׅ public Observable<AdModel> searchAd(String keyword) { return Observable.create(subscriber
-> { try{ AdModel ad = AdClient.search(keyword); subscriber.onNext(ad); } catch(HttpException e) { subscriber.onError(e); }) .retry(1) .onErrorReturn(e -> { return AdModel.createEmptyData(); }); } 䎢デ嗚稊ׅ0CTFSWBCMF刿ח何葺ׅ ٔزٓ؎ך鷄⸇
倜堣腉ך鷄⸇ չ嗚稊歗ח-JLFنةٝ鷄⸇׃ת׃׳ֲպ 倜堣腉ך鷄⸇ך
-JLFنةٝך➬圫 〸♳ח-JLFنةָٝ鷄⸇ׁ نةٝ䬃ׅהֶ孡חⰅח⥂㶷ׁ -JLFך朐䡾כⴽ"1*ד《䖤 -JLFنةٝך➬圫 !
! ! -JLF"1*ך➬圫 ٖءؾ*Eךٔأز鷏הծ 傀ח⥂㶷׃גְٖءؾ*Eָ鵤גֻ
-JLFنةٝך➬圫 〸♳ח-JLFنةָٝ鷄⸇ׁ نةٝ䬃ׅהֶ孡חⰅח⥂㶷ׁ -JLFך朐䡾כⴽ"1*ד《䖤 -JLFنةٝך➬圫 !
! ! ♥ ♥ ♥ -JLF"1*ך➬圫 ٖءؾ*Eךٔأز鷏הծ 傀ח⥂㶷׃גְٖءؾ*Eָ鵤גֻ
ٖءؾ《䖤ךؿٗ٦ ٖءؾ䞔㜠ך《䖤ؿٗ٦ ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ♧鋮《䖤 4FBSDI"1* -JLFך朐䡾《䖤 -JLF"1* ٖءؾر٦ةח-JLFך朐䡾و٦آ
ٖءؾ《䖤ךؿٗ٦ ٖءؾ䞔㜠ך《䖤ؿٗ٦ ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ♧鋮《䖤 4FBSDI"1* -JLFך朐䡾《䖤 -JLF"1* ٖءؾر٦ةח-JLFך朐䡾و٦آ ꬊず劍Ⳣ椚ך湫⻉
3Y+BWBדך湫⻉ BU.BQ 'VOD TVQFS5 FYUFOET0CTFSWBCMF 3Y+BWBדךꬊず劍Ⳣ椚ך湫⻉ searchRecipe(“εςʔΩ”) .flatMap(recipes ->
fetchLikedRecipeIds(recipes)) .subscribe(recipeIds -> {})
3Y+BWBדך湫⻉ BU.BQ 'VOD TVQFS5 FYUFOET0CTFSWBCMF 3Y+BWBדךꬊず劍Ⳣ椚ך湫⻉ searchRecipe(“εςʔΩ”) .flatMap(recipes ->
fetchLikedRecipeIds(recipes)) .subscribe(recipeIds -> {})
3Y+BWBדך湫⻉ BU.BQ 'VOD TVQFS5 FYUFOET0CTFSWBCMF 3Y+BWBדךꬊず劍Ⳣ椚ך湫⻉ searchRecipe(“εςʔΩ”) .flatMap(recipes ->
fetchLikedRecipeIds(recipes)) .subscribe(recipeIds -> {})
3Y+BWBדך湫⻉ BU.BQ 'VOD TVQFS5 FYUFOET0CTFSWBCMF 3Y+BWBדךꬊず劍Ⳣ椚ך湫⻉ searchRecipe(“εςʔΩ”) .flatMap(recipes ->
fetchLikedRecipeIds(recipes)) .subscribe(recipeIds -> {})
湫䱸Ⳣ椚ה⚛Ⳣ椚穈さׇ BU.BQ 'VOD TVQFS5 FYUFOET0CTFSWBCMF ⚛Ⳣ椚ה湫Ⳣ椚さׇג⢪ֲ searchRecipe(“εςʔΩ”) .flatMap(recipes ->
Observable.combineLatest( Observable.just(recipes), // ϨγϐϦετΛͦͷ··͢ fetchLikedRecipe(recipes)), //ϨγϐϦετ͔ΒLikeͨ͠ϨγϐIdΛऔಘ Pair::create ) ) .map(this::mergeLikeState) // mapͰLikeঢ়ଶΛϨγϐΠϯελϯεʹөͤ͞Δ(লུ) .subscribe(recipes -> {}) 0CTFSWBCMFKVTU Y כծY0CTFSWBCMFחֻֽךًاحسדׅկ DPNCJOF-BUFTU 0CTFSWBCMF 0CTFSWBCMF 'VOD
湫䱸Ⳣ椚ה⚛Ⳣ椚穈さׇ BU.BQ 'VOD TVQFS5 FYUFOET0CTFSWBCMF ⚛Ⳣ椚ה湫Ⳣ椚さׇג⢪ֲ searchRecipe(“εςʔΩ”) .flatMap(recipes ->
Observable.combineLatest( Observable.just(recipes), // ϨγϐϦετΛͦͷ··͢ fetchLikedRecipe(recipes)), //ϨγϐϦετ͔ΒLikeͨ͠ϨγϐIdΛऔಘ Pair::create ) ) .map(this::mergeLikeState) // mapͰLikeঢ়ଶΛϨγϐΠϯελϯεʹөͤ͞Δ(লུ) .subscribe(recipes -> {}) 0CTFSWBCMFKVTU Y כծY0CTFSWBCMFחֻֽךًاحسדׅկ DPNCJOF-BUFTU 0CTFSWBCMF 0CTFSWBCMF 'VOD
湫䱸Ⳣ椚ה⚛Ⳣ椚穈さׇ BU.BQ 'VOD TVQFS5 FYUFOET0CTFSWBCMF ⚛Ⳣ椚ה湫Ⳣ椚さׇג⢪ֲ searchRecipe(“εςʔΩ”) .flatMap(recipes ->
Observable.combineLatest( Observable.just(recipes), // ϨγϐϦετΛͦͷ··͢ fetchLikedRecipe(recipes)), //ϨγϐϦετ͔ΒLikeͨ͠ϨγϐIdΛऔಘ Pair::create ) ) .map(this::mergeLikeState) // mapͰLikeঢ়ଶΛϨγϐΠϯελϯεʹөͤ͞Δ(লུ) .subscribe(recipes -> {}) 0CTFSWBCMFKVTU Y כծY0CTFSWBCMFחֻֽךًاحسדׅկ DPNCJOF-BUFTU 0CTFSWBCMF 0CTFSWBCMF 'VOD
鷄⸇项俱 BU.BQ 'VOD TVQFS5 FYUFOET0CTFSWBCMF 鷄⸇项俱 湫Ⳣ椚ֽדאזּػة٦ٝ searchRecipe(“εςʔΩ”) .flatMap(recipes
-> { fetchLikedRecipe(recipes) .map(likeIds -> { mergeLikeState(recipes, likeIds); }); } ) .subscribe(recipes -> {}) IUUQTUXJUUFSDPNUBLVKJTUBUVTׁך׀䭷䶯鸐NBQד籬־ג״ֲׁדׅיկ
-JLF朐䡾תד锃ץٖءؾ《䖤ًاحس⡲ public Observable<List<Recipe>> searchRecipeWithLikeState(String keyword) { searchRecipe(keyword) .flatMap(recipes -> Observable.combineLatest(
Observable.just(recipes), fetchLikedRecipeIds(recipes)), Pair::create ) ) .map(this::mergeLikeState) } public Func1<List<Recipe>> mergeLikeState(Pair<List<Recipe>, Integer> pair) { // Likeঢ়ଶΛϨγϐΠϯελϯεʹөͤ͞Δ(লུ) } ٖءؾ嗚稊 MJLF朐屣锃ץًاحس⡲
剑穄涸ז嗚稊歗ךؿٗ٦ 剑穄涸ז嗚稊歗ךؿٗ٦然钠׃ת׃׳ֲկ
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
䖉さׇⳢ椚
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ《䖤 䖉さׇⳢ椚
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ《䖤 䖉さׇⳢ椚 ٖءؾך-JLF朐䡾《䖤
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ《䖤 䖉さׇⳢ椚 ٖءؾך-JLF朐䡾《䖤
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ《䖤 䖉さׇⳢ椚 ٖءؾך-JLF朐䡾《䖤
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ《䖤 أذ٦ؗꟼ鸬ך䎢デ《䖤 䖉さׇⳢ椚 ٖءؾך-JLF朐䡾《䖤
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ《䖤 أذ٦ؗꟼ鸬ך䎢デ《䖤 䖉さׇⳢ椚 ٖءؾך-JLF朐䡾《䖤
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ《䖤 أذ٦ؗꟼ鸬ך䎢デ《䖤 䖉さׇⳢ椚 ٖءؾך-JLF朐䡾《䖤
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ《䖤 أذ٦ؗꟼ鸬ך䎢デ《䖤 䖉さׇⳢ椚 ٖءؾך-JLF朐䡾《䖤 剑㣐㔐ךٔزٓ؎Ⳣ椚
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ《䖤 أذ٦ؗꟼ鸬ך䎢デ《䖤 䖉さׇⳢ椚 ٖءؾך-JLF朐䡾《䖤 㣟侁׃㜥さַ瑞ر٦ة鵤ׅ 剑㣐㔐ךٔزٓ؎Ⳣ椚
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ《䖤 أذ٦ؗꟼ鸬ך䎢デ《䖤 䖉さׇⳢ椚 ٖءؾך-JLF朐䡾《䖤 㣟侁׃㜥さַ瑞ر٦ة鵤ׅ 剑㣐㔐ךٔزٓ؎Ⳣ椚
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
أذ٦ؗךٖءؾ《䖤 أذ٦ؗꟼ鸬ך䎢デ《䖤 䖉さׇⳢ椚 ٖءؾך-JLF朐䡾《䖤 㣟侁׃㜥さַ瑞ر٦ة鵤ׅ 剑㣐㔐ךٔزٓ؎Ⳣ椚
剑穄涸ז嗚稊歗ךؿٗ٦ 嗚稊歗ך剑穄涸זؿٗ٦㔳 ! ! ! ♥ ♥ ♥ չأذ٦ؗպד嗚稊
ׅץגך䞔㜠 ٖءؾ -JLF朐䡾 䎢デ ָٔأزך邌爙ׁ أذ٦ؗךٖءؾ《䖤 أذ٦ؗꟼ鸬ך䎢デ《䖤 䖉さׇⳢ椚 ٖءؾך-JLF朐䡾《䖤 㣟侁׃㜥さַ瑞ر٦ة鵤ׅ 剑㣐㔐ךٔزٓ؎Ⳣ椚
剑穄涸ז嗚稊歗ך㹋鄲 Observable.combineLatest( searchRecipeWithLikeState(“εςʔΩ”) .subscribeOn(schedulers.io()), searchAd(“εςʔΩ”) .subscribeOn(schedulers.io()), Pair::create ) .compose(bindToLifecycle()) .subscribeOn(schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .subscribe(pair -> { addToList(pair.first, pair.second); }, throwable -> { showErrorMessage(t); } ); ٖءؾ嗚稊MJLF朐屣《䖤 ꟼ鸬䎢デך嗚稊 ! ! ! ♥ ♥ ♥ 醱꧟זⳢ椚ד֮ג؝٦سך〳铣䚍ָ䬐⥂ׁךָ3Y+BWBⵃ欽ׅ눁⸂דׅיկ
ך➭5JQTזו תהה酡駈
ְֶׁ DPNCJOF-BUFTU 0CTFSWBCMF 0CTFSWBCMF 'VOD 3Y+BWBדך⚛Ⳣ椚 Observable.combineLatest( Observable.just(1), Observable.just(2), (i1,i2)
-> i1 + i2 ); ♳ך⢽דכאך0CTFSWBCMFך䖉さׇדָׅծ _ /⦐ך䖉さׇָ⳿勻ًاحسָ欽䠐ׁגְתׅ
3Y+BWBדך湫⻉ BU.BQ 'VOD TVQFS5 FYUFOET0CTFSWBCMF 3Y+BWBדך湫Ⳣ椚 searchRecipe(“εςʔΩ”) .flatMap(recipes ->
recipeClient.fetchLikedRecipeIds(recipes)) .subscribe(recipeIds -> {}) BU.BQכծBU.BQ 0CTFSWBCMFGSPN דٔأزぐ銲稆חⴓⶴׅ儗ח⢪ְתׅկ
⚛Ⳣ椚ך䘔欽 א⟃♳ך⚛Ⳣ椚遤ְ㜥さ אך0CTFSWBCMFDPNCJOF-BUFTUד䖉さׇׅ㜥さחכծ 1BJSד⦼さ䧭׃תָׅծא⟃♳ך㜥さכ1BJS䭁䓸׃5VQMF 5VQM荈ד⡲גⵃ欽׃גתׅկ public class Tuple3<T1, T2,
T3> { public T1 first; public T2 second; public T3 third; public Tuple3(T1 first, T2 second, T3 third) { this.first = first; this.second = second; this.third = third; } public static <T1, T2, T3> Tuple3<T1, T2, T3> create(T1 t1, T2 t2, T3 t3) { return new Tuple3<>(t1, t2, t3); } } 5VQMF♧儗劍֮ת׃ָծ5VQMFתד֮ל㣐䫺ך銲⟝弫ֲׇדׅկ
⚛Ⳣ椚ך䘔欽 ״㢳ֻך⚛Ⳣ椚遤ְְ㜥さ 鶢ךהֶDPNCJOF-BUFTU⢪ֲה醱侧ךⳢ椚⚛ח㹋遤ׁ ֿהָ⳿勻תָׅծ"OESPJE橆㞮דכ剑㣐⚛תדחⵖꣲׁגְ תׅկ♴鎸ך״ֲח4ZTUFN1SPQFSUZח״ג㢌刿ָ〳腉דׅկ // in your CustomApplication public
void onCreate(Bundle saveInstanceState){ super.onCreate(); System.setProperty("rx.ring-buffer.size", "32"); } IUUQTHJUIVCDPN3FBDUJWF93Y+BWBJTTVFTד鑫׃ֻ铡僇ׁגְתׅկ
ך➭5JQTזו ך➭5JQT
暴婊ז0CTFSWBCMF 4JOHMF !#FUB 暴婊ז欽鷿ך0CTFSWBCMF )UUQؙٔؒأزזו♧䏝׃ַ؎كٝزָ崧גֿזְ0CTFSWBCMF ➭鎉铂ד鎉ֲהֿך1SPNJTFְזך Single.create(subscriber -> { subscriber.onSuccess("Hello
world"); }).subscribe(text -> { System.out.println(text); }, throwable -> { Crashlytics.logException(e); }); 劤أٓ؎سד0CTFSWBCMF⢪הֿכⰋג4JOHMFח剅ֹ䳔ִֿהָ⳿勻תׅկ
暴婊ז0CTFSWBCMF $PNQMFUBCMF !&YQFSJNFOUBM 暴婊ז欽鷿ך0CTFSWBCMF 1045ؙٔؒأزזוծ暴ח⦼ָ鵤גֿזְ㜥さך0CTFSWBCMFך 䧭⸆PS㣟侁ֽ濼ְ㜥さח⢪ֲկ⦼כ♧ⴖ崧גֿזְկ Completable.create(subscriber -> {
subscriber.onCompleted() }).subscribe(throwable -> { Crashlytics.logException(e); }, () -> { }); 暴ח䗳銲זְךח3FTQPOTFװOVMM床ׅזծ4JOHMFװ$PNQMFUBCMF♳䩛ֻ⢪ְְדׅיկ
ֶדׅ ָ֮הֲ׀ְׂת׃կ 䥪鋵⠓דֶֻׁ鑧׃ת׃׳ֲ