{"id":1917,"date":"2013-05-18T01:36:15","date_gmt":"2013-05-17T16:36:15","guid":{"rendered":"http:\/\/codaholic.org\/?p=1917"},"modified":"2014-03-09T19:08:44","modified_gmt":"2014-03-09T10:08:44","slug":"androidjava%e3%81%ae%e3%82%b3%e3%83%bc%e3%83%89%e3%81%8b%e3%82%89edittext%e3%81%ab%e8%83%8c%e6%99%af%e7%94%bb%e5%83%8f%e3%82%92%e8%a8%ad%e7%bd%ae%e3%81%97%e3%81%a6%e8%a6%8b%e3%81%9f%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/codaholic.org\/?p=1917","title":{"rendered":"[Android] Java \u306e\u30b3\u30fc\u30c9\u304b\u3089 EditText \u306b\u80cc\u666f\u753b\u50cf\u3092\u8a2d\u7f6e\u3057\u3066\u898b\u305f\u76ee\u3092\u5909\u66f4\u3059\u308b"},"content":{"rendered":"<p>Android \u30a2\u30d7\u30ea\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u306f\u3001EditText \u30af\u30e9\u30b9\u3092\u4f7f\u3063\u3066\u30c6\u30ad\u30b9\u30c8\u306e\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3067\u3059\u304c\u5165\u529b\u30a8\u30ea\u30a2\u306b\u306f\u4e0b\u90e8\u306b\u9752\u8272\u306e\u67a0\u7dda\u304c\u3042\u308b\u3060\u3051\u3067\u3001\u500b\u4eba\u7684\u306b\u597d\u304d\u306a\u30c7\u30b6\u30a4\u30f3\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u306a\u306e\u3067 Java \u306e\u30b3\u30fc\u30c9\u304b\u3089\u80cc\u666f\u753b\u50cf\u3092\u8a2d\u7f6e\u3057\u3066\u30c7\u30b6\u30a4\u30f3\u3092\u5909\u3048\u308b\u65b9\u6cd5\u3092\u8abf\u3079\u307e\u3057\u305f\u3002<\/p>\n<p><!--more--><\/p>\n<p>\u307e\u305a\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c7\u30b6\u30a4\u30f3\u306e EditText \u3067\u3059\u3002<\/p>\n<p>[java]<br \/>\n        LayoutParams lparams = new LayoutParams(200, 80);<br \/>\n        EditText edit = new EditText(this);<br \/>\n        edit.setLayoutParams(lparams);<br \/>\n        linearLayout.addView(edit);<br \/>\n[\/java]<br \/>\n<\/p>\n<p>\u4e0a\u8a18\u306e\u30b3\u30fc\u30c9\u304b\u3089\u306f\u4e0b\u8a18\u306e EditText \u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/codaholic.org\/wordpress\/wp-content\/uploads\/edittext_default_part.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/codaholic.org\/wordpress\/wp-content\/uploads\/edittext_default_part.jpg\" alt=\"\" title=\"edittext_default_part\" width=\"216\" height=\"90\" class=\"alignnone size-full wp-image-1920\" \/><\/a><\/p>\n<p>EditText \u306e\u30b5\u30a4\u30ba\u306b\u5408\u308f\u305b\u3066\u3001\u80cc\u666f\u753b\u50cf\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002EditText \u306e\u30b5\u30a4\u30ba\u306f\u6a2a\u5e45 200px \u3001\u7e26\u5e45 80px \u3068\u306a\u308a\u307e\u3059\u306e\u3067\u3001\u540c\u3058\u30b5\u30a4\u30ba\u306b\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p><a href=\"http:\/\/codaholic.org\/wordpress\/wp-content\/uploads\/edittext_bg_modified.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/codaholic.org\/wordpress\/wp-content\/uploads\/edittext_bg_modified.jpg\" alt=\"\" title=\"edittext_bg_modified\" width=\"200\" height=\"80\" class=\"alignnone size-full wp-image-1923\" \/><\/a><\/p>\n<p>\u305d\u3057\u3066\u3053\u306e\u753b\u50cf\u3092\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e res\/drawable-hdpi \u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u914d\u7f6e\u3057\u307e\u3059\u3002( Eclipse \u306e\u5834\u5408\u306f\u81ea\u52d5\u3067\u753b\u50cf\u3092\u691c\u51fa\u3057\u3066\u304f\u308c\u307e\u3057\u305f\u3002)\u3053\u308c\u3092\u4e0b\u8a18\u306e\u3088\u3046\u306b Java \u306e\u30b3\u30fc\u30c9\u3067\u80cc\u666f\u3068\u3057\u3066\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<p>[java]<br \/>\n        LayoutParams lparams = new LayoutParams(200, 80);<br \/>\n        EditText edit = new EditText(this);<br \/>\n        edit.setBackgroundResource(R.drawable.edittext_bg_modified);<br \/>\n        edit.setLayoutParams(lparams);<br \/>\n        linearLayout.addView(edit);<br \/>\n[\/java]<br \/>\n<\/p>\n<p>\u3059\u308b\u3068\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306b EditText \u306e\u30c7\u30b6\u30a4\u30f3\u304c\u5909\u66f4\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/codaholic.org\/wordpress\/wp-content\/uploads\/modified_edittext.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/codaholic.org\/wordpress\/wp-content\/uploads\/modified_edittext.jpg\" alt=\"\" title=\"modified_edittext\" width=\"248\" height=\"125\" class=\"alignnone size-full wp-image-1925\" \/><\/a><\/p>\n<p>\u3061\u3083\u3093\u3068\u3057\u305f\u80cc\u666f\u3092\u4f5c\u308a\u3053\u3081\u3070\u3001\u7dba\u9e97\u306a\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u304c\u4f5c\u308c\u305d\u3046\u3067\u3059\u306d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Android \u30a2\u30d7\u30ea\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u306f\u3001EditText \u30af\u30e9\u30b9\u3092\u4f7f\u3063\u3066\u30c6\u30ad\u30b9\u30c8\u306e\u5165\u529b\u30d5\u30a9\u30fc\u30e0\u3092\u751f\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3067\u3059\u304c\u5165\u529b\u30a8\u30ea\u30a2\u306b\u306f\u4e0b\u90e8\u306b\u9752\u8272\u306e\u67a0\u7dda\u304c\u3042\u308b\u3060\u3051\u3067\u3001\u500b\u4eba\u7684\u306b\u597d\u304d\u306a\u30c7\u30b6\u30a4\u30f3\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u306a\u306e\u3067  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[197,23],"tags":[281,253],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8gd1W-uV","_links":{"self":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1917"}],"collection":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1917"}],"version-history":[{"count":9,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1917\/revisions"}],"predecessor-version":[{"id":2134,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1917\/revisions\/2134"}],"wp:attachment":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}