{"id":4912,"date":"2016-11-01T15:04:03","date_gmt":"2016-11-01T06:04:03","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=4912"},"modified":"2016-11-01T15:04:03","modified_gmt":"2016-11-01T06:04:03","slug":"%e6%96%b0%e4%ba%ba%e6%88%90%e9%95%b7%e8%a8%98%e9%8c%b212th","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/4912","title":{"rendered":"\u65b0\u4eba\u6210\u9577\u8a18\u933212th"},"content":{"rendered":"<p>\u975e\u540c\u671f\u3067\u91cd\u305f\u3044(\u6642\u9593\u306e\u304b\u304b\u308b)\u51e6\u7406\u3092\u3057\u305f\u3044\u3053\u3068\u306f\u975e\u5e38\u306b\u591a\u304f\u3042\u308a\u307e\u3059<br \/>\n\u4f8b\u3048\u3070\u3001\u901a\u4fe1\u4e2d\u306b\u30d7\u30ed\u30b0\u30ec\u30b9\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3084\u3001\u91cd\u3044\u8a08\u7b97\u3084\u753b\u50cf\u306e\u51e6\u7406\u306a\u3069\u3067\u3059<\/p>\n<p>\u975e\u540c\u671f\u51e6\u7406\u3067\u51e6\u7406\u3092\u884c\u3046\u306b\u306f\u3001Thread\u3084AsyncTask\u3092\u7528\u3044\u307e\u3059<br \/>\n\u4eca\u56de\u306fThread\u306b\u3064\u3044\u3066\u5b66\u7fd2\u3057\u3066\u3044\u304d\u307e\u3059<\/p>\n<p>\u307e\u305f\u3001Android\u306e\u7279\u5fb4\u3068\u3057\u3066\u3001\u63cf\u753b\u306fUI\u30b9\u30ec\u30c3\u30c9\u3067\u884c\u308f\u306a\u3051\u308c\u3070\u3044\u3051\u306a\u3044\u305f\u3081\u3001\u975e\u540c\u671f\u51e6\u7406\u3092\u3057\u3066\u3044\u308b\u30b9\u30ec\u30c3\u30c9\u3067\u306f\u3001\u57fa\u672c\u7684\u306b\u753b\u9762\u306e\u63cf\u753b\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093<\/p>\n<h3>Thread<\/h3>\n<p>\u7c21\u5358\u306a\u975e\u540c\u671f\u51e6\u7406\u3067\u3042\u308c\u3070Tread\u3092\u5229\u7528\u3059\u308b\u306e\u304c\u3044\u3044\u304b\u3068\u601d\u3044\u307e\u3059<\/p>\n<p>\u5358\u7d14\u306a\u8a18\u8ff0\u4f8b\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059<\/p>\n<pre style=\"border: dashed #000000 2px;\"><code>Thread thread = new Thread(new Runnable() {\r\n            @Override\r\n            public void run() {\r\n                \/\/\u51e6\u7406\r\n            }\r\n        });\r\n        \r\n        thread.start();\r\n<\/code><\/pre>\n<p>\u3082\u3061\u308d\u3093\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bimplement\u3067\u30e1\u30bd\u30c3\u30c9\u3092\u5b9f\u88c5\u3059\u308b\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059<\/p>\n<pre style=\"border: dashed #000000 2px;\"><code>public class MainActivity extends Activity implements Runnable{\r\n    public void onCreate(Bundle bundle){\r\n        super.onCreate(bundle);\r\n        requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n        setContentView(R.layout.mainactivity);\r\n        this.bundle = new Bundle();\r\n        this.bundle.putBoolean(\"END\",false);\r\n\r\n        handler = new Handler();\r\n\r\n        b1 = (Button) findViewById(R.id.frag1);\r\n        b1.setOnClickListener(this);\r\n        b2 = (Button) findViewById(R.id.frag2);\r\n        b2.setOnClickListener(this);\r\n\r\n        gv = new GraphicsView(this);\r\n\r\n        Thread thread = new Thread(this);\r\n\r\n        thread.start();\r\n\r\n    }\r\n\r\n    public void run(){\r\n        \/\/\u51e6\u7406\r\n    }\r\n}\r\n<\/code><\/pre>\n<p>\u3057\u304b\u3057\u3001\u3069\u306e\u51e6\u7406\u3067\u3082\u975e\u540c\u671f\u30b9\u30ec\u30c3\u30c9\u306e\u4e2d\u3067\u306f\u3001UI\u30b9\u30ec\u30c3\u30c9\u306e\u63cf\u753b\u306f\u884c\u3046\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093<br \/>\n\u975e\u540c\u671f\u51e6\u7406\u306e\u4e2d\u3067\u63cf\u753b\u3092\u3057\u305f\u3044\u306e\u306a\u3089\u3070\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306bHandler\u3067UI\u30b9\u30ec\u30c3\u30c9\u306b\u63cf\u753b\u3059\u308b\u3088\u3046\u306b\u6307\u793a\u3092\u51fa\u3059\u3053\u3068\u3067\u3059<\/p>\n<pre style=\"border: dashed #000000 2px;\"><code>Thread thread = new Thread(new Runnable() {\r\n            @Override\r\n            public void run() {\r\n                handler.post(new Runnable() {\r\n                    @Override\r\n                    public void run() {\r\n                        textView.setText(\"Hello\");\r\n                    }\r\n                });\r\n            }\r\n        });\r\n<\/code><\/pre>\n<h3>\u7d42\u308f\u308a\u306b<\/h3>\n<p>\u975e\u540c\u671f\u306b\u3057\u305f\u3044\u3051\u3069\u3001\u51e6\u7406\u306e\u4e2d\u3067\u63cf\u753b\u306a\u3069UI\u30b9\u30ec\u30c3\u30c9\u3067\u3057\u304b\u3067\u304d\u306a\u3044\u3053\u3068\u3092\u3057\u3066\u3044\u3066\u3001\u3046\u307e\u3044\u3053\u3068\u51e6\u7406\u3092\u5206\u3051\u3089\u308c\u305a\u56db\u82e6\u516b\u82e6\u3057\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3059<br \/>\n\u63cf\u753b\u3068\u91cd\u3044\u51e6\u7406\u3068\u306f\u57fa\u672c\u7684\u306b\u3001\u5206\u3051\u305f\u65b9\u304c\u3044\u3044\u306e\u3067\u306f\u3068\u601d\u3044\u307e\u3059<br \/>\n\u5bc6\u63a5\u306a\u95a2\u4fc2\u306b\u3042\u308b\u3068\u3069\u3046\u3057\u3066\u3082\u30e6\u30fc\u30b6\u3092\u5f85\u305f\u305b\u3066\u3057\u307e\u3044\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u60aa\u3044\u30a2\u30d7\u30ea\u3068\u306a\u308a\u307e\u3059\u306e\u3067<\/p>\n<p>\u6b21\u56de\u306bAsyncTask\u306b\u3064\u3044\u3066\u66f8\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059<\/p>\n<p>\u706b\u66dc\u65e5\u62c5\u5f53\uff1apoppy<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/4912\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/4912\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"\u65b0\u4eba\u6210\u9577\u8a18\u933212th\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/4912\" data-text=\"\u65b0\u4eba\u6210\u9577\u8a18\u933212th\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/4912\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/4912\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>\u975e\u540c\u671f\u3067\u91cd\u305f\u3044(\u6642\u9593\u306e\u304b\u304b\u308b)\u51e6\u7406\u3092\u3057\u305f\u3044\u3053\u3068\u306f\u975e\u5e38\u306b\u591a\u304f\u3042\u308a\u307e\u3059 \u4f8b\u3048\u3070\u3001\u901a\u4fe1\u4e2d\u306b\u30d7\u30ed\u30b0\u30ec\u30b9\u30c0\u30a4\u30a2\u30ed\u30b0\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u3084\u3001\u91cd\u3044\u8a08\u7b97\u3084\u753b\u50cf\u306e\u51e6\u7406\u306a\u3069\u3067\u3059 \u975e\u540c\u671f\u51e6\u7406\u3067\u51e6\u7406\u3092\u884c\u3046\u306b\u306f\u3001Thread\u3084AsyncTask\u3092\u7528\u3044\u307e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[100,12],"tags":[56,79],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/4912"}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=4912"}],"version-history":[{"count":8,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/4912\/revisions"}],"predecessor-version":[{"id":4922,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/4912\/revisions\/4922"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=4912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=4912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=4912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}