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. 主站蜘蛛池模板: 齿轮减速机电机一体机_齿轮减速箱加电机一体化-德国BOSERL蜗轮蜗杆减速机电机生产厂家 | 山东成考网-山东成人高考网 | 空气能暖气片,暖气片厂家,山东暖气片,临沂暖气片-临沂永超暖通设备有限公司 | 湖南自考_湖南自学考试网 | 英国公司注册-新加坡公司注册-香港公司开户-离岸公司账户-杭州商标注册-杭州优创企业 | 医院专用门厂家报价-医用病房门尺寸大全-抗菌木门品牌推荐 | 离子色谱自动进样器-青岛艾力析实验科技有限公司| 液压中心架,数控中心架,自定心中心架-烟台恒阳机电设计有限公司 行星搅拌机,双行星搅拌机,动力混合机,无锡米克斯行星搅拌机生产厂家 | 【中联邦】增稠剂_增稠粉_水性增稠剂_涂料增稠剂_工业增稠剂生产厂家 | 山东钢格板|栅格板生产厂家供应商-日照森亿钢格板有限公司 | 专业深孔加工_东莞深孔钻加工_东莞深孔钻_东莞深孔加工_模具深孔钻加工厂-东莞市超耀实业有限公司 | 博莱特空压机|博莱特-阿特拉斯独资空压机品牌核心代理商 | LED灯杆屏_LED广告机_户外LED广告机_智慧灯杆_智慧路灯-太龙智显科技(深圳)有限公司 | 成都竞价托管_抖音代运营_网站建设_成都SEM外包-成都智网创联网络科技有限公司 | 水热合成反应釜-防爆高压消解罐-西安常仪仪器设备有限公司 | 电伴热系统施工_仪表电伴热保温箱厂家_沃安电伴热管缆工业技术(济南)有限公司 | 福建省教师资格证-福建教师资格证考试网 | 澳洁干洗店加盟-洗衣店干洗连锁「澳洁干洗免费一对一贴心服务」 干洗加盟网-洗衣店品牌排行-干洗设备价格-干洗连锁加盟指南 | 课件导航网_ppt课件_课件模板_课件下载_最新课件资源分享发布平台 | 盐城网络公司_盐城网站优化_盐城网站建设_盐城市启晨网络科技有限公司 | 加盟店-品牌招商加盟-创业项目商机平台 | 带式过滤机厂家_价格_型号规格参数-江西核威环保科技有限公司 | 合肥地磅_合肥数控切割机_安徽地磅厂家_合肥世佳电工设备有限公司 | 致胜管家软件服务【在线免费体验】 | 湖南专升本-湖南省专升本报名-湖南统招专升本考试网 | 金属雕花板_厂家直销_价格低-山东慧诚建筑材料有限公司 | 干洗店加盟_洗衣店加盟_干洗店设备-伊蔻干洗「武汉总部」 | 武汉天安盾电子设备有限公司 - 安盾安检,武汉安检门,武汉安检机,武汉金属探测器,武汉测温安检门,武汉X光行李安检机,武汉防爆罐,武汉车底安全检查,武汉液体探测仪,武汉安检防爆设备 | 工业风机_环保空调_冷风机_工厂车间厂房通风降温设备旺成服务平台 | 对照品_中药对照品_标准品_对照药材_「格利普」高纯中药标准品厂家-成都格利普生物科技有限公司 澳门精准正版免费大全,2025新澳门全年免费,新澳天天开奖免费资料大全最新,新澳2025今晚开奖资料,新澳马今天最快最新图库 | 拖链电缆_柔性电缆_伺服电缆_坦克链电缆-深圳市顺电工业电缆有限公司 | 不锈钢酒柜|恒温酒柜|酒柜定制|酒窖定制-上海啸瑞实业有限公司 | 电动手术床,医用护理床,led手术无影灯-曲阜明辉医疗设备有限公司 | 楼承板设备-楼承板成型机-免浇筑楼承板机器厂家-捡来 | 论文查重_免费论文查重_知网学术不端论文查重检测系统入口_论文查重软件 | 语料库-提供经典范文,文案句子,常用文书,您的写作得力助手 | 成都治疗尖锐湿疣比较好的医院-成都治疗尖锐湿疣那家医院好-成都西南皮肤病医院 | 工作服定制,工作服定做,工作服厂家-卡珀职业服装(苏州)有限公司 | 证券新闻,热播美式保罗1984第二部_腾讯1080p-仁爱影院 | 不锈钢散热器,冷却翅片管散热器厂家-无锡市烨晟化工装备科技有限公司 | 并网柜,汇流箱,电控设备,中高低压开关柜,电气电力成套设备,PLC控制设备订制厂家,江苏昌伟业新能源科技有限公司 |