{"id":12962,"date":"2021-03-22T16:36:55","date_gmt":"2021-03-22T14:36:55","guid":{"rendered":"https:\/\/www.fandroid.info\/?page_id=12962"},"modified":"2021-03-22T16:36:55","modified_gmt":"2021-03-22T14:36:55","slug":"change_button_style","status":"publish","type":"page","link":"https:\/\/www.fandroid.info\/change_button_style\/","title":{"rendered":"\u041a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0438\u043b\u044c \u043a\u043d\u043e\u043f\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 Android Studio"},"content":{"rendered":"

\u041a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d \u043a\u043d\u043e\u043f\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f? \u041e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e — \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438.<\/p>\n

\u0412 \u0444\u0430\u0439\u043b res\/values\/style.xml \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434:<\/p>\n

<style name=\"ButtonStyle\" parent=\"@android:style\/Widget.Button\">\r\n        <item name=\"android:layout_width\">fill_parent<\/item>\r\n        <item name=\"android:textColor\">@color\/black<\/item>\r\n        <item name=\"android:textSize\">15sp<\/item>\r\n        <item name=\"android:padding\">10dp<\/item>\r\n        <item name=\"android:textStyle\">bold<\/item>\r\n        <item name=\"android:background\">@color\/colorPrimary<\/item>\r\n        <item name=\"android:gravity\">center<\/item>\r\n    <\/style><\/pre>\n

 <\/p>\n

\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0438\u043b\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 — \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0438, \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430 \u0448\u0440\u0438\u0444\u0442\u0430 \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u0430, \u0432\u044b\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043d\u0438\u0435 \u0438 \u0442.\u0434.<\/p>\n

\u0412 \u0432\u0430\u0448\u0435\u043c \u0444\u0430\u0439\u043b\u0435 XML \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u0442\u0438\u043b\u044c:<\/p>\n

<Button\r\nstyle=\"@style\/MyButtonStyle\" \r\nandroid:id=\"@+id\/btnSignIn\"\r\nandroid:layout_width=\"match_parent\"\r\nandroid:layout_height=\"wrap_content\"\r\nandroid:text=\"my button\"\/><\/pre>\n

\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0441\u0442\u0438\u043b\u0438. \u041d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043d\u043e\u043f\u043e\u043a \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0441\u0442\u0438\u043b\u044f\u043c\u0438:<\/p>\n

\"\"<\/span><\/p>\n

\u041f\u0440\u0438\u0432\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438:<\/p>\n

<Button\r\n    android:id=\"@+id\/button3\"\r\n    android:layout_width=\"match_parent\"\r\n    android:layout_height=\"wrap_content\"\r\n    android:text=\"Button3\"\r\n    style=\"@style\/Widget.AppCompat.Button.Borderless.Colored\"\r\n    \/><\/pre>\n","protected":false},"excerpt":{"rendered":"

\u041a\u0430\u043a \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u0438\u0437\u0430\u0439\u043d \u043a\u043d\u043e\u043f\u043e\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f? \u041e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e — \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0442\u0438\u043b\u044c \u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u0434\u043b\u044f \u043a\u043d\u043e\u043f\u043a\u0438. \u0412 \u0444\u0430\u0439\u043b res\/values\/style.xml \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u0434: <style name=»ButtonStyle» parent=»@android:style\/Widget.Button»> <item name=»android:layout_width»>fill_parent<\/item> <item name=»android:textColor»>@color\/black<\/item> <item name=»android:textSize»>15sp<\/item> <item name=»android:padding»>10dp<\/item> <item name=»android:textStyle»>bold<\/item> <item name=»android:background»>@color\/colorPrimary<\/item> <item name=»android:gravity»>center<\/item> <\/style>   \u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441\u0442\u0438\u043b\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0432\u0430\u0448\u0438\u043c\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438 — \u0443\u043a\u0430\u0436\u0438\u0442\u0435 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0438, \u043e\u0442\u0441\u0442\u0443\u043f\u044b […]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.fandroid.info\/wp-json\/wp\/v2\/pages\/12962"}],"collection":[{"href":"https:\/\/www.fandroid.info\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.fandroid.info\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.fandroid.info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fandroid.info\/wp-json\/wp\/v2\/comments?post=12962"}],"version-history":[{"count":2,"href":"https:\/\/www.fandroid.info\/wp-json\/wp\/v2\/pages\/12962\/revisions"}],"predecessor-version":[{"id":12965,"href":"https:\/\/www.fandroid.info\/wp-json\/wp\/v2\/pages\/12962\/revisions\/12965"}],"wp:attachment":[{"href":"https:\/\/www.fandroid.info\/wp-json\/wp\/v2\/media?parent=12962"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}