pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

    1. <tfoot id='Eanse'></tfoot>

      <small id='Eanse'></small><noframes id='Eanse'>

      <legend id='Eanse'><style id='Eanse'><dir id='Eanse'><q id='Eanse'></q></dir></style></legend>
      • <bdo id='Eanse'></bdo><ul id='Eanse'></ul>
      <i id='Eanse'><tr id='Eanse'><dt id='Eanse'><q id='Eanse'><span id='Eanse'><b id='Eanse'><form id='Eanse'><ins id='Eanse'></ins><ul id='Eanse'></ul><sub id='Eanse'></sub></form><legend id='Eanse'></legend><bdo id='Eanse'><pre id='Eanse'><center id='Eanse'></center></pre></bdo></b><th id='Eanse'></th></span></q></dt></tr></i><div class="sqsc4ok" id='Eanse'><tfoot id='Eanse'></tfoot><dl id='Eanse'><fieldset id='Eanse'></fieldset></dl></div>
    2. 如何在自定義對話框中創建正面和負面按鈕

      How can I create positive and negative buttons at custom dialogs(如何在自定義對話框中創建正面和負面按鈕)
        <tbody id='g3Uck'></tbody>
      <legend id='g3Uck'><style id='g3Uck'><dir id='g3Uck'><q id='g3Uck'></q></dir></style></legend>
          • <bdo id='g3Uck'></bdo><ul id='g3Uck'></ul>
            <tfoot id='g3Uck'></tfoot>

                <i id='g3Uck'><tr id='g3Uck'><dt id='g3Uck'><q id='g3Uck'><span id='g3Uck'><b id='g3Uck'><form id='g3Uck'><ins id='g3Uck'></ins><ul id='g3Uck'></ul><sub id='g3Uck'></sub></form><legend id='g3Uck'></legend><bdo id='g3Uck'><pre id='g3Uck'><center id='g3Uck'></center></pre></bdo></b><th id='g3Uck'></th></span></q></dt></tr></i><div class="8ciio2i" id='g3Uck'><tfoot id='g3Uck'></tfoot><dl id='g3Uck'><fieldset id='g3Uck'></fieldset></dl></div>

                <small id='g3Uck'></small><noframes id='g3Uck'>

              1. 本文介紹了如何在自定義對話框中創建正面和負面按鈕的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我想創建一個自定義對話框.所以我創建了一個模板dialog_change"并打開了對話框.

                I want to create a custom dialog. So i create a template 'dialog_change' and I open the dialog.

                Dialog myDialog = new Dialog(Overview.this);
                myDialog.setContentView(R.layout.dialog_change);
                myDialog.setTitle("My Custom Dialog Title");
                myDialog.show();
                

                現在我想在底部添加兩個按鈕(一個正按鈕和一個負按鈕).我該怎么做?

                Now i want to add two button (one positive and one negative button), at the bottom. How can i do that?

                推薦答案

                我只是制作你自己的自定義類來模擬一個 AlertDialog,這樣你就可以使用你自己的布局而不附加任何字符串.(如果您想要一個完全樣式化的 AlertDialog,則存在一些無法完全擺脫框架的奇怪問題).類似這樣的東西,但您可以隨意擴展它:

                I'd just make your own custom class to simulate an AlertDialog, this way you can use your own layout with no strings attached. (There are some weird issues where you can't fully get rid of the frame if you want a fully styled AlertDialog). Something like this, but you can expand this as fully as you want:

                public class CustomDialog extends Dialog {
                    private Button positive, negative;
                
                    public CustomDialog(Context context) {
                        super(context);
                        initialize(context);
                    }
                
                    protected CustomDialog(Context context, boolean cancelable, OnCancelListener cancelListener) {
                        super(context, cancelable, cancelListener);
                        initialize(context);
                    }
                
                    public CustomDialog(Context context, int theme) {
                        super(context, theme);
                        initialize(context);
                    }
                
                    private void initialize(Context c) {
                        //Inflate your layout, get a handle for the buttons
                
                        positive = (Button)layout.findViewById(R.id.positive):
                        negative = (Button)layout.findViewById(R.id.negative):
                
                        positive.setVisibility(View.GONE);
                        negative.setVisibility(View.GONE);
                    }
                
                    public void setPositiveButton(String buttonText, View.OnClickListener listener) {
                        positive.setText(buttonText);
                        positive.setOnClickListener(listener);
                        positive.setVisibility(View.VISIBLE);
                    }
                
                    public void setNegativeButton(String buttonText, View.OnClickListener listener) {
                        negative.setText(buttonText);
                        negative.setOnClickListener(listener);
                        negative.setVisibility(View.VISIBLE);
                    }
                }
                

                這篇關于如何在自定義對話框中創建正面和負面按鈕的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Get user#39;s current location using GPS(使用 GPS 獲取用戶的當前位置)
                IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網絡提供商)
                Get current location during app launch(在應用啟動期間獲取當前位置)
                locationManager.getLastKnownLocation() return null(locationManager.getLastKnownLocation() 返回 null)

                <small id='LnOaO'></small><noframes id='LnOaO'>

                  <legend id='LnOaO'><style id='LnOaO'><dir id='LnOaO'><q id='LnOaO'></q></dir></style></legend>

                  <i id='LnOaO'><tr id='LnOaO'><dt id='LnOaO'><q id='LnOaO'><span id='LnOaO'><b id='LnOaO'><form id='LnOaO'><ins id='LnOaO'></ins><ul id='LnOaO'></ul><sub id='LnOaO'></sub></form><legend id='LnOaO'></legend><bdo id='LnOaO'><pre id='LnOaO'><center id='LnOaO'></center></pre></bdo></b><th id='LnOaO'></th></span></q></dt></tr></i><div class="ww0gcyq" id='LnOaO'><tfoot id='LnOaO'></tfoot><dl id='LnOaO'><fieldset id='LnOaO'></fieldset></dl></div>
                      <tbody id='LnOaO'></tbody>

                        <bdo id='LnOaO'></bdo><ul id='LnOaO'></ul>

                      • <tfoot id='LnOaO'></tfoot>
                        1. 主站蜘蛛池模板: 发电机价格|发电机组价格|柴油发电机价格|柴油发电机组价格网 | 换网器_自动换网器_液压换网器--郑州海科熔体泵有限公司 | 上海小程序开发-上海小程序制作公司-上海网站建设-公众号开发运营-软件外包公司-咏熠科技 | 衬氟旋塞阀-卡套旋塞阀-中升阀门首页 | 玻璃瓶厂家_酱菜瓶厂家_饮料瓶厂家_酒瓶厂家_玻璃杯厂家_徐州东明玻璃制品有限公司 | 消泡剂-水处理消泡剂-涂料消泡剂-切削液消泡剂价格-东莞德丰消泡剂厂家 | 小程序开发公司_APP开发多少钱_软件开发定制_微信小程序制作_客户销售管理软件-济南小溪畅流网络科技有限公司 | 广州物流公司_广州货运公司_广州回程车运输 - 万信物流 | 湖南专升本-湖南省专升本报名-湖南统招专升本考试网 | 视频直播 -摄影摄像-视频拍摄-直播分发 | 热缩管切管机-超声波切带机-织带切带机-无纺布切布机-深圳市宸兴业科技有限公司 | 柔软云母板-硬质-水位计云母片组件-首页-武汉长丰云母绝缘材料有限公司 | 不锈钢轴流风机,不锈钢电机-许昌光维防爆电机有限公司(原许昌光维特种电机技术有限公司) | 高精度-恒温冷水机-螺杆式冰水机-蒸发冷冷水机-北京蓝海神骏科技有限公司 | 手持式线材张力计-套帽式风量罩-深圳市欧亚精密仪器有限公司 | 裹包机|裹膜机|缠膜机|绕膜机-上海晏陵智能设备有限公司 | 质构仪_鱼糜弹性仪-上海腾拔仪器科技有限公司 | 渗透仪-直剪仪-三轴仪|苏州昱创百科| 成人纸尿裤,成人尿不湿,成人护理垫-山东康舜日用品有限公司 | 砂磨机_立式纳米砂磨机_实验室砂磨机-广州儒佳化工设备厂家 | 车辆定位管理系统_汽车GPS系统_车载北斗系统 - 朗致物联 | TYPE-C厂家|TYPE-C接口|TYPE-C防水母座|TYPE-C贴片-深圳步步精 | 小青瓦丨古建筑瓦丨青瓦厂家-宜兴市徽派古典建筑材料有限公司 | 苏商学院官网 - 江苏地区唯一一家企业家自办的前瞻型、实操型商学院 | 防爆电机生产厂家,YBK3电动机,YBX3系列防爆电机,YBX4节防爆电机--河南省南洋防爆电机有限公司 | 湖南教师资格网-湖南教师资格证考试网 | 河南膏药贴牌-膏药代加工-膏药oem厂家-洛阳今世康医药科技有限公司 | 钢绞线万能材料试验机-全自动恒应力两用机-混凝土恒应力压力试验机-北京科达京威科技发展有限公司 | 江苏南京多语种翻译-专业翻译公司报价-正规商务翻译机构-南京华彦翻译服务有限公司 | 闸阀_截止阀_止回阀「生产厂家」-上海卡比阀门有限公司 | 北京易通慧公司从事北京网站优化,北京网络推广、网站建设一站式服务商-北京网站优化公司 | CE认证_产品欧盟ROHS-REACH检测机构-商通检测 | MOOG伺服阀维修,ATOS比例流量阀维修,伺服阀维修-上海纽顿液压设备有限公司 | 24位ADC|8位MCU-芯易德科技有限公司| 闪电优家-卫生间防水补漏_酒店漏水渗水维修_防水堵漏公司 | 警用|治安|保安|不锈钢岗亭-售货亭价格-垃圾分类亭-移动厕所厂家-苏州灿宇建材 | PC构件-PC预制构件-构件设计-建筑预制构件-PC构件厂-锦萧新材料科技(浙江)股份有限公司 | 门禁卡_智能IC卡_滴胶卡制作_硅胶腕带-卡立方rfid定制厂家 | ★塑料拖链__工程拖链__电缆拖链__钢制拖链 - 【上海闵彬】 | MOOG伺服阀维修,ATOS比例流量阀维修,伺服阀维修-上海纽顿液压设备有限公司 | 欧必特空气能-商用空气能热水工程,空气能热水器,超低温空气源热泵生产厂家-湖南欧必特空气能公司 |