Ale*_*vin 10 android dialog android-alertdialog android-dialog
我正在研究AndroidRate库的Apple Style AlertDialog功能,无法解决 Android 9-10 API上的一些错误.
我的style.xml:
<?xml version="1.0" encoding="utf-8"?>
<!--
~ // Copyright 2018 Vorlonsoft LLC
~ //
~ // Licensed under The MIT License (MIT)
-->
<resources>
<!-- Base Apple and Modern types Rate Dialog theme. -->
<style name="RateDialogTransparentTheme">
<item name="android:background">@color/rateDialogColorTransparent</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:backgroundDimAmount">0.4</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowBackground">@color/rateDialogColorTransparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowTitleStyle">@null</item>
</style>
</resources>
Run Code Online (Sandbox Code Playgroud)
我的layout.xml:
https://github.com/Vorlonsoft/AndroidRate/blob/master/library/src/main/res/layout/rate_dialog.xml
你可以帮帮我吗?
小智 0
您可以尝试以编程方式设置对话框背景
例如:dialog.getWindow().setBackgroundDrawableResource(your_drawable_id(like R.drawable.rounded_corners_white_background_3))
归档时间: |
|
查看次数: |
390 次 |
最近记录: |