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
Dart
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
funnelbit
January 30, 2017
Programming
300
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Dart
funnelbit
January 30, 2017
More Decks by funnelbit
See All by funnelbit
Hatena Engineer Seminar #9
funnelbit
5
7.5k
droidkaigi-2017-renovation
funnelbit
10
11k
BottomBarAndSnackBar
funnelbit
0
540
Dagger2 Optional bindings
funnelbit
0
610
WearableRecyclerView
funnelbit
1
840
QucikSettingsTileAPI
funnelbit
0
380
Mobile Vision
funnelbit
0
490
AwarenessAPI
funnelbit
0
160
Asynchronous Injection
funnelbit
1
290
Other Decks in Programming
See All in Programming
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
140
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.4k
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
710
さぁV100、メモリをお食べ・・・
nilpe
0
150
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
160
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
560
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
The NotImplementedError Problem in Ruby
koic
1
840
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
13k
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
150
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
140
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.2k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
200
First, design no harm
axbom
PRO
2
1.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Leo the Paperboy
mayatellez
7
1.8k
A Tale of Four Properties
chriscoyier
163
24k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Between Models and Reality
mayunak
4
340
The Cost Of JavaScript in 2023
addyosmani
55
10k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
170
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
200
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
Transcript
%BSU
ࣗݾհ ଜྋ גࣜձࣾͯͳ )BUFOBGVOOFMCJU 5XJUUFS!FYQFSPQFSP
%SPJE,BJHJͰൃද͠·͢ w IUUQTESPJELBJHJHJUIVCJP w 3PPNd w IUUQTESPJELBJHJHJUIVCJP UJNFUBCMFIUNM
*OUFOU ͷ ѻ͍Λ ؆୯ʹ͢Δ
4USJOH .BJO"DUJWJUZ .BJO"DUJWJUZ
.BJO"DUJWJUZ public class MainActivity extends AppCompatActivity { … Intent intent
= new Intent(MainActivity.this, Main2Activity.class); intent.putExtra(Main2Activity.EXTRA_TEXT, "ok"); startActivity(intent); … }
.BJO"DUJWJUZ public class Main2Activity extends AppCompatActivity { … public static
final String EXTRA_TEXT = “text"; … Bundle extras = getIntent().getExtras(); Log.e("extra_text", extras.getString(EXTRA_TEXT)); … }
4USJOH PS /VMM .BJO"DUJWJUZ .BJO"DUJWJUZ
.BJO"DUJWJUZ public class Main2Activity extends AppCompatActivity { public static final
String EXTRA_TEXT = "text"; … Bundle extras = getIntent().getExtras(); if (extras != null) { Log.e(“extra_text", extras.getString(EXTRA_TEXT, "defaultValue")); } … }
w ૿͑Δఆ w ૿͑ΔJGจ w ૿͢ϨϏϡʔίετ
%BSU %BSUBOE)FOTPO
%BSU %BSUBOE)FOTPO w #VUUFS,OJGFΈͨ͘&YUSBͷΛ*OKFDU͢Δ w ίϯύΠϧ࣌ʹ*OKFDU͢ΔίʔυΛੜ
4USJOH .BJO"DUJWJUZ .BJO"DUJWJUZ
.BJO"DUJWJUZ public class MainActivity extends AppCompatActivity { … Intent intent
= new Intent(MainActivity.this, Main2Activity.class); intent.putExtra(Main2Activity.EXTRA_TEXT, “ok"); … Intent intent = Henson.with(MainActivity.this) .gotoMain2Activity() .text("ok") .build(); startActivity(intent); … }
.BJO"DUJWJUZ public class Main2Activity extends AppCompatActivity { … @InjectExtra String
text; public static final String EXTRA_TEXT = "text"; … Dart.inject(this); Log.e("extra_text", text); … }
0QUJPOBM*OKFDUJPO
4USJOH PS /VMM .BJO"DUJWJUZ .BJO"DUJWJUZ
.BJO"DUJWJUZ public class MainActivity extends AppCompatActivity { … Intent intent
= new Intent(MainActivity.this, Main2Activity.class); intent.putExtra(Main2Activity.EXTRA_TEXT, “ok"); … Intent intent = Henson.with(MainActivity.this) .gotoMain2Activity() .text("ok") .build(); startActivity(intent); … }
.BJO"DUJWJUZ public class Main2Activity extends AppCompatActivity { … @Nullable @InjectExtra
String text; public static final String EXTRA_TEXT = "text"; … Dart.inject(this); if (!TextUtils.isEmpty(text)) { Log.e("extra_text", text); … Bundle extras = getIntent().getExtras(); if (extras != null) { Log.e(“extra_text", extras.getString(EXTRA_TEXT, "defaultValue")); } }
%FGBVMU7BMVFT
.BJO"DUJWJUZ public class Main2Activity extends AppCompatActivity { … @Nullable @InjectExtra
String text = "default"; … }
'SBHNFOU
%BSUJOKFDU 'SBHNFOU public class BlankFragment extends Fragment { @InjectExtra String
param1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Dart.inject(this);
%BSUJOKFDU BOESPJEBQQ'SBHNFOU
%BSUJOKFDU 0CKFDU #VOEMF
.BJO"DUJWJUZ public class Main2Activity extends AppCompatActivity { … Bundle extras
= Henson.with(this) .gotoBlankFragment() .param1(“??????”) .build() .getExtras(); blankFragment = new BlankFragment(); blankFragment.setArguments(extras); getSupportFragmentManager() .beginTransaction() .replace(R.id.fragment_container, blankFragment, TAG_FRAGMENT) .commit(); … }
#MBOL'SBHNFOU public class BlankFragment extends Fragment { @InjectExtra String param1;
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Dart.inject(this, getArguments()); Log.e("param1", param1); } } w ͪΐͬͱେม
.BJO"DUJWJUZ public class MainActivity extends AppCompatActivity { … Bundle
fragmentExtras = Henson.with(MainActivity.this) .gotoBlankFragment() .param1("!!!!!!!!!") .build() .getExtras(); Intent intent = Henson.with(MainActivity.this) .gotoMain2Activity() .text("a") .build(); intent.putExtras(fragmentExtras); startActivity(intent); … }
.BJO"DUJWJUZ public class Main2Activity extends AppCompatActivity { … Fragment blankFragment
= getSupportFragmentManager().findFragmentByTag(TAG_FRAGMENT); if (blankFragment == null) { getSupportFragmentManager() .beginTransaction() .replace(R.id.fragment_container, new BlankFragment(), TAG_FRAGMENT) .commit(); } … }
#MBOL'SBHNFOU public class BlankFragment extends Fragment { @InjectExtra String param1;
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.e("param1", param1); } @Override public void onAttach(Context context) { super.onAttach(context); Dart.inject(this, getActivity()); } } w ͍ͩͿେม
·ͱΊ w ίʔυྔͷ૿ՃΛ͑Δ͜ͱ͕ग़དྷΔ w Մಡੑ্ w ϨϏϡʔ͍͢͠ w 'SBHNFOUͰ͏ʹͪΐͬͱบ͕͋Δ
ࢀߟ w IUUQTHJUIVCDPNGQSBUFFLEBSU
͋Γ͕ͱ͏͍͟͝·ͨ͠