{"id":206064,"date":"2013-12-14T21:56:03","date_gmt":"2013-12-14T17:56:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=206064"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=206064","title":{"rendered":"<span class=\"post_title\">\u0422\u0430\u0439\u043d\u044b \u043a\u043d\u043e\u043f\u043e\u043a \u0432 Android. \u0427\u0430\u0441\u0442\u044c 2: \u0420\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433 \u0432\u0435\u0440\u0441\u0442\u043a\u0438<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e.<\/p>\n<p>  \u0412 <a href=\"http:\/\/habrahabr.ru\/post\/206012\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439<\/a> \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0442\u043a\u0443, \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043a\u043d\u043e\u043f\u043a\u0443 \u201c\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\/\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u201d, \u0438 \u0432\u043e\u0442 \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:  <\/p>\n<pre><code class=\"xml\">&lt;RelativeLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;     android:padding=&quot;6dp&quot;     android:background=&quot;#dddddd&quot; &gt;      &lt;ToggleButton        android:id=&quot;@+id\/act_main_btn_telephony&quot;        android:layout_width=&quot;match_parent&quot;        android:layout_height=&quot;wrap_content&quot;        android:background=&quot;@drawable\/button_background&quot;        android:drawableLeft=&quot;@drawable\/icon_phone&quot;        android:drawableRight=&quot;@drawable\/icon_on_off&quot;        android:gravity=&quot;left|center_vertical&quot;        android:textOn=&quot;\u0422\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u044f&quot;        android:textOff=&quot;\u0422\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u044f&quot;        android:textSize=&quot;24sp&quot;        android:textStyle=&quot;bold|italic&quot;        android:textColor=&quot;@color\/text_color&quot;        android:onClick=&quot;onToggleButtonClick&quot; \/&gt;  &lt;\/RelativeLayout&gt; <\/code><\/pre>\n<p>  XML-\u043a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u0441\u0438\u0441\u0442\u044b\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c. \u041c\u044b \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043c \u043a\u043e\u0434 \u0432\u0434\u0432\u043e\u0435, \u0443\u0431\u0440\u0430\u0432 \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u044c \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043d\u0435\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u043e \u0442\u0438\u043c-\u043b\u0438\u0434\u0430. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b (<code>strings.xml<\/code>), \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439 (<code>dimens.xml<\/code>), \u0441\u0442\u0438\u043b\u0438 \u0438 \u0442\u0435\u043c\u044b (<code>styles.xml<\/code>).<a name=\"habracut\"><\/a> \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 <a href=\"http:\/\/habrahabr.ru\/post\/206012\/\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e<\/a> \u0441\u0442\u0430\u0442\u044c\u0438, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0445\u043e\u0442\u044f \u0431\u044b \u043f\u0440\u043e\u0431\u0435\u0436\u0430\u0442\u044c \u0435\u0435 \u0433\u043b\u0430\u0437\u0430\u043c\u0438. <\/p>\n<p>  \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 <a href=\"https:\/\/drive.google.com\/file\/d\/0BybbKWPLbv8ZbzFEX2V1b3o5RkU\/edit?usp=sharing\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>.<\/p>\n<p>  \u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u0432\u043e\u0442 \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/fe5\/0c0\/f8b\/fe50c0f8b21a4b75ec51d30cd2568f9c.png\" alt=\"image\"\/><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/014\/8ed\/cdb\/0148edcdb9505462a9d5bbbbc0f1a611.png\" alt=\"image\"\/><\/p>\n<p>  \u0421\u043f\u0440\u0430\u0432\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u044b \u043a\u043d\u043e\u043f\u043a\u0438 \u0432 \u043d\u0430\u0436\u0430\u0442\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043a\u0430 \u043c\u044b \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c \u0438\u0445 \u043f\u0430\u043b\u044c\u0446\u0435\u043c. \u0421\u043b\u0435\u0432\u0430 \u2014 \u043d\u0435 \u043d\u0430\u0436\u0430\u0442\u044b\u0435, \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u043e \u0438 \u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043e.<\/p>\n<h5>\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b strings.xml<\/h5>\n<p>  \u0417\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u043c \u043a\u043e\u0434\u0430. \u0422\u0430\u043c \u0442\u043e\u0447\u043d\u043e \u0435\u0441\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0441\u043b\u043e\u0432\u043e <code>\u0422\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u044f<\/code>. \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u044f\u0437\u044b\u043a\u043e\u0432, \u0432\u0441\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 <code>strings.xml<\/code>. \u041e\u043d \u0443\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043d \u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <code>res\/values<\/code>. \u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0435\u0433\u043e \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;resources&gt;      &lt;string name=&quot;app_name&quot;&gt;MysteriesOfButtons&lt;\/string&gt;     &lt;string name=&quot;action_settings&quot;&gt;\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438&lt;\/string&gt;     &lt;string name=&quot;act_main_telephony&quot;&gt;\u0422\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u044f&lt;\/string&gt;  &lt;\/resources&gt; <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 <code>act_main_telephony<\/code>. \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0442\u0435\u043a\u0441\u0442 \u043a\u043d\u043e\u043f\u043a\u0438 <code>android:textOn<\/code> \u0438 <code>android:textOff<\/code> \u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0443 <code>@string\/act_main_telephony<\/code>:  <\/p>\n<pre><code class=\"xml\">    &lt;ToggleButton        android:id=&quot;@+id\/act_main_btn_telephony&quot;        android:layout_width=&quot;match_parent&quot;        android:layout_height=&quot;wrap_content&quot;        android:background=&quot;@drawable\/button_background&quot;        android:drawableLeft=&quot;@drawable\/icon_phone&quot;        android:drawableRight=&quot;@drawable\/icon_on_off&quot;        android:gravity=&quot;left|center_vertical&quot;        android:textOn=&quot;@string\/act_main_telephony&quot;        android:textOff=&quot;@string\/act_main_telephony&quot;        android:textSize=&quot;24sp&quot;        android:textStyle=&quot;bold|italic&quot;        android:textColor=&quot;@color\/text_color&quot; \/&gt; <\/code><\/pre>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435, \u0445\u043e\u0442\u044f \u043e\u0431\u044a\u0435\u043c \u043a\u043e\u0434\u0430 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0440\u043e\u0441, \u043d\u043e \u044d\u0442\u043e \u043f\u043b\u0430\u0442\u0430 \u0437\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c? \u041d\u0430\u0448 \u0444\u0430\u0439\u043b <code>strings.xml<\/code> \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 <code>res\/values<\/code>. \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0435\u0433\u043e \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0435\u0449\u0435 \u0438 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u0439 \u044f\u0437\u044b\u043a. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433 <code>res\/values-en<\/code>, \u0438 \u0432 \u043d\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0444\u0430\u0439\u043b <code>strings.xml<\/code>. \u041e\u043d \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432\u0441\u0435 \u0442\u0435 \u0436\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b, \u0447\u0442\u043e \u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0444\u0430\u0439\u043b, \u043d\u043e \u0443\u0436\u0435 \u043d\u0430 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c. \u041f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Android \u0438\u0449\u0435\u0442 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0442\u0443 \u043b\u043e\u043a\u0430\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e. \u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043d\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043b\u043e\u043a\u0430\u043b\u0438, \u0442\u043e Android \u0431\u0435\u0440\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0438\u0437 \u043b\u043e\u043a\u0430\u043b\u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0442\u043e \u0435\u0441\u0442\u044c \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 <code>res\/values<\/code> \u0431\u0435\u0437 \u0441\u0443\u0444\u0444\u0438\u043a\u0441\u043e\u0432. \u0422\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u0438\u043b\u0438 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c. \u042d\u0442\u043e\u0442 \u0440\u0435\u0441\u0443\u0440\u0441 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u043c\u0435\u044e\u0449\u0438\u0439\u0441\u044f \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0440\u0435\u0441\u0443\u0440\u0441. \u041b\u043e\u043a\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u044b <code>values<\/code>, \u043d\u043e \u0438 \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0430\u0441\u0442\u043e \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0443\u044e\u0442 <code>drawable<\/code>, \u0435\u0441\u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u0434\u0430\u043d \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u043e\u0439. \u0415\u0441\u043b\u0438 \u0432\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e <a href=\"http:\/\/developer.android.com\/guide\/topics\/resources\/localization.html\">\u0441\u0442\u0430\u0442\u044c\u044e \u043e \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/a> \u043e\u0442 Google \u0438 \u043e \u0442\u043e\u043c, <a href=\"http:\/\/developer.android.com\/guide\/topics\/resources\/providing-resources.html#BestMatch\">\u043a\u0430\u043a Android \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441<\/a>. \u0415\u0441\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0440\u0435\u043c\u044f, \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u0438\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e \u043e \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0439.<\/p>\n<h5>\u0421\u0442\u0438\u043b\u0438 \u0438 \u0442\u0435\u043c\u044b: styles.xml<\/h5>\n<p>  \u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u0441\u044f\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u043a\u043d\u043e\u043f\u043e\u043a, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0445\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0434\u043f\u0438\u0441\u044c\u044e \u0438 \u043b\u0435\u0432\u043e\u0439 \u0438\u043a\u043e\u043d\u043a\u043e\u0439? \u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435? \u0422\u043e\u0433\u0434\u0430 \u0440\u0430\u0437\u043c\u0435\u0440 \u0444\u0430\u0439\u043b\u0430 \u043c\u0430\u043a\u0435\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043f\u043e\u043c\u0435\u0440\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c 80% \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043a\u043e\u0434\u0430. \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u043c \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0442 \u0441\u0442\u0438\u043b\u0438. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u043d\u0435\u0441\u0435\u043c \u0432 \u0441\u0442\u0438\u043b\u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u043f\u043b\u0430\u0433\u0438\u043d ADT \u0434\u043b\u044f Eclipse \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043b\u0435\u0433\u0447\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441\u0442\u0438\u043b\u044f Android.<\/p>\n<p>  \u0414\u043b\u044f \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u044f \u0441\u0442\u0438\u043b\u044f \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u043d\u0430\u0448 \u043c\u0430\u043a\u0435\u0442 <code>activity_main.xml<\/code> \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 <code>Graphical Layout<\/code> \u0438 \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u043a\u043d\u043e\u043f\u043a\u0443. \u0429\u0435\u043b\u043a\u043d\u0435\u043c \u043d\u0430 \u043d\u0435\u0439 \u043f\u0440\u0430\u0432\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439 \u043c\u044b\u0448\u0438 \u0438 \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043f\u0443\u043d\u043a\u0442 <code>Extract Style<\/code>:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/f0a\/c3c\/c53\/f0ac3cc53f078366255cf518c6fd723e.png\"\/><\/p>\n<p>  \u0423\u043a\u0430\u0436\u0435\u043c \u0438\u043c\u044f \u0441\u0442\u0438\u043b\u044f: <code>styleOnOffButton<\/code> \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043e\u0442\u043c\u0435\u0447\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u0441\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u043a\u0440\u043e\u043c\u0435 <code>android:drawableLeft<\/code>, <code>android:textOn<\/code> \u0438 <code>android:textOff<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0431\u0443\u0434\u0443\u0442 \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u044b \u0432 \u0441\u0442\u0438\u043b\u044c:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/f8b\/768\/e8a\/f8b768e8af7d7211389c3b25c4460649.png\"\/><\/p>\n<p>  \u041d\u0430\u0436\u043c\u0438\u0442\u0435 \u041e\u041a. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0432 \u0444\u0430\u0439\u043b\u0435 <code>res\/values\/styles.xml<\/code>:  <\/p>\n<pre><code class=\"xml\">    &lt;style name=&quot;styleOnOffButton&quot;&gt;        &lt;item name=&quot;android:background&quot;&gt;@drawable\/button_background&lt;\/item&gt;        &lt;item name=&quot;android:drawableRight&quot;&gt;@drawable\/icon_on_off&lt;\/item&gt;        &lt;item name=&quot;android:gravity&quot;&gt;left|center_vertical&lt;\/item&gt;        &lt;item name=&quot;android:onClick&quot;&gt;onToggleButtonClick&lt;\/item&gt;        &lt;item name=&quot;android:textColor&quot;&gt;@color\/text_color&lt;\/item&gt;        &lt;item name=&quot;android:textSize&quot;&gt;24sp&lt;\/item&gt;        &lt;item name=&quot;android:textStyle&quot;&gt;bold|italic&lt;\/item&gt;     &lt;\/style&gt; <\/code><\/pre>\n<p>  \u0410 \u0442\u0435\u043a\u0441\u0442 \u043a\u043d\u043e\u043f\u043a\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0441\u044f:  <\/p>\n<pre><code class=\"xml\">    &lt;ToggleButton        android:id=&quot;@+id\/act_main_btn_telephony&quot;        android:layout_width=&quot;match_parent&quot;        android:layout_height=&quot;wrap_content&quot;        android:drawableLeft=&quot;@drawable\/icon_phone&quot;        android:textOn=&quot;@string\/act_main_telephony&quot;        android:textOff=&quot;@string\/act_main_telephony&quot; \/&gt; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0435\u0441\u044f\u0442\u044c \u043a\u043d\u043e\u043f\u043e\u043a, \u043d\u0443\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u0443\u0434\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u0442\u0435\u043a\u0441\u0442\u0430, \u0438 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b <code>android:layout_width<\/code> \u0438 <code>android:layout_height<\/code> \u0432 \u0441\u0442\u0438\u043b\u044c \u043d\u0435 \u0432\u044b\u043d\u043e\u0441\u044f\u0442\u0441\u044f. \u041e\u043d\u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u0444\u0430\u0439\u043b\u0435 \u043c\u0430\u043a\u0435\u0442\u0430. \u0410\u0442\u0440\u0438\u0431\u0443\u0442 <code>android:id<\/code>, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0441\u0432\u043e\u0439 \u0443 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u043e\u0436\u0435 \u043d\u0435 \u0432\u044b\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 \u0441\u0442\u0438\u043b\u044c. \u0422\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0431\u044b\u043b\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u0443\u0432\u0438\u0434\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u0441\u0435 \u201c\u043f\u043e\u043f\u043b\u044b\u043b\u043e\u201d, \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0442\u043e\u0442, \u0447\u0442\u043e \u043c\u044b \u043e\u0436\u0438\u0434\u0430\u043b\u0438. \u041f\u043e\u0447\u0435\u043c\u0443? \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0442\u0438\u043b\u044c \u0445\u043e\u0442\u044c \u0438 \u0441\u043e\u0437\u0434\u0430\u043b\u0441\u044f, \u043d\u043e \u043a \u043a\u043d\u043e\u043f\u043a\u0435 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043b\u0441\u044f.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0438\u043b\u044c \u043a \u043a\u043d\u043e\u043f\u043a\u0435, \u043c\u043e\u0436\u043d\u043e, \u0443\u043a\u0430\u0437\u0430\u0432 \u0435\u0439 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>style=&quot;@style\/styleOnOffButton&quot;<\/code>. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0435\u0441\u043b\u0438 \u0431\u044b \u043c\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u043b\u0438 \u043e\u043f\u0446\u0438\u044e <code>Set style attribute on extracted elements<\/code> \u043f\u0440\u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0438 \u0441\u0442\u0438\u043b\u044f. \u041e\u0431\u0430 \u043f\u0443\u0442\u0438 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442, \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u043b\u0443\u0447\u0448\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443 \u043a\u043d\u043e\u043f\u043a\u0438 \u0432 \u043a\u0430\u0436\u0434\u043e\u043c \u043e\u043a\u043d\u0435. \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0434\u0438\u043d \u0441\u0442\u0438\u043b\u044c \u0434\u043b\u044f \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u044d\u0442\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0434\u0438\u0437\u0430\u0439\u043d\u0430. \u0422\u043e \u0435\u0441\u0441\u0442\u044c \u0432\u0441\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u0442\u0438\u043f\u0430 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\/\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e, \u043e\u0442\u043b\u0438\u0447\u0430\u044f\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u043a\u043e\u043d\u043a\u0430\u043c\u0438 \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0420\u0435\u0434\u043a\u043e \u043a\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043e\u0434\u043d\u0443 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0443\u044e, \u0434\u0440\u0443\u0433\u0443\u044e \u043a\u0440\u0443\u0433\u043b\u0435\u043d\u044c\u043a\u0443\u044e, \u0430 \u0442\u0440\u0435\u0442\u044c\u044e \u0440\u043e\u043c\u0431\u0438\u043a\u043e\u043c.<\/p>\n<p>  \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0438\u043b\u044c \u0432 \u0442\u0435\u043c\u0435. \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b <code>styles.xml<\/code> \u0438 \u043d\u0430\u0439\u0434\u0438\u0442\u0435 \u0442\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0442\u0435\u043a\u0441\u0442:  <\/p>\n<pre><code class=\"xml\">    &lt;!-- Application theme. --&gt;     &lt;style name=&quot;AppTheme&quot; parent=&quot;AppBaseTheme&quot;&gt;        &lt;!-- All customizations that are NOT specific to a particular API-level can go here. --&gt;     &lt;\/style&gt; <\/code><\/pre>\n<p>  \u042d\u0442\u043e \u0442\u0435\u043c\u0430 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0443\u043a\u0430\u0436\u0435\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 <code>ToggleButton<\/code> \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u0441\u0442\u0438\u043b\u044c, \u043d\u0430\u0448 \u0441\u0442\u0438\u043b\u044c:  <\/p>\n<pre><code class=\"xml\">    &lt;!-- Application theme. --&gt;     &lt;style name=&quot;AppTheme&quot; parent=&quot;AppBaseTheme&quot;&gt;        &lt;!-- All customizations that are NOT specific to a particular API-level can go here. --&gt;        &lt;item name=&quot;android:buttonStyleToggle&quot;&gt;@style\/styleOnOffButton&lt;\/item&gt;     &lt;\/style&gt; <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 <code>android:buttonStyleToggle<\/code>, \u0447\u0442\u043e \u0435\u0449\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u0438\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c, \u0438 \u0433\u0434\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c? \u042f \u0442\u0430\u043a \u0438 \u043d\u0435 \u0441\u043c\u043e\u0433 \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0443\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043f\u043e \u0441\u0442\u0438\u043b\u044f\u043c. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0435\u0435 \u0432\u0438\u0434\u0435\u043b, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430 \u043d\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043e\u0431\u0440\u0430\u0449\u0430\u044e\u0441\u044c \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c Android, \u043a \u0441\u0447\u0430\u0441\u0442\u044c\u044e \u043e\u043d\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b \u0434\u043b\u044f \u0432\u0441\u0435\u0445. \u042f \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0441 ADT, \u0438 \u0443 \u043c\u0435\u043d\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0441\u0442\u0438\u043b\u0435\u0439 Android \u043b\u0435\u0436\u0430\u0442 \u0437\u0434\u0435\u0441\u044c: <code>adt-bundle-windows\\sdk\\platforms\\android-&lt;\u0412\u0435\u0440\u0441\u0438\u044f API&gt;\\data\\res\\values\\themes.xml<\/code>. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0443\u0442\u0438\u043b\u0438\u0442\u044b Android SDK Manager, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u0438\u0437 Eclipse, \u043c\u0435\u043d\u044e <code>Window-&gt;Android SDK Manager<\/code>.<\/p>\n<p>  \u0418 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0421\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u043c\u0438 \u0441\u0442\u0438\u043b\u044c \u043d\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u0441\u0442\u0438\u043b\u044f \u043a\u043d\u043e\u043f\u043e\u043a, \u0430 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043d\u0430\u0448 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044f\u043b \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0436\u0438\u043c\u0430\u0442\u044c\u0441\u044f. \u042d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443. \u041a\u0430\u043a \u044d\u0442\u043e \u0432\u044b\u043b\u0435\u0447\u0438\u0442\u044c? \u041d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 \u0441\u0442\u0438\u043b\u044c \u043e\u0442 \u0441\u0442\u0438\u043b\u044f <code>android:style\/Widget.Button.Toggle<\/code> \u2014 \u044d\u0442\u043e \u0441\u0442\u0438\u043b\u044c \u0432\u0441\u0435\u0445 <code>ToggleButton<\/code> \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:  <\/p>\n<pre><code class=\"xml\">    &lt;style name=&quot;styleOnOffButton&quot; parent=&quot;android:style\/Widget.Button.Toggle&quot;&gt;        &lt;item name=&quot;android:background&quot;&gt;@drawable\/button_background&lt;\/item&gt;        &lt;item name=&quot;android:drawableRight&quot;&gt;@drawable\/icon_on_off&lt;\/item&gt;        &lt;item name=&quot;android:gravity&quot;&gt;left|center_vertical&lt;\/item&gt;        &lt;item name=&quot;android:onClick&quot;&gt;onToggleButtonClick&lt;\/item&gt;        &lt;item name=&quot;android:textColor&quot;&gt;@color\/text_color&lt;\/item&gt;        &lt;item name=&quot;android:textSize&quot;&gt;24sp&lt;\/item&gt;        &lt;item name=&quot;android:textStyle&quot;&gt;bold|italic&lt;\/item&gt;     &lt;\/style&gt; <\/code><\/pre>\n<p>  \u041e\u0442\u043a\u0443\u0434\u0430 \u044f \u0432\u0437\u044f\u043b <code>android:style\/Widget.Button.Toggle<\/code>? \u0418\u0437 \u0442\u0435\u0445 \u0436\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432 Android, \u0444\u0430\u0439\u043b <code>styles.xml<\/code>.<\/p>\n<h5>\u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439: dimens.xml<\/h5>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u043a \u043d\u0430\u0434\u043e. \u041d\u043e \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0449\u0435 \u043f\u0430\u0440\u0443 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0439. \u041a\u0430\u043a \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0432 \u0441\u0442\u0438\u043b\u0435 <code>styleOnOffButton<\/code> \u0435\u0441\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>android:textSize<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0430\u043d \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439 <code>24sp<\/code>. \u0415\u0441\u043b\u0438 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0435\u0449\u0435 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0442\u0435\u043a\u0441\u0442, \u043a\u0440\u043e\u043c\u0435 \u043a\u043d\u043e\u043f\u043e\u043a, \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u0435\u0433\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u0442\u0438\u043b\u044f. \u0410 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 <code>24sp<\/code> \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0435\u0449\u0435 \u043d\u0435 \u0440\u0430\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0441\u0442\u0430\u0445. \u0418 \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u0442\u043e\u043c \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0442\u0435\u043a\u0441\u0442\u0430, \u0442\u043e \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043c\u0435\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e. \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u044a\u044f\u0432\u0438\u043c \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0444\u0430\u0439\u043b <code>res\/values\/dimens.xml<\/code> \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u0432\u0441\u0435 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c:  <\/p>\n<pre><code class=\"xml\">&lt;resources&gt;     &lt;dimen name=&quot;text_size&quot;&gt;24sp&lt;\/dimen&gt;     &lt;dimen name=&quot;activity_padding&quot;&gt;6dp&lt;\/dimen&gt; &lt;\/resources&gt; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u043a\u0440\u043e\u043c\u0435 <code>text_size<\/code> \u0437\u0434\u0435\u0441\u044c \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 \u2014 <code>activity_padding<\/code>. \u0415\u0441\u043b\u0438 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u0442\u044c \u043a\u043e\u0434 \u043d\u0430\u0448\u0435\u0433\u043e \u043c\u0430\u043a\u0435\u0442\u0430, \u0442\u043e \u0442\u0430\u043c \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 <code>android:padding=&quot;6dp&quot;<\/code> \u0432 \u0442\u0435\u0433\u0435 <code>RelativeLayout<\/code>. \u0410 \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u043e\u0442 \u0433\u0440\u0430\u043d\u0438\u0446 \u044d\u043a\u0440\u0430\u043d\u0430 \u0443 \u0432\u0441\u0435\u0445 \u043e\u043a\u043e\u043d \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c\u0438, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e-\u0441\u043e\u0431\u043e\u0439 \u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0443 <code>24sp<\/code> \u0432 \u0441\u0442\u0438\u043b\u0435 \u043d\u0430 \u043d\u043e\u0432\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441 <code>@dimen\/text_size<\/code>:  <\/p>\n<pre><code class=\"xml\">    &lt;style name=&quot;styleOnOffButton&quot; parent=&quot;android:style\/Widget.Button.Toggle&quot;&gt;        &lt;item name=&quot;android:background&quot;&gt;@drawable\/button_background&lt;\/item&gt;        &lt;item name=&quot;android:drawableRight&quot;&gt;@drawable\/icon_on_off&lt;\/item&gt;        &lt;item name=&quot;android:gravity&quot;&gt;left|center_vertical&lt;\/item&gt;        &lt;item name=&quot;android:onClick&quot;&gt;onToggleButtonClick&lt;\/item&gt;        &lt;item name=&quot;android:textColor&quot;&gt;@color\/text_color&lt;\/item&gt;        &lt;item name=&quot;android:textSize&quot;&gt;@dimen\/text_size&lt;\/item&gt;        &lt;item name=&quot;android:textStyle&quot;&gt;bold|italic&lt;\/item&gt;     &lt;\/style&gt; <\/code><\/pre>\n<p>  \u0418 \u0442\u0435\u043a\u0441\u0442 \u0442\u0435\u0433\u0430 <code>RelativeLayout<\/code> \u0432 \u0444\u0430\u0439\u043b\u0435 <code>activity_main.xml<\/code> \u0441 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439 \u0432 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u0445:  <\/p>\n<pre><code class=\"xml\">&lt;RelativeLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;     android:padding=&quot;@dimen\/activity_padding&quot;     android:background=&quot;#dddddd&quot; &gt; <\/code><\/pre>\n<h5>\u0418 \u0435\u0449\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0441\u0442\u0438\u043b\u044f\u0445<\/h5>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0434\u0443\u043c\u0430\u0435\u043c \u043e \u0441\u0442\u0438\u043b\u044f\u0445. \u041c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 <code>ToggleButton<\/code>, \u0442\u0430\u043a \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0438\u043b\u044c \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043e\u043a\u043e\u043d? \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e \u043a\u0440\u043e\u043c\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 \u043e\u0442 \u0433\u0440\u0430\u043d\u0438\u0446 \u0443 \u0432\u0441\u0435\u0445 \u043e\u043a\u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430. \u0422\u0430\u043a\u043e\u0439 \u0441\u0442\u0438\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439, \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0435\u0433\u043e \u043d\u0438 \u043e\u0442 \u0447\u0435\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0435\u0433\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0444\u0430\u0439\u043b <code>styles.xml<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043a\u043e\u043d\u0435\u0446 \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0442\u0435\u0433\u043e\u043c <code>&lt;\/resources&gt;<\/code> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:  <\/p>\n<pre><code class=\"xml\">    &lt;color name=&quot;activity_background_color&quot;&gt;#dddddd&lt;\/color&gt;         &lt;style name=&quot;styleActivity&quot;&gt;        &lt;item name=&quot;android:background&quot;&gt;@color\/activity_background_color&lt;\/item&gt;        &lt;item name=&quot;android:padding&quot;&gt;@dimen\/activity_padding&lt;\/item&gt;     &lt;\/style&gt; <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0441\u043f\u043e\u0441\u043e\u0431 \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0446\u0432\u0435\u0442 \u2014 \u0432 \u0444\u0430\u0439\u043b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0442\u0435\u0433\u0430 <code>color<\/code>.<\/p>\n<p>  \u041d\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 <code>RelativeLayout<\/code> \u2014 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 Activity, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0438\u043b\u044c \u0432\u0441\u0435\u043c <code>RelativeLayout<\/code>, \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b\u0438 \u0441 <code>ToggleButton<\/code>. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u0438\u043b\u044c \u043d\u0443\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044f\u0432\u043d\u043e \u0432 \u0442\u0435\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0445, \u0433\u0434\u0435 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>style<\/code>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0441\u0442\u0438\u043b\u044c \u043d\u0430\u0448\u0435\u043c\u0443 \u043c\u0430\u043a\u0435\u0442\u0443 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0432 \u0438 \u0442\u043e\u0433\u0435 \u0443 \u043d\u0430\u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:  <\/p>\n<pre><code class=\"xml\">&lt;RelativeLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;     style=&quot;@style\/styleActivity&quot; &gt;      &lt;ToggleButton        android:id=&quot;@+id\/act_main_btn_telephony&quot;        android:layout_width=&quot;match_parent&quot;        android:layout_height=&quot;wrap_content&quot;        android:drawableLeft=&quot;@drawable\/icon_phone&quot;        android:textOn=&quot;@string\/act_main_telephony&quot;        android:textOff=&quot;@string\/act_main_telephony&quot; \/&gt;  &lt;\/RelativeLayout&gt; <\/code><\/pre>\n<p>  \u0412\u0441\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043e\u043a\u043e\u043d \u0443 \u043d\u0430\u0441 \u0432 \u0441\u0442\u0438\u043b\u044f\u0445. \u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 Activity \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0442\u0438\u043b\u044c <code>style=&quot;@style\/styleActivity&quot;<\/code> \u0435\u0435 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443, \u0438 \u043e\u043a\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a \u0436\u0435, \u043a\u0430\u043a \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043e\u043a\u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. <\/p>\n<h5>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h5>\n<p>  \u0421\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043c\u0430\u043a\u0435\u0442\u0430 \u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c. \u0412\u043e\u0442, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0431\u044b\u043b\u043e:  <\/p>\n<pre><code class=\"xml\">&lt;RelativeLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;     android:padding=&quot;6dp&quot;     android:background=&quot;#dddddd&quot; &gt;      &lt;ToggleButton        android:id=&quot;@+id\/act_main_btn_telephony&quot;        android:layout_width=&quot;match_parent&quot;        android:layout_height=&quot;wrap_content&quot;        android:background=&quot;@drawable\/button_background&quot;        android:drawableLeft=&quot;@drawable\/icon_phone&quot;        android:drawableRight=&quot;@drawable\/icon_on_off&quot;        android:gravity=&quot;left|center_vertical&quot;        android:textOn=&quot;\u0422\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u044f&quot;        android:textOff=&quot;\u0422\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u044f&quot;        android:textSize=&quot;24sp&quot;        android:textStyle=&quot;bold|italic&quot;        android:textColor=&quot;@color\/text_color&quot;        android:onClick=&quot;onToggleButtonClick&quot; \/&gt;  &lt;\/RelativeLayout&gt; <\/code><\/pre>\n<p>  \u0418 \u0432\u043e\u0442, \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:  <\/p>\n<pre><code class=\"xml\">&lt;RelativeLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;     style=&quot;@style\/styleActivity&quot; &gt;      &lt;ToggleButton        android:id=&quot;@+id\/act_main_btn_telephony&quot;        android:layout_width=&quot;match_parent&quot;        android:layout_height=&quot;wrap_content&quot;        android:drawableLeft=&quot;@drawable\/icon_phone&quot;        android:textOn=&quot;@string\/act_main_telephony&quot;        android:textOff=&quot;@string\/act_main_telephony&quot; \/&gt;  &lt;\/RelativeLayout&gt; <\/code><\/pre>\n<p>  \u041f\u0440\u0430\u0432\u0434\u0430 \u0441\u0442\u0430\u043b\u043e \u043a\u0440\u0430\u0441\u0438\u0432\u0435\u0435? \u0412\u0441\u0435 \u043e\u0431\u0449\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u043a\u043d\u043e\u043f\u043e\u043a \u0438 \u043e\u043a\u043e\u043d \u0432 \u0441\u0442\u0438\u043b\u044f\u0445. \u0421\u043e\u0437\u0434\u0430\u0432\u0430\u044f \u043d\u043e\u0432\u044b\u0435 \u043a\u043d\u043e\u043f\u043a\u0438, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442 \u043d\u043e\u0432\u0443\u044e \u043a\u043d\u043e\u043f\u043a\u0443 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445: \u0438\u043a\u043e\u043d\u043a\u0430, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435, \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440, \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435.<\/p>\n<p>  \u0412\u0441\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0441\u043f\u0440\u044f\u0442\u0430\u043d\u044b \u0432 \u0444\u0430\u0439\u043b\u0435 <code>dimens.xml<\/code>, \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u043f\u0430\u0441\u0442\u0430 \u043e\u0434\u043d\u0438\u0445 \u0438 \u0442\u0435\u0445 \u0436\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u0443 \u043d\u0430\u0441 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0412\u0441\u0435 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u2014 \u0432 \u0444\u0430\u0439\u043b\u0435 <code>strings.xml<\/code>. \u0414\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0434 \u0434\u0440\u0443\u0433\u0438\u0435 \u044f\u0437\u044b\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b.<\/p>\n<p>  \u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u043c \u0437\u0430\u043c\u0435\u0442\u043d\u0430 \u0434\u0430\u0436\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0435 \u043e\u043a\u043d\u0430. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0438\u0445 \u0432 \u043e\u043a\u043d\u0435 \u0434\u0435\u0441\u044f\u0442\u043a\u0438, \u0430 \u043f\u043e\u0442\u043e\u043c\u0443 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u0440\u043e\u0449\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0438 \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0442\u044c. \u041c\u043e\u0435 \u0441\u0430\u043c\u043e\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=com.fuib.android.ipumb.phone\">iPUMB \u2014 \u041f\u0423\u041c\u0411 online<\/a> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043a\u043e\u043b\u043e 40 activity. \u0415\u0441\u043b\u0438 \u0431\u044b \u043d\u0435 \u0441\u0442\u0438\u043b\u0438, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u0435 \u043e\u043a\u043e\u043d \u043f\u043e 40 \u0440\u0430\u0437, \u0438 \u0435\u0441\u043b\u0438 \u0434\u0438\u0437\u0430\u0439\u043d\u0435\u0440\u044b \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u044e\u0442 \u0447\u0442\u043e-\u0442\u043e \u043d\u043e\u0432\u043e\u0435, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0431\u044b 40 \u0440\u0430\u0437 \u044d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043c\u0435\u043d\u044f\u0442\u044c. <\/p>\n<p>  \u0415\u0449\u0435 \u043e\u0434\u043d\u0430 \u043f\u0440\u0435\u043b\u0435\u0441\u0442\u044c \u0441\u0442\u0438\u043b\u0435\u0439 \u2014 \u044d\u0442\u043e \u0443\u043d\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430 \u043f\u0440\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u041e\u0434\u0438\u043d \u0440\u0430\u0437 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0442\u0438\u043b\u044f \u0434\u0430\u043b \u0432\u0441\u0435\u043c \u0447\u043b\u0435\u043d\u0430\u043c \u043d\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0442\u043a\u0438 \u043e\u043a\u043e\u043d, \u0438 \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u043e\u043a\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438, \u043a\u0430\u043a \u0435\u0434\u0438\u043d\u043e\u0435 \u0446\u0435\u043b\u043e\u0435, \u0438 \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u043e\u0432 \u0438 \u00ab\u043f\u043e\u0434\u0433\u043e\u043d\u043e\u043a\u00bb. <\/p>\n<p>  \u0411\u0443\u0434\u0443 \u0440\u0430\u0434, \u0435\u0441\u043b\u0438 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u043d\u0430. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044c\u044f\u0445 \u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u0435\u043b\u044e\u0441\u044c \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u044f\u043c\u0438 \u0432\u0435\u0440\u0441\u0442\u043a\u0438 \u0432 Android.<\/p>\n<h5>\u041f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438<\/h5>\n<p>  <a href=\"https:\/\/drive.google.com\/file\/d\/0BybbKWPLbv8ZMF91cUNtTnE3Tmc\/edit?usp=sharing\">\u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438<\/a><br \/>  <a href=\"https:\/\/drive.google.com\/file\/d\/0BybbKWPLbv8ZbzFEX2V1b3o5RkU\/edit?usp=sharing\">\u041f\u0440\u043e\u0435\u043a\u0442 Android-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u0432 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/206012\/\">\u0422\u0430\u0439\u043d\u044b \u043a\u043d\u043e\u043f\u043e\u043a \u0432 Android. \u0427\u0430\u0441\u0442\u044c 1: \u041e\u0441\u043d\u043e\u0432\u044b \u0432\u0435\u0440\u0441\u0442\u043a\u0438<\/a><br \/>  <a href=\"http:\/\/developer.android.com\/guide\/topics\/resources\/localization.html\">\u041b\u043e\u043a\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439<\/a><br \/>  <a href=\"http:\/\/developer.android.com\/guide\/topics\/resources\/providing-resources.html#BestMatch\">\u041a\u0430\u043a Android \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0440\u0435\u0441\u0443\u0440\u0441<\/a>    \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\/206064\/\"> http:\/\/habrahabr.ru\/post\/206064\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u043e.<\/p>\n<p>  \u0412 <a href=\"http:\/\/habrahabr.ru\/post\/206012\/\">\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439<\/a> \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u0440\u0441\u0442\u043a\u0443, \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u043a\u043d\u043e\u043f\u043a\u0443 \u201c\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c\/\u0432\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u201d, \u0438 \u0432\u043e\u0442 \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0442\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:  <\/p>\n<pre><code class=\"xml\">&lt;RelativeLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;     android:padding=&quot;6dp&quot;     android:background=&quot;#dddddd&quot; &gt;      &lt;ToggleButton        android:id=&quot;@+id\/act_main_btn_telephony&quot;        android:layout_width=&quot;match_parent&quot;        android:layout_height=&quot;wrap_content&quot;        android:background=&quot;@drawable\/button_background&quot;        android:drawableLeft=&quot;@drawable\/icon_phone&quot;        android:drawableRight=&quot;@drawable\/icon_on_off&quot;        android:gravity=&quot;left|center_vertical&quot;        android:textOn=&quot;\u0422\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u044f&quot;        android:textOff=&quot;\u0422\u0435\u043b\u0435\u0444\u043e\u043d\u0438\u044f&quot;        android:textSize=&quot;24sp&quot;        android:textStyle=&quot;bold|italic&quot;        android:textColor=&quot;@color\/text_color&quot;        android:onClick=&quot;onToggleButtonClick&quot; \/&gt;  &lt;\/RelativeLayout&gt; <\/code><\/pre>\n<p>  XML-\u043a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u0441\u0438\u0441\u0442\u044b\u0439. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e-\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u043c\u0443 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u043c. \u041c\u044b \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u043c \u043a\u043e\u0434 \u0432\u0434\u0432\u043e\u0435, \u0443\u0431\u0440\u0430\u0432 \u0432\u0441\u0435, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u0442\u0440\u0443\u0434\u043d\u0438\u0442\u044c \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043d\u0435\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u043e \u0442\u0438\u043c-\u043b\u0438\u0434\u0430. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b (<code>strings.xml<\/code>), \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439 (<code>dimens.xml<\/code>), \u0441\u0442\u0438\u043b\u0438 \u0438 \u0442\u0435\u043c\u044b (<code>styles.xml<\/code>).<\/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-206064","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/206064","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=206064"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/206064\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=206064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=206064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=206064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}