Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
2014.10.28 - Android Taipei - Hi AndroidAnnotat...
Search
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
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
290
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
270
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
ジョジョの世界をXRで再現する
mofurune
0
160
R8 の設定見直しでアプリサイズ削減
andpad
0
220
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
370
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
190
ActionController meets Protocol Buffers
sorah
0
520
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
300
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
1k
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
4 Signs Your Business is Dying
shpigford
187
23k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
550
How STYLIGHT went responsive
nonsquared
100
6.3k
Agile that works and the tools we love
rasmusluckow
331
22k
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