{"id":154851,"date":"2012-10-23T18:25:03","date_gmt":"2012-10-23T14:25:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=154851"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=154851","title":{"rendered":"<span class=\"post_title\">AndroidAnnotations \u2014 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u043c \u0438 \u0443\u043a\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u0434 \u0431\u0435\u0437 \u0432\u0440\u0435\u0434\u0430 \u0434\u043b\u044f \u0437\u0434\u043e\u0440\u043e\u0432\u044c\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (I \u0447\u0430\u0441\u0442\u044c)<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/e05\/811\/7ba\/e058117bab89dff8ae6a66893d4f33fd.jpg\" align=\"left\"\/><br \/>  \u0423\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f Android \u2014 <a href=\"https:\/\/github.com\/excilys\/androidannotations\/wiki\">Android Annotations<\/a><br \/>  \u041e\u043d\u0430 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 <a href=\"http:\/\/habrahabr.ru\/post\/116945\/\">RoboJuice<\/a> \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c, \u043d\u043e \u0435\u0441\u043b\u0438 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0435\u0435 \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u0442\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u044f\u0441\u043d\u043e \u2014 \u043e\u043d\u0430 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043e\u0431\u0438\u043b\u044c\u043d\u0435\u0435 \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. <br \/>  \u041e\u0431 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/123966\/\">\u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>, \u043d\u043e \u043a\u0440\u0430\u0442\u043a\u043e, \u0434\u0430 \u0438 \u043e\u043d\u0430 \u0441\u0430\u043c\u0430 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0430\u0441\u044c.<br \/>  \u0427\u0442\u043e \u0436, \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e AndroidAnnotations \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043e\u043d\u0430 \u0432\u043e\u0448\u043b\u0430 \u0432 <a href=\"http:\/\/habrahabr.ru\/post\/154827\/\">\u0434\u0436\u0435\u043d\u0442\u0435\u043b\u044c\u043c\u0435\u043d\u0441\u043a\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0434 Android.<\/a><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430<\/h4>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435 \u2014 \u044d\u0442\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430, \u0432\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e id \u0432\u044c\u044e\u0448\u043a\u0438 \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0434\u043b\u044f \u043d\u0438\u0445 \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u0435\u0439.<br \/>  \u0412\u0442\u043e\u0440\u043e\u0435 \u2014 \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f, \u043a\u0430\u043a \u0432 \u0441\u0430\u043c\u044b\u0445 <a href=\"http:\/\/planshetnyj.net\/wp-content\/uploads\/android-apple-1.jpg\">\u044d\u0440\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u043d\u0430\u0445<\/a> \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u043f\u043e\u0434 Android, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438.<br \/>  \u0422\u0440\u0435\u0442\u044c\u0435 \u2014 \u0443\u0434\u043e\u0431\u043d\u043e\u0435 \u0438 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0438\u0442\u0438\/\u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430<br \/>  \u0427\u0435\u0442\u0432\u0435\u0440\u0442\u043e\u0435 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u0441 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u0430\u043c\u0438 ListView. <br \/>  <a href=\"https:\/\/github.com\/excilys\/androidannotations\/wiki\/Cookbook\">\u0418 \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u043a\u0443\u0441\u043d\u043e\u0441\u0442\u0435\u0439&#8230;<\/a><\/p>\n<h4>\u0427\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0438 \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h4>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u044d\u0442\u043e \u0432\u0435\u043b\u0438\u043a\u043e\u043b\u0435\u043f\u043d\u043e! \u0412\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 RoboGreendroidOrmliteActionBarFragmentActivity \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u0442\u044f\u0436\u0435\u043b\u043e\u0432\u0435\u0441\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0448\u0430\u0433\u043e\u0432 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438, \u0432 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c 50\u043a\u0431 jar, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043b\u0435\u0436\u0438\u0442 \u0438 \u043d\u0435 \u043b\u0435\u0437\u0435\u0442 \u0432 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 apk. <br \/>  \u041f\u043e\u0441\u043b\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 Activity, \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 AndroidAnnotations \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a\u0430 \u043e\u0442 \u043d\u0435\u0433\u043e, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b Android. \u0410 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043f\u0440\u0435\u0434\u043a\u0430. \u0418\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0435 \u0434\u0435\u043a\u043b\u0430\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, a MyActivity_ \u2014 \u043a\u043b\u0430\u0441\u0441 \u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a MyActivity, \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0439 AndroidAnnotations. <br \/>  <a href=\"https:\/\/github.com\/excilys\/androidannotations\/wiki\/HowItWorks#StartingAnAnnotatedActivity\">\u0417\u0432\u0443\u0447\u0438\u0442 \u0441\u0442\u0440\u0430\u0448\u043d\u043e<\/a>, \u043d\u043e \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0442\u0430\u043a\u043e\u043c\u0443 \u043f\u043e\u0434\u0445\u043e\u0434\u0443 \u043c\u044b \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0438\u0433\u0440\u044b\u0432\u0430\u0435\u043c. <br \/>  \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u0430\u0434\u0430\u0435\u0442 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b. \u0410 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0440\u0430\u0441\u0442\u0435\u0442 \u0432\u043e \u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437.<br \/>  \u0418 \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0432\u0430\u0436\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c: \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043f\u0440\u043e\u0435\u043a\u0442 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 Activity\/Fragment\/View \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u043e\u043b\u044c\u043a\u043e, \u0442\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b. \u0410 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0438\u0441\u0430\u0442\u044c, \u043a\u0430\u043a \u043c\u044b \u043f\u0440\u0438\u0432\u044b\u043a\u043b\u0438 \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u043d\u0435\u0435, \u0438 \u043a\u0430\u043a \u043d\u0430\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0443\u0436\u043d\u044b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432 \u2014 \u0438\u0445 \u0438 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044e Activity\/Fragment \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c, \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0438\u0448\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b.<\/p>\n<h4>\u0418\u043c\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442<\/h4>\n<p>  \u0417\u0434\u0435\u0441\u044c \u0438 \u0434\u0430\u043b\u0435\u0435 \u0432\u0441\u0451 \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 2.6. \u041e\u0431 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u0445 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"https:\/\/github.com\/excilys\/androidannotations\/wiki\/ReleaseNotes\">\u0447\u0435\u0439\u043d\u0436\u043b\u043e\u0433<\/a><\/p>\n<h5>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h5>\n<p>  <\/p>\n<ul>\n<li>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c <a href=\"https:\/\/github.com\/excilys\/androidannotations\/wiki\/Download\">\u0430\u0440\u0445\u0438\u0432 \u0441 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439<\/a><\/li>\n<li>androidannotations-2.6-api.jar \u2014 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u00ablibs\u00bb \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430.<\/li>\n<li>androidannotations-2.6.jar \u2014 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043c \u0432 \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u00abext-libs\u00bb.<\/li>\n<li>\u0417\u0430\u0442\u0435\u043c \u0437\u0430\u0439\u0434\u0435\u043c \u0432 \u00abProject\/Properties\/Java compiler\/Annotation Processing\u00bb.<\/li>\n<li>\u0421\u0442\u0430\u0432\u0438\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0438 \u00abEnable project specific settings\u00bb, \u00abEnable annotations processing\u00bb, \u00abEnable processing in editor\u00bb.<\/li>\n<li>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u043f\u043e\u0434\u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u00abFactory path\u00bb: \u0441\u0442\u0430\u0432\u0438\u043c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u00abEnable project specific settings\u00bb \u0438 \u0436\u043c\u0435\u043c \u00abAdd jar\u00bb. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0437 \u043f\u0430\u043f\u043a\u0438 \u00abext-libs\u00bb \u00abandroidannotations-2.6.jar\u00bb. \u0416\u043c\u0435\u043c \u00abapply\u00bb \u0438 \u00abyes\u00bb.<\/li>\n<li>\u0412\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u00abJava Compiler\u00bb \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u00ab1.6\u00bb \u0432\u0435\u0440\u0441\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/li>\n<li>\u0412\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u00abJava Build Path\/Source\u00bb \u0436\u043c\u0435\u043c \u00abAdd Folder\u00bb \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0430\u043f\u043a\u0443 &quot;.apt_generated&quot;. <\/li>\n<li>\u0416\u043c\u0435\u043c \u041e\u041a<\/li>\n<\/ul>\n<p>  \u0421\u0430\u043c\u043e\u0435 \u043d\u0443\u0434\u043d\u043e\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u043e\u0441\u044c, \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u043f\u0435\u0441\u043d\u044f.<\/p>\n<h5>\u041f\u0440\u043e\u0441\u0442\u0430\u044f Activity<\/h5>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u0443\u0435\u043c MainActivity \u2014 \u0432 \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u0435:  <\/p>\n<pre><code class=\"java\">        &lt;activity             android:name=&quot;.MainActivity&quot;             android:label=&quot;@string\/title_activity_main&quot; &gt;             &lt;intent-filter&gt;                 &lt;action android:name=&quot;android.intent.action.MAIN&quot; \/&gt;                  &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; \/&gt;             &lt;\/intent-filter&gt; <\/code><\/pre>\n<p>  \u0437\u0430\u043c\u0435\u043d\u0438\u043c .MainActivity \u043d\u0430 .MainActivity_<br \/>  \u0410\u043d\u043d\u043e\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043b\u0430\u0441\u0441:  <\/p>\n<pre><code class=\"java\">@EActivity(R.layout.main_activity) public class MainActivity extends Activity { <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u043a\u0443 onCreate \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043b\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c. <\/p>\n<h5>\u0417\u0430\u043f\u0443\u0441\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 Activity<\/h5>\n<p>  \u0412 \u043e\u0431\u044b\u0447\u043d\u043e\u043c Activity \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430, \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u043c\u0435\u0442\u043e\u0434\u044b, \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043a \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c View. \u0414\u043b\u044f \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 Activity \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043c\u044b \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u0443\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a: <code>@AfterViews<\/code><br \/>  \u0414\u0430\u043b\u0435\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e Activity, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438 \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b:   <\/p>\n<pre><code class=\"java\">   @AfterViews     protected void afterViews(){     \tTestActivity_.intent(this).start();       } <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 Activity<br \/>  \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435\u0439 \u044d\u043a\u0441\u0442\u0440\u044b: <code>TestActivity_.intent(context).myDateExtra(someDate).start();<\/code><br \/>  \u0433\u0434\u0435 myDateExtra \u2014 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 <code>@ Extra<\/code> \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0443\u0435\u043c\u043e\u0435 protected-\u043f\u043e\u043b\u0435 \u0432 TestActivity<br \/>  \u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441 \u0444\u043b\u0430\u0433\u0430\u043c\u0438: <code>TestActivity_.intent(context).flags(FLAG_ACTIVITY_CLEAR_TOP).start(); <\/code><\/p>\n<h5>\u0410\u043d\u043d\u043e\u0442\u0438\u0440\u0443\u0435\u043c Activity \u043f\u043e \u043f\u043e\u043b\u043d\u043e\u0439<\/h5>\n<p>  \u041f\u043e\u0438\u0441\u043a View:  <\/p>\n<pre><code class=\"java\">\t  @ViewById \t  protected EditText testactivity_first_edittext;  \t  @ViewById(R.id.testactivity_second_textview) \t  protected TextView secondTextView; <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043d\u0438\u043c\u0430\u0442\u044c \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b instance state \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e:  <\/p>\n<pre><code class=\"java\">    @InstanceState     String  stateToSave; <\/code><\/pre>\n<p>  \u0418 \u043f\u0440\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438 \u043f\u043e\u0432\u043e\u0440\u043e\u0442\u0435 \u044d\u043a\u0440\u0430\u043d\u0430 \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0441\u043e\u0437\u0434\u0430\u043d\u043e, \u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a:  <\/p>\n<pre><code class=\"java\">    @StringRes(R.string.hello_world)     String myHelloString; <\/code><\/pre>\n<p>  \u0412\u0435\u0448\u0430\u0435\u043c onClickListener:  <\/p>\n<pre><code class=\"java\">\t@Click(R.id.testactivity_first_button) \tvoid myButtonWasClicked() { \t    secondTextView.setText(&quot;first button was clicked&quot;); \t} <\/code><\/pre>\n<p>  \u0421\u043b\u0443\u0448\u0430\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430:  <\/p>\n<pre><code class=\"java\">\t @TextChange(R.id.testactivity_second_edittext) \t void onTextChangesOnSomeTextViews(TextView tv, CharSequence text) { \t \tToast.makeText(this, &quot;second textview was changed&quot;, Toast.LENGTH_SHORT).show(); \t } <\/code><\/pre>\n<h5>\u041d\u0430\u0438\u0443\u0434\u043e\u0431\u043d\u0435\u0439\u0448\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438<\/h5>\n<p>  \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u044d\u0442\u0443 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0434\u0432\u0435 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438:<br \/>  <code>@ Background<\/code> \u2014 \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0430\u043a \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0441\u044f \u0432 \u0444\u043e\u043d\u0435 <br \/>  <code>@ UiThread<\/code> \u2014 \u0442\u0430\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0430\u043d\u043d\u043e\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043c\u0435\u0442\u043e\u0434, \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0432 \u0444\u043e\u043d\u043e\u0432\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435, \u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0449\u0438\u0439\u0441\u044f \u0432 <a href=\"http:\/\/habrahabr.ru\/post\/142256\/\">\u043f\u043e\u0442\u043e\u043a\u0435 UI<\/a><br \/>  \u0412\u043e\u0442 \u043a\u043e\u0434 \u043f\u0440\u0438\u043c\u0435\u0440\u0430:  <\/p>\n<pre><code class=\"java\">\t@Click(R.id.testactivity_second_button) \tprotected void secondButtonWasClicked() { \t\tbackgroundWork(); \t}  \t@Background \tprotected void backgroundWork() { \t\tpublishProgress(0); \t\tpublishProgress(10); \t\tpublishProgress(100); \t\tonBGTaskFinish(&quot;bg task finished&quot;); \t}  \t@UiThread \tvoid publishProgress(int progress) { \t\ttestactivity_first_edittext.setText(&quot;Background task progress: &quot;+ progress); \t} \t \t@UiThread \tvoid onBGTaskFinish(String resultText){ \t\tsecondTextView.setText(resultText); \t} <\/code><\/pre>\n<p>  \u041d\u0430 \u043a\u043b\u0438\u043a \u043a\u043d\u043e\u043f\u043a\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0444\u043e\u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441 \u0438 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u0441\u0435, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442\u2026<\/p>\n<p>  <a href=\"https:\/\/github.com\/excilys\/androidannotations\/\">\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430<\/a><br \/>  <a href=\"https:\/\/github.com\/excilys\/androidannotations\/wiki\/Cookbook\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/154827\/\">\u0411\u044b\u0441\u0442\u0440\u043e\u0435 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0432 \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442<\/a><br \/>  <a href=\"https:\/\/github.com\/nekdenis\/AndroidAnnotationsSample\">\u041f\u0440\u043e\u0435\u043a\u0442-\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438<\/a>    \t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/154851\/\"> http:\/\/habrahabr.ru\/post\/154851\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/e05\/811\/7ba\/e058117bab89dff8ae6a66893d4f33fd.jpg\" align=\"left\"\/><br \/>  \u0423\u0436\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0434\u043b\u044f Android \u2014 <a href=\"https:\/\/github.com\/excilys\/androidannotations\/wiki\">Android Annotations<\/a><br \/>  \u041e\u043d\u0430 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 <a href=\"http:\/\/habrahabr.ru\/post\/116945\/\">RoboJuice<\/a> \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c, \u043d\u043e \u0435\u0441\u043b\u0438 \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0435\u0435 \u0442\u0449\u0430\u0442\u0435\u043b\u044c\u043d\u0435\u0435, \u0442\u043e \u0441\u0442\u0430\u043d\u0435\u0442 \u044f\u0441\u043d\u043e \u2014 \u043e\u043d\u0430 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043e\u0431\u0438\u043b\u044c\u043d\u0435\u0435 \u043f\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c. <br \/>  \u041e\u0431 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/123966\/\">\u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435<\/a>, \u043d\u043e \u043a\u0440\u0430\u0442\u043a\u043e, \u0434\u0430 \u0438 \u043e\u043d\u0430 \u0441\u0430\u043c\u0430 \u043e\u0431\u043d\u043e\u0432\u0438\u043b\u0430\u0441\u044c.<br \/>  \u0427\u0442\u043e \u0436, \u043f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e AndroidAnnotations \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043e\u043d\u0430 \u0432\u043e\u0448\u043b\u0430 \u0432 <a href=\"http:\/\/habrahabr.ru\/post\/154827\/\">\u0434\u0436\u0435\u043d\u0442\u0435\u043b\u044c\u043c\u0435\u043d\u0441\u043a\u0438\u0439 \u043d\u0430\u0431\u043e\u0440 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0434 Android.<\/a>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-154851","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/154851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=154851"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/154851\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=154851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=154851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=154851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}