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
2014.10.28 - Android Taipei - Hi AndroidAnnotat...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yes
October 28, 2014
Programming
110
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
2014.10.28 - Android Taipei - Hi AndroidAnnotations
A brief sharing about AndroidAnnotations at Android Taipei.
Yes
October 28, 2014
More Decks by Yes
See All by Yes
2014.04.30 - Android Taipei - Data & PracSong
namejoshua
0
96
Other Decks in Programming
See All in Programming
Oxcを導入して開発体験が向上した話
yug1224
4
340
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
Contextとはなにか
chiroruxx
1
380
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
190
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
290
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
350k
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.4k
スマートグラスで並列バイブコーディング
hyshu
0
260
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.5k
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
210
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
610
Datadog LLM Observabilityで実現する 安全なLLM Usage 管理
3150
0
120
Featured
See All Featured
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
170
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
310
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Evolving SEO for Evolving Search Engines
ryanjones
0
230
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.6k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
Google's AI Overviews - The New Search
badams
0
1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
The Invisible Side of Design
smashingmag
301
52k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Leo the Paperboy
mayatellez
7
1.9k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
Transcript
Hi! AndroidAnnotations 㥮疍 yes ! 2014.10.28 Android Taipei @ PicCollage
Story 1
public class MainActivity extends Activity { ! onCreate() { setContentView(R.id.activity_main);
} ! }
public class MainFragment extends Fragment { onCreateView() { return inflater.inflate(R.layout.fragment_main,
container, false); } ! }
public class MainFragment extends Fragment { onCreateView() { View view
= inflater.inflate(R.layout.fragment_main, container, false); ! TextView textView1 = view.findViewById(R.id.textview1); TextView textView2 = view.findViewById(R.id.textview1); TextView textView3= view.findViewById(R.id.textview1); TextView textView4 = view.findViewById(R.id.textview1); ! textView1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { } }); return view; } ! }
public abstract class AbstractFragment extends Fragment { protected abstract int
setRootViewId(); int[] setOnClickListenerViews() {} } public class MainFragment extends AbstractFragment implement View.OnClickListener @Override protected int setRootViewId() { return R.layout.fragment_main } @Override int[] setOnClickListenerViews() { return new int[] { R.id.button_ok, R.id.button_no } } ! @Override public void onClick(View v) { switch (v.getId) { case R.id.button_ok: … } }
Story 2
Android Studio ;
support-annotations
None
(;ƅшƅʣ
@Efragment(R.layout.fragment_main) public class MainFragment extends Fragment { ! @Click(R.id.button_ok) void
ok() { … } ! ! ! ! ! ! } @LongClick(R.id.button_ok)
Fragment fragment = MainFragment_.builder().position(7).build(); @Efragment(R.layout.fragment_main) public class MainFragment extends Fragment
{ ! @FragmentArgs int position; }
@Receiver(actions = BluetoothLeService.ACTION_DATA_AVAILABLE) void onHeartRateChanged() { startHRVMeasure(); }
@EActivity @OptionsMenu(R.menu.menu_main) public class MainActivity extends Activity { ! !
! ! ! ! ! ! ! } @OptionsItem(R.id.menuitem_refresh) void refresh() { … }
@SharedPref public interface MyPrefs { @DefaultString("yes") String name(); } @EActivity
public class MyActivity extends Activity { @Pref MyPrefs_ myPrefs; String name = myPrefs.name().get(); }
@EActivity MainActivity Java's Annotation Processing Tool MainActivity_ extends MainActivity Compiler
Reference: ! AndriodAnnotations http://androidannotations.org/ ! android-apt https://bitbucket.org/hvisser/android-apt Thanks for your
listening