<tfoot id='nj5g6'></tfoot>
    <bdo id='nj5g6'></bdo><ul id='nj5g6'></ul>

<i id='nj5g6'><tr id='nj5g6'><dt id='nj5g6'><q id='nj5g6'><span id='nj5g6'><b id='nj5g6'><form id='nj5g6'><ins id='nj5g6'></ins><ul id='nj5g6'></ul><sub id='nj5g6'></sub></form><legend id='nj5g6'></legend><bdo id='nj5g6'><pre id='nj5g6'><center id='nj5g6'></center></pre></bdo></b><th id='nj5g6'></th></span></q></dt></tr></i><div id='nj5g6'><tfoot id='nj5g6'></tfoot><dl id='nj5g6'><fieldset id='nj5g6'></fieldset></dl></div>
  • <small id='nj5g6'></small><noframes id='nj5g6'>

      <legend id='nj5g6'><style id='nj5g6'><dir id='nj5g6'><q id='nj5g6'></q></dir></style></legend>
      1. 无论设备如何,Android 中的完全自定义对话框都具

        时间:2023-08-30

      2. <i id='zku9Y'><tr id='zku9Y'><dt id='zku9Y'><q id='zku9Y'><span id='zku9Y'><b id='zku9Y'><form id='zku9Y'><ins id='zku9Y'></ins><ul id='zku9Y'></ul><sub id='zku9Y'></sub></form><legend id='zku9Y'></legend><bdo id='zku9Y'><pre id='zku9Y'><center id='zku9Y'></center></pre></bdo></b><th id='zku9Y'></th></span></q></dt></tr></i><div id='zku9Y'><tfoot id='zku9Y'></tfoot><dl id='zku9Y'><fieldset id='zku9Y'></fieldset></dl></div>

                <bdo id='zku9Y'></bdo><ul id='zku9Y'></ul>
                  <tbody id='zku9Y'></tbody>

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

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

                <tfoot id='zku9Y'></tfoot>
                • 本文介绍了无论设备如何,Android 中的完全自定义对话框都具有相同的外观的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  无论操作系统主题如何,我都必须构建一个在不同设备上看起来完全相同的对话框.目前,我创建了一个 AlertDialog 并调用 alertDialog.setView(myLayout).这将创建一个包含我的视图的对话框.但是,对话框的某些部分(外部和边界线)仍然是基于操作系统的,它们在我的三星或 HTC 中看起来不同.

                  I have to build a dialog that looks exactly the same across different devices regardless of the OS theme. At the moment, I created an AlertDialog and I call alertDialog.setView(myLayout). This creates a dialog with my view. However, some parts of the dialog box (outer part and border line) are still OS based and they look different in my Samsung or HTC.

                  有没有办法创建实际的盒子?

                  Is there anyway to create the actual box?

                  推荐答案

                  去做这个

                  import android.app.Dialog;
                  import android.content.Context;
                  import android.os.Bundle;
                  
                  public class FullyscutomDialo extends Dialog{
                  
                  public FullyscutomDialo(Context context) {
                      super(context);
                      // TODO Auto-generated constructor stub
                  }
                  
                  @Override
                  public void dismiss() {
                      //do what you need before closing here
                      super.dismiss();
                  }
                  
                  @Override
                  protected void onCreate(Bundle savedInstanceState) {
                      super.onCreate(savedInstanceState);
                      //set your custom layout here
                      //use layout attribut just like activity
                  }
                  
                   }
                  

                  然后使用两行从活动中显示它(可能是 onclickevent 等)

                  then use two line to show it from activity(May be onclickevent etc)

                           FullyscutomDialo hh=new FullyscutomDialo (this);
                           hh.show()
                  

                  为透明对话框编辑

                  在对话框类的onCreate中使用

                  use In onCreate of dialog class

                   this.getWindow().setBackgroundDrawable(new ColorDrawable(0));
                  

                  干杯:):)

                  这篇关于无论设备如何,Android 中的完全自定义对话框都具有相同的外观的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Android 自定义对话框 下一篇:如何在自定义对话框中创建正面和负面按钮

                  相关文章

                  最新文章

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

                • <tfoot id='xR42c'></tfoot>

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

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