久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    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="qwawimqqmiuu" id='Eanse'><tfoot id='Eanse'></tfoot><dl id='Eanse'><fieldset id='Eanse'></fieldset></dl></div>
    2. 如何在自定義對(duì)話框中創(chuàng)建正面和負(fù)面按鈕

      How can I create positive and negative buttons at custom dialogs(如何在自定義對(duì)話框中創(chuàng)建正面和負(fù)面按鈕)
        <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="qwawimqqmiuu" id='g3Uck'><tfoot id='g3Uck'></tfoot><dl id='g3Uck'><fieldset id='g3Uck'></fieldset></dl></div>

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

              1. 本文介紹了如何在自定義對(duì)話框中創(chuàng)建正面和負(fù)面按鈕的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                問題描述

                我想創(chuàng)建一個(gè)自定義對(duì)話框.所以我創(chuàng)建了一個(gè)模板dialog_change"并打開了對(duì)話框.

                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();
                

                現(xiàn)在我想在底部添加兩個(gè)按鈕(一個(gè)正按鈕和一個(gè)負(fù)按鈕).我該怎么做?

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

                推薦答案

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

                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);
                    }
                }
                

                這篇關(guān)于如何在自定義對(duì)話框中創(chuàng)建正面和負(fù)面按鈕的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                相關(guān)文檔推薦

                Get user#39;s current location using GPS(使用 GPS 獲取用戶的當(dāng)前位置)
                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(如何檢測(cè)位置提供者?GPS 或網(wǎng)絡(luò)提供商)
                Get current location during app launch(在應(yīng)用啟動(dòng)期間獲取當(dāng)前位置)
                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="qwawimqqmiuu" 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. 主站蜘蛛池模板: 99精品国产一区二区三区 | 四虎影音 | 久久综合久久综合久久 | 欧美a区| 国产一区二区在线免费观看 | 一级黄色片日本 | 欧美日韩精品综合 | 久久久美女 | 国产三级电影网站 | 亚洲精品视频在线播放 | 日韩精品在线视频 | 久久九九免费 | 日本久草 | 成人精品| 国产高清免费 | 欧美在线观看一区 | 国产区一区二区三区 | 欧美色综合网 | www久久国产 | 欧美一级片在线看 | 欧美精品黄 | 日韩精品一区二区三区在线观看 | 久久一区二区视频 | av在线天堂| 中文字幕乱码视频32 | 国产成人综合av | 日韩成人在线观看 | www.黄色片视频 | 国产精品入口麻豆www | 国产精品欧美一区二区三区不卡 | 人人草天天草 | 免费视频一区 | 日本高清视频在线播放 | 91久久国产精品 | 一区二区久久 | 国产免费看 | 黄色一级片在线播放 | 一级黄色片免费在线观看 | 91免费高清| 成人免费小视频 | 成人免费视频网站在线观看 |