久久久久久久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ì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                問(wèn)題描述

                我想創(chuàng)建一個(gè)自定義對(duì)話框.所以我創(chuàng)建了一個(gè)模板dialog_change"并打開(kāi)了對(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ú)法完全擺脫框架的奇怪問(wèn)題).類似這樣的東西,但您可以隨意擴(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),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(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. 主站蜘蛛池模板: www.99精品 | 一区二区国产精品 | 国产午夜在线 | 国产日韩精品一区 | 黄色激情毛片 | 亚洲国产一区二区视频 | 久久精品视频免费观看 | 国产乱码精品一区二三赶尸艳谈 | 四虎在线观看 | 国产精品视频 | 黄色精品 | 久草视频观看 | 色欧美片视频在线观看 | 一区二区免费在线 | 国产精品久久久久久久久图文区 | 国产91精品久久久久久久网曝门 | 黄色毛片在线播放 | 国产sm主人调教女m视频 | 精品视频一区二区 | 国产成人精品免高潮在线观看 | 成人网在线看 | 91免费小视频 | 美女久久久久 | 亚洲欧美在线一区 | 国产精品成av人在线视午夜片 | 在线国产精品一区 | 一级毛片色一级 | 日韩av电影院 | 黑人性hd | 日本视频免费 | 在线中文av| 亚洲欧美在线一区 | 亚洲人的av | 蜜臀久久| 日本不卡免费新一二三区 | 在线观看国产精品视频 | 久久综合九色综合欧美狠狠 | 国产激情自拍视频 | 欧美一区二区三区精品免费 | 国产激情视频在线观看 | 91成人免费 |