{"id":3659,"date":"2020-11-14T13:14:38","date_gmt":"2020-11-14T19:14:38","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=3659"},"modified":"2020-11-14T13:14:39","modified_gmt":"2020-11-14T19:14:39","slug":"android-alert-dialog-setnegativebutton","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/android-alert-dialog-setnegativebutton\/","title":{"rendered":"Android Alert Dialog .setNegativeButton"},"content":{"rendered":"\n<p>If you want the Negative button to not execute any command when clicked, you can specify null<\/p>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"php\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\">            .setNegativeButton(\"Cancel\", null)\n<\/pre><\/div>\n\n\n\n<p>or if we want to run stuff when Cancel is clicked<\/p>\n\n\n\n<div style=\"height: 250px; position:relative; margin-bottom: 50px;\" class=\"wp-block-simple-code-block-ace\"><pre class=\"wp-block-simple-code-block-ace\" style=\"position:absolute;top:0;right:0;bottom:0;left:0\" data-mode=\"php\" data-theme=\"monokai\" data-fontsize=\"14\" data-lines=\"Infinity\" data-showlines=\"true\" data-copy=\"false\">            .setNegativeButton(\"Cancel\") { dialog, which ->\n                variable = true\n                Toast.makeText(this, \"Cancel hit!\", Toast.LENGTH_SHORT).show()}\n            .create()?.show()<\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you want the Negative button to not execute any command when clicked, you can specify null or if we want to run stuff when Cancel is clicked<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[540],"tags":[541,644,1064,606],"class_list":["post-3659","post","type-post","status-publish","format-standard","hentry","category-android","tag-android","tag-code","tag-kotlin","tag-programming"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3659","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=3659"}],"version-history":[{"count":2,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3659\/revisions"}],"predecessor-version":[{"id":3661,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3659\/revisions\/3661"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=3659"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=3659"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=3659"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}