{"id":594,"date":"2010-12-23T02:06:18","date_gmt":"2010-12-22T17:06:18","guid":{"rendered":"http:\/\/helloidea.org\/?p=594"},"modified":"2014-02-22T22:18:06","modified_gmt":"2014-02-22T13:18:06","slug":"%e5%9f%ba%e6%9c%ac%e7%9a%84%e3%81%aa%e5%8b%95%e4%bd%9c-android%e9%96%8b%e7%99%ba","status":"publish","type":"post","link":"https:\/\/helloidea.org\/index.php\/archives\/594.html","title":{"rendered":"\u57fa\u672c\u7684\u306a\u52d5\u4f5c -android\u958b\u767a-"},"content":{"rendered":"<p>\u57fa\u672c\u7684\u306a\u52d5\u304d\u306e\u6d41\u308c\u304c\u5206\u304b\u3063\u305f\u306e\u3067\u30e1\u30e2\u30e1\u30e2\u3002<\/p>\n<p>SDK\u306b\u4ed8\u3044\u3066\u304f\u308b\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u898b\u3066\u307f\u308b\u3068\u3001\u5fc5\u305a\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<strong>import android.app.Activity;<\/strong><\/p>\n<p>\u305d\u3057\u3066\u3001\u3069\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3082\u5fc5\u305a\u540c\u3058\u59cb\u307e\u308a\u65b9\u3092\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p><strong>@Override<br \/>\n public void onCreate(Bundle savedInstanceState) {&#8230;}<\/strong><\/p>\n<p>\u306a\u3093\u3058\u3083\u3089\u30db\u30a4\u3063\u3066\u8abf\u3079\u308b\u3068\u3001Android\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u57fa\u672c\u7684\u306a\u6d41\u308c\u304c\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3042\u308b\u30da\u30fc\u30b8\u304c\u898b\u3064\u304b\u308a\u307e\u3059\u3002\u2193<br \/>\nandroid\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u4e00\u89a7\u306b\u306a\u3063\u3066\u3044\u308b\u30b5\u30a4\u30c8(<a href=\"http:\/\/developer.android.com\/intl\/ja\/reference\/packages.html\">AndroidDevelopers<\/a>)\u3067\u635c\u3059\u3068\u3001<br \/>\n<a href=\"http:\/\/developer.android.com\/intl\/ja\/reference\/android\/app\/Activity.html\">android.app.Activity Class Overview<\/a>\u304c\u898b\u3064\u304b\u308a\u307e\u3059\u3002<br \/>\nXML\u30bf\u30b0\u306e\u7a2e\u985e\u3082\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>@IT\u3067\u306f\u6d41\u308c\u304c\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u3066\u3042\u308b\u30b5\u30a4\u30c8\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002<br \/>\n<a href=\"http:\/\/www.atmarkit.co.jp\/fsmart\/articles\/android02\/android02_2.html\">Android\u30a2\u30d7\u30ea\u4f5c\u6210\u306e\u57fa\u672c\u201cActivity\u201d\u3068\u306f\u4f55\u304b\uff1f<\/a><\/p>\n<p>\u975e\u5e38\u306b\u5206\u304b\u308a\u3084\u3059\u3044\u30b5\u30f3\u30d7\u30eb\u304c\u7f6e\u3044\u3066\u3042\u308b\u306e\u3067\u8cbc\u3089\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3059m\u3002\uff08\u30b3\u30d4\u30da\u3058\u3083\u306a\u3044\u3088\uff01\uff09<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\npackage com.example.android.lifecycle;\r\n\r\nimport android.app.Activity;\r\nimport android.os.Bundle;\r\nimport android.widget.Toast;\r\n\r\npublic class ActivityLifecycle extends Activity {\r\n    @Override\r\n    public void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        setContentView(R.layout.main);\r\n        Toast.makeText(this, &quot;onCreate()&quot;, Toast.LENGTH_SHORT).show();\r\n    }\r\n  \r\n    @Override\r\n    protected void onStart() {\r\n        super.onStart();\r\n        Toast.makeText(this, &quot;onStart()&quot;, Toast.LENGTH_SHORT).show();\r\n    }\r\n\r\n    @Override\r\n    protected void onRestart() {\r\n        super.onRestart();\r\n        Toast.makeText(this, &quot;onRestart()&quot;, Toast.LENGTH_SHORT).show();\r\n    }\r\n\r\n    @Override\r\n    protected void onResume() {\r\n        super.onResume();\r\n        Toast.makeText(this, &quot;onResume()&quot;, Toast.LENGTH_SHORT).show();\r\n    }\r\n\r\n    @Override\r\n    protected void onPause() {\r\n        super.onPause();\r\n        Toast.makeText(this, &quot;onPause()&quot;, Toast.LENGTH_SHORT).show();\r\n    }\r\n\r\n    @Override\r\n    protected void onStop() {\r\n        super.onStop();\r\n        Toast.makeText(this, &quot;onStop()&quot;, Toast.LENGTH_SHORT).show();\r\n    }\r\n\r\n    @Override\r\n    protected void onDestroy() {\r\n        super.onDestroy();\r\n        Toast.makeText(this, &quot;onDestroy()&quot;, Toast.LENGTH_SHORT).show();\r\n    }\r\n}\r\n<\/pre>\n<p>\u4ed6\u306eClass\u3092\u898b\u3066\u307f\u308b\u3068\u3001\u307b\u3068\u3093\u3069\u306e\u52d5\u4f5c\u304c\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3055\u308c\u3066\u3044\u3066\u3001\u57fa\u672c\u52d5\u4f5c\u306f\u5168\u3066\u30a4\u30d9\u30f3\u30c8\u30c9\u30ea\u30d6\u30f3\u306a\u4e8b\u3082\u5206\u304b\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u2460\u57fa\u672c\u7684\u306a\u30d5\u30ed\u30fc\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9<br \/>\n\u2461\u4e2d\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u30fb\u8a2d\u5b9a<br \/>\n\u2462\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4e2d\u3067\u3055\u3089\u306b\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9<br \/>\n\u307f\u305f\u3044\u306a\u611f\u3058\u3067\u51fa\u6765\u305d\u3046\u3002<\/p>\n<p>onCreate\u81ea\u4f53\u3069\u3046\u3084\u3063\u3066\u547c\u3070\u308c\u3066\u308b\u306e\u3068\u304b\u51c4\u304f\u6c17\u306b\u306a\u308b\u3002\u3002\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u57fa\u672c\u7684\u306a\u52d5\u304d\u306e\u6d41\u308c\u304c\u5206\u304b\u3063\u305f\u306e\u3067\u30e1\u30e2\u30e1\u30e2\u3002 SDK\u306b\u4ed8\u3044\u3066\u304f\u308b\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u898b\u3066\u307f\u308b\u3068\u3001\u5fc5\u305a\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u3042\u308a\u307e\u3059\u3002 import android.app.Activity; \u305d\u3057\u3066\u3001\u3069\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7 \u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[58],"class_list":["post-594","post","type-post","status-publish","format-standard","hentry","category-memo","tag-android"],"_links":{"self":[{"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/posts\/594","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/comments?post=594"}],"version-history":[{"count":9,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/posts\/594\/revisions"}],"predecessor-version":[{"id":1245,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/posts\/594\/revisions\/1245"}],"wp:attachment":[{"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/media?parent=594"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/categories?post=594"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/helloidea.org\/index.php\/wp-json\/wp\/v2\/tags?post=594"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}