{"id":2534,"date":"2025-11-11T09:45:29","date_gmt":"2025-11-11T02:45:29","guid":{"rendered":"https:\/\/portal-atlasx.cdg.co.th\/home\/?post_type=docs&#038;p=2534"},"modified":"2025-11-11T15:17:11","modified_gmt":"2025-11-11T08:17:11","slug":"alert","status":"publish","type":"docs","link":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/android\/library\/alert\/","title":{"rendered":"Alert"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"alertutil\" style=\"font-style:normal;font-weight:600\">AlertUtil<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"class-initialize\"><strong>Class Initialize<\/strong><\/h2>\n\n\n\n<p>\u0e01\u0e32\u0e23\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 \u0e08\u0e30\u0e21\u0e35 2 \u0e01\u0e23\u0e13\u0e35\u0e04\u0e37\u0e2d \u0e16\u0e49\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e43\u0e0a\u0e49 companion object function \u0e08\u0e30\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e44\u0e14\u0e49 1 function \u0e04\u0e37\u0e2d setAlertButtonColor() \u0e41\u0e15\u0e48\u0e16\u0e49\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e08\u0e30\u0e43\u0e0a\u0e49 function \u0e2d\u0e37\u0e48\u0e19\u0e46 \u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e1b\u0e23\u0e30\u0e01\u0e32\u0e28 object \u0e02\u0e2d\u0e07\u0e04\u0e25\u0e32\u0e2a\u0e15\u0e32\u0e21\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>AlertUtil(private val context: Context) <\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #795E26\">AlertUtil<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">private<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">val<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">context<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">Context<\/span><span style=\"color: #000000\">) <\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"method-overview\"><strong>Method Overview<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Return<\/th><\/tr><\/thead><tbody><tr><td>setAlertButtonColor()<\/td><td>\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e2a\u0e35\u0e43\u0e2b\u0e49\u0e1b\u0e38\u0e48\u0e21\u0e43\u0e19 AlertDialog<\/td><td>Unit<\/td><\/tr><tr><td>createAlertBuilder()<\/td><td>\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07 AlertDialog.Builder \u0e42\u0e14\u0e22\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32 title \u0e41\u0e25\u0e30 detail \u0e02\u0e2d\u0e07 Alert \u0e44\u0e14\u0e49\u0e15\u0e32\u0e21\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/td><td>AlertDialog.Builder<\/td><\/tr><tr><td>createAlertFromView()<\/td><td>\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07 AlertDialog \u0e08\u0e32\u0e01 custom view<\/td><td>AlertDialog<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"method-details\"><strong>Method Details<\/strong><\/h2>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>fun setAlertButtonColor(dialog: AlertDialog , button : Int , hexColorString : String)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">fun<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">setAlertButtonColor<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">dialog<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">AlertDialog<\/span><span style=\"color: #000000\"> , <\/span><span style=\"color: #001080\">button<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #001080\">Int<\/span><span style=\"color: #000000\"> , <\/span><span style=\"color: #001080\">hexColorString<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #001080\">String<\/span><span style=\"color: #000000\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e2a\u0e35\u0e43\u0e2b\u0e49\u0e1b\u0e38\u0e48\u0e21\u0e43\u0e19 AlertDialog<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters\"><strong>Parameters<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>dialog<\/td><td>AlertDialog \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/td><td>AlertDialog<\/td><\/tr><tr><td>button<\/td><td>ID \u0e02\u0e2d\u0e07 Button \u0e19\u0e31\u0e49\u0e19<\/td><td>Int<\/td><\/tr><tr><td>hexColorString<\/td><td>\u0e2a\u0e35\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23 \u0e42\u0e14\u0e22\u0e21\u0e35\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e40\u0e1b\u0e47\u0e19 hex color<\/td><td>String<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>fun setAlertButtonColor(dialog: AlertDialog , button : Int , color : Int)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">fun<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">setAlertButtonColor<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">dialog<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">AlertDialog<\/span><span style=\"color: #000000\"> , <\/span><span style=\"color: #001080\">button<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #001080\">Int<\/span><span style=\"color: #000000\"> , <\/span><span style=\"color: #001080\">color<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #001080\">Int<\/span><span style=\"color: #000000\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e2a\u0e35\u0e43\u0e2b\u0e49\u0e1b\u0e38\u0e48\u0e21\u0e43\u0e19 AlertDialog<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-1\"><strong>Parameters<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>dialog<\/td><td>AlertDialog \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/td><td>AlertDialog<\/td><\/tr><tr><td>button<\/td><td>ID \u0e02\u0e2d\u0e07 Button \u0e19\u0e31\u0e49\u0e19<\/td><td>Int<\/td><\/tr><tr><td>color<\/td><td>\u0e2a\u0e35\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e42\u0e14\u0e22\u0e40\u0e2d\u0e32\u0e08\u0e32\u0e01 ID \u0e02\u0e2d\u0e07 color \u0e43\u0e19 res<\/td><td>Int<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>fun setAlertButtonColor(dialog: AlertDialog , button : Int , colorId :Int , theme : Resources.Theme? = null)<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">fun<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">setAlertButtonColor<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">dialog<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">AlertDialog<\/span><span style=\"color: #000000\"> , <\/span><span style=\"color: #001080\">button<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #001080\">Int<\/span><span style=\"color: #000000\"> , <\/span><span style=\"color: #001080\">colorId<\/span><span style=\"color: #000000\"> :<\/span><span style=\"color: #001080\">Int<\/span><span style=\"color: #000000\"> , <\/span><span style=\"color: #001080\">theme<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #001080\">Resources<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">Theme<\/span><span style=\"color: #000000\">? = <\/span><span style=\"color: #0000FF\">null<\/span><span style=\"color: #000000\">)<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e2a\u0e35\u0e41\u0e25\u0e30 theme \u0e43\u0e2b\u0e49\u0e1b\u0e38\u0e48\u0e21\u0e43\u0e19 AlertDialog<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-2\"><strong>Parameters<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><th>Default<\/th><\/tr><\/thead><tbody><tr><td>dialog<\/td><td>AlertDialog \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/td><td>AlertDialog<\/td><td><\/td><\/tr><tr><td>button<\/td><td>ID \u0e02\u0e2d\u0e07 Button \u0e19\u0e31\u0e49\u0e19<\/td><td>Int<\/td><td><\/td><\/tr><tr><td>colorId<\/td><td>\u0e2a\u0e35\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e42\u0e14\u0e22\u0e40\u0e2d\u0e32\u0e08\u0e32\u0e01 ID \u0e02\u0e2d\u0e07 color \u0e43\u0e19 res<\/td><td>Int<\/td><td><\/td><\/tr><tr><td>theme<\/td><td>Theme \u0e02\u0e2d\u0e07 Button \u0e43\u0e19 AlertDialog<\/td><td>Resources.Theme?<\/td><td>null<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>fun createAlertBuilder(titleMsg : String , detailMsg: String) : AlertDialog.Builder<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">fun<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">createAlertBuilder<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">titleMsg<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #001080\">String<\/span><span style=\"color: #000000\"> , <\/span><span style=\"color: #001080\">detailMsg<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">String<\/span><span style=\"color: #000000\">) : <\/span><span style=\"color: #001080\">AlertDialog<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">Builder<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07 AlertDialog.Builder \u0e42\u0e14\u0e22\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32 title \u0e41\u0e25\u0e30 detail \u0e02\u0e2d\u0e07 Alert \u0e44\u0e14\u0e49\u0e15\u0e32\u0e21\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-3\"><strong>Parameters<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>titleMsg<\/td><td>\u0e2b\u0e31\u0e27\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e02\u0e2d\u0e07 AlertDialog<\/td><td>String<\/td><\/tr><tr><td>detailMsg<\/td><td>\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e02\u0e2d\u0e07 AlertDialog<\/td><td>String<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"returns\"><strong>Returns<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>AlertDialog.Builder<\/td><td>AlertDialog.Builder \u0e17\u0e35\u0e48\u0e21\u0e35 title \u0e41\u0e25\u0e30 detail \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e44\u0e27\u0e49 \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e44\u0e1b custom \u0e15\u0e48\u0e2d\u0e44\u0e14\u0e49 \u0e2b\u0e23\u0e37\u0e2d\u0e08\u0e30 .create().show() \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>fun createAlertBuilder(@StringRes titleMsgId : Int , @StringRes detailMsgId: Int) : AlertDialog.Builder<\/code><\/pre>\n\n\n\n<p>\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07 AlertDialog.Builder \u0e42\u0e14\u0e22\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32 title \u0e41\u0e25\u0e30 detail \u0e02\u0e2d\u0e07 Alert \u0e44\u0e14\u0e49\u0e15\u0e32\u0e21\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-4\"><strong>Parameters<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>titleMsgId<\/td><td>\u0e2b\u0e31\u0e27\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e02\u0e2d\u0e07 AlertDialog \u0e42\u0e14\u0e22\u0e40\u0e1b\u0e47\u0e19 ID \u0e02\u0e2d\u0e07 string \u0e43\u0e19 res<\/td><td>Int<\/td><\/tr><tr><td>detailMsgId<\/td><td>\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e02\u0e2d\u0e07 AlertDialog \u0e42\u0e14\u0e22\u0e40\u0e1b\u0e47\u0e19 ID \u0e02\u0e2d\u0e07 string \u0e43\u0e19 res<\/td><td>Int<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"returns-1\"><strong>Returns<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>AlertDialog.Builder<\/td><td>AlertDialog.Builder \u0e17\u0e35\u0e48\u0e21\u0e35 title \u0e41\u0e25\u0e30 detail \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e44\u0e27\u0e49 \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e44\u0e1b custom \u0e15\u0e48\u0e2d\u0e44\u0e14\u0e49 \u0e2b\u0e23\u0e37\u0e2d\u0e08\u0e30 .create().show() \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>fun createAlertBuilder(titleMsg : String ,  @StringRes detailMsgId: Int) : AlertDialog.Builder<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">fun<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">createAlertBuilder<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">titleMsg<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #001080\">String<\/span><span style=\"color: #000000\"> ,  @<\/span><span style=\"color: #001080\">StringRes<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">detailMsgId<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">Int<\/span><span style=\"color: #000000\">) : <\/span><span style=\"color: #001080\">AlertDialog<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">Builder<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07 AlertDialog.Builder \u0e42\u0e14\u0e22\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32 title \u0e41\u0e25\u0e30 detail \u0e02\u0e2d\u0e07 Alert \u0e44\u0e14\u0e49\u0e15\u0e32\u0e21\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-5\"><strong>Parameters<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>titleMsg<\/td><td>\u0e2b\u0e31\u0e27\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e02\u0e2d\u0e07 AlertDialog<\/td><td>String<\/td><\/tr><tr><td>detailMsgId<\/td><td>\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e02\u0e2d\u0e07 AlertDialog \u0e42\u0e14\u0e22\u0e40\u0e1b\u0e47\u0e19 ID \u0e02\u0e2d\u0e07 string \u0e43\u0e19 res<\/td><td>Int<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"returns-2\"><strong>Returns<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>AlertDialog.Builder<\/td><td>AlertDialog.Builder \u0e17\u0e35\u0e48\u0e21\u0e35 title \u0e41\u0e25\u0e30 detail \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e44\u0e27\u0e49 \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e44\u0e1b custom \u0e15\u0e48\u0e2d\u0e44\u0e14\u0e49 \u0e2b\u0e23\u0e37\u0e2d\u0e08\u0e30 .create().show() \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>fun createAlertBuilder(@StringRes titleMsgId : Int , detailMsg: String) : AlertDialog.Builder<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">fun<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">createAlertBuilder<\/span><span style=\"color: #000000\">(@<\/span><span style=\"color: #001080\">StringRes<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">titleMsgId<\/span><span style=\"color: #000000\"> : <\/span><span style=\"color: #001080\">Int<\/span><span style=\"color: #000000\"> , <\/span><span style=\"color: #001080\">detailMsg<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">String<\/span><span style=\"color: #000000\">) : <\/span><span style=\"color: #001080\">AlertDialog<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">Builder<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07 AlertDialog.Builder \u0e42\u0e14\u0e22\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32 title \u0e41\u0e25\u0e30 detail \u0e02\u0e2d\u0e07 Alert \u0e44\u0e14\u0e49\u0e15\u0e32\u0e21\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-6\"><strong>Parameters<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>titleMsgId<\/td><td>\u0e2b\u0e31\u0e27\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e02\u0e2d\u0e07 AlertDialog \u0e42\u0e14\u0e22\u0e40\u0e1b\u0e47\u0e19 ID \u0e02\u0e2d\u0e07 string \u0e43\u0e19 res<\/td><td>Int<\/td><\/tr><tr><td>detailMsg<\/td><td>\u0e23\u0e32\u0e22\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14\u0e02\u0e2d\u0e07 AlertDialog<\/td><td>String<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"returns-3\"><strong>Returns<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>AlertDialog.Builder<\/td><td>AlertDialog.Builder \u0e17\u0e35\u0e48\u0e21\u0e35 title \u0e41\u0e25\u0e30 detail \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e44\u0e27\u0e49 \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e44\u0e1b custom \u0e15\u0e48\u0e2d\u0e44\u0e14\u0e49 \u0e2b\u0e23\u0e37\u0e2d\u0e08\u0e30 .create().show() \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>fun createAlertFromView(view: View) : AlertDialog<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #001080\">fun<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #795E26\">createAlertFromView<\/span><span style=\"color: #000000\">(<\/span><span style=\"color: #001080\">view<\/span><span style=\"color: #000000\">: <\/span><span style=\"color: #001080\">View<\/span><span style=\"color: #000000\">) : <\/span><span style=\"color: #001080\">AlertDialog<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07 AlertDialog \u0e08\u0e32\u0e01 custom view<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"parameters-7\"><strong>Parameters<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Name<\/th><th>Description<\/th><th>Type<\/th><\/tr><\/thead><tbody><tr><td>view<\/td><td>\u0e40\u0e1b\u0e47\u0e19 view \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32 custom \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e15\u0e49\u0e2d\u0e07\u0e01\u0e32\u0e23\u0e42\u0e0a\u0e27\u0e4c\u0e1a\u0e19 AlertDialog<\/td><td>View<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"returns-4\"><strong>Returns<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table style=\"border-width:1px\"><thead><tr><th>Type<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>AlertDialog<\/td><td>AlertDialog \u0e17\u0e35\u0e48\u0e41\u0e2a\u0e14\u0e07\u0e1c\u0e25\u0e15\u0e31\u0e27 customview<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"featured_media":0,"parent":2531,"menu_order":1,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nav_title":"","positive":"","negative":"","footnotes":""},"docs_category":[],"class_list":["post-2534","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/comments?post=2534"}],"version-history":[{"count":6,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2534\/revisions"}],"predecessor-version":[{"id":2620,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2534\/revisions\/2620"}],"up":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/2531"}],"wp:attachment":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/media?parent=2534"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs_category?post=2534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}