【问题标题】:Remove Custom Progress Dialog borders删除自定义进度对话框边框
【发布时间】:2013-10-21 08:14:38
【问题描述】:

我创建了一个自定义进度对话框drawables。

 <style name="MyTheme" parent="@android:style/Theme.Dialog">
        <item name="android:alertDialogStyle">@style/CustomAlertDialogStyle</item>
        <item name="android:textColorPrimary">#ABCDEF</item>
        <item name="android:textColor"> @color/heading</item>
        <item name="android:background">#00000000</item>
         <item name="android:windowFrame">@null</item>

    </style>

    <style name="CustomAlertDialogStyle">
         <item name="android:background">#00000000</item>
      <item name="android:windowFrame">@null</item>
        <item name="android:bottomBright">@color/grey</item>
        <item name="android:bottomDark">@color/grey</item>
        <item name="android:bottomMedium">@color/grey</item>
        <item name="android:centerBright">@color/grey</item>
        <item name="android:centerDark">@color/grey</item>
        <item name="android:centerMedium">@color/grey</item>
        <item name="android:fullBright">@color/grey</item>
        <item name="android:fullDark">@color/grey</item>
        <item name="android:topBright">@color/grey</item>
        <item name="android:topDark">@color/grey</item>
    </style>

一切正常,它显示了它应该显示的东西。但对话框显示边框。我想删除那些边框[附上屏幕截图]。

【问题讨论】:

    标签: android progress-bar border customization progressdialog


    【解决方案1】:

    使用dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);

    【讨论】:

      【解决方案2】:

      您还需要将以下内容添加到您的CustomAlertDialogStyle

      <item name="android:windowBackground">@android:color/transparent</item>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-01-14
        • 2017-07-18
        • 1970-01-01
        相关资源
        最近更新 更多