读书人

怎么让Dialog背景色透明

发布时间: 2012-11-22 00:16:41 作者: rapoo

如何让Dialog背景色透明

在做dialog对话框时,默认内容和边框的颜色不一致。个人感觉不太美观。

找到一个神奇的属性,可以其颜色一致。

如下:

myDialog.setPlain(true);

参看API说明:

?

  /**   * True to render the window body with a transparent background so that it   * will blend into the framing elements, false to add a lighter background   * color to visually highlight the body element and separate it more   * distinctly from the surrounding frame (defaults to false).   *    * @param plain true to enable the plain style   */  public void setPlain(boolean plain) {    this.plain = plain;  }
? 1 楼 qq371390323 2012-02-23 我怎么没这个属性

读书人网 >Web前端

热点推荐