Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
Androidã¢ããªããã°ã©ãã³ã°ã§ãããç¨åº¦çµé¨ãç©ãã éçºè ãªããFragmentã«ã¾ã¤ããæä½ã§ä¸æã«çºçããIllegalStateExceptionã«ã¯ãããã©ã¨ãªãè¦ããããããã¨ãããã§ãããã Fragment ã¯ãã¹ãã¼ããã©ã³ã®ããã®OSãããã¿ãã¬ãããªã©ããå¹ åºãã¹ã¯ãªã¼ã³ã«å¯¾å¿ã§ãããã«ãããã¤ã¹ãªOSã«é²åããããã«ãAndroid 3.0ã§ç»å ´ããã³ã³ãã¼ãã³ãã§ãã Fragmentãå©ç¨ããã°ãç»é¢ãããã¤ãã®è¦ç´ ã«åå²ãã¦ããããããMVCã§æ§ç¯ãåå©ç¨ããã¨ããã Smalltalk-80ã®MVCçãªæ¹æ³è« ãå¯è½ã«ãªãã¾ãã ä¸æ¹ããã¾ã§ã¯åºãèªãããã¦ãããã¨ã§ãããFragmentã®ã©ã¤ããµã¤ã¯ã«ã¯ ããè¦ã¦ã¿ãã¨è¤é ã§ã足ããããããã¡ã§ãã ããã§ã Fragmentã«å¯¾ããã«ã¦ã³ã¿ã¼ã¨ãã¦ã Square ã¯ãFlowã¨Mortarã¨ãã
æ¦è¦ Androidç¨ã®DIã³ã³ããDaggerã®ããã©ã¼ãã³ã¹ãGuiceã¨æ¯è¼ãã¾ããã Daggerèªä½ã®ä½¿ãæ¹ãªã©ã¯è¿°ã¹ã¦ãã¾ããã®ã§ãå ¬å¼ãµã¤ãã®ããã¥ã¡ã³ããªã©ãåç §ãã¦ãã ããã Daggerã¯Square社製ã®Androidãã¿ã¼ã²ããã«ããDIã³ã³ããã§ãã éçºè ã®ä¸äººã§ããJesse Wilsonæ°ããã¬ã¼ã³ãã¼ã·ã§ã³(InfoQ - Dagger: A Fast Dependency Injector for Android and Java)ã®ãªã㧠It's like Guice, but with speed instead of features ã¨è¿°ã¹ã¦ããããã«ãGuiceã¨åããJSR330ã®Annotationã使ã£ã¦ãªãã¸ã§ã¯ãã®ä¾åé¢ä¿ãè¨è¿°ãã¾ããã¾ããä¸è¿°ã®ã¨ããGuiceã§ãµãã¼ãããã¦ããæ©è½ã®ããã¤ãã¯ãµãã¼ãããªããããã«ããã©ã¼ãã³
æ°ã«ãªã£ã¦ããDaggerãå°ã触ã£ã¦ãµã³ãã«ãä½ãã¾ãããå ¬å¼ã®ãµã³ãã«ãã¼ãã«ã¨ã£ã¦åããã«ããã£ãã®ã§ãããã·ã³ãã«ã«ãã¾ãããã¾ã åãã£ã¦ãªããã¨å¤ãã§ã⦠Daggerã¯Androidã¨Javaåãã®é«éãªDIã³ã³ããã§ãã Daggerã«ã¤ãã¦è©³ããã¯å ¬å¼ãã©ããã http://square.github.io/dagger/ ä»åã¯ã·ã³ãã«ã«Androidã§ã¯ãªãæ®éã®Javaã¨ãã¦ä½¿ç¨ãã¦ãã¾ãã ç°¡åãªãµã³ãã« æ³¨å ¥ããinterfaceã¨å®è£ ã¯ã©ã¹ interfaceãå®ç¾©ãã¾ãã public interface Sample { void execute(); } æ³¨å ¥ããå®è£ ã¯ã©ã¹ãä½ã£ã¦ããã¾ãã public class SampleImpl implements Sample { @Override public void execute() { Syst
注æ æ¬æ¥æ¬èªè¨³ã¯ãDagger ã¦ã¼ã¶ã¬ã¤ãã® 2013-03-27 æç¹ ããã®éå ¬å¼ãªç¿»è¨³ã§ããææ°ããã³æ£ç¢ºãªæ å ±ã«ã¤ãã¦ã¯ããªãªã¸ãã«ã®ã¦ã¼ã¶ã¬ã¤ããåç §ãã¦ãã ããã ã¤ã³ãããã¯ã·ã§ã³ ã¢ããªã±ã¼ã·ã§ã³ã§æè¯ã®ã¯ã©ã¹ã¨ã¯ãä½ããå®è¡ããã¯ã©ã¹ã§ãã ãã¨ãã°ããã¼ã³ã¼ãèªã¿åãã¯ã©ã¹ BarcodeDecoder ã Koopa ç©çã¨ã³ã¸ã³ã¯ã©ã¹ KoopaPhysicsEngineã é³æ¥½ã¹ããªã¼ãã³ã°ã¯ã©ã¹ AudioStreamerã¨ãã£ãé¡ã§ãããããã£ãã¯ã©ã¹ã¯å¥ã®ã¯ã©ã¹ã¸ã®ä¾åæ§ãæã¡ã¾ãï¼ãã¼ã³ã¼ãã«ã¡ã©ãã¡ã¤ã³ãã¯ã©ã¹ BarcodeCameraFinderã ããã©ã«ãã®ç©çã¨ã³ã¸ã³ã¯ã©ã¹ DefaultPhysicsEngineã HTTPã¹ããªã¼ãã³ã°ã¯ã©ã¹ HttpStreamer çã ï¼ã ä¸æ¹ã§ãã¢ããªã±ã¼ã·ã§ã³ã§ææªã®ã¯ã©ã¹ã¨ã¯ãã»ã¨ãã©ä½ãã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}