10

I'm working on the Apple Style AlertDialog feature of the AndroidRate library and can't fix some bugs on Android's 9-10 APIs.

  1. I can't remove AlertDialog border on Android's 9-10 APIs

API 19: Apple Style AlertDialog of AndroidRate library on Android API 19 API 10: Apple Style AlertDialog of AndroidRate library on Android API 10

  1. I can't fix AlertDialog width on Android's 9-10 APIs

API 19: Apple Style AlertDialog of AndroidRate library on Android API 19 API 10: Apple Style AlertDialog of AndroidRate library on Android API 10

My 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>

My layout.xml:

https://github.com/Vorlonsoft/AndroidRate/blob/master/library/src/main/res/layout/rate_dialog.xml

Could you help me?

Alexander Savin
  • 1,952
  • 1
  • 15
  • 30

2 Answers2

0

You can try to set your dialog background programmatically

For example : dialog.getWindow().setBackgroundDrawableResource(your_drawable_id(like R.drawable.rounded_corners_white_background_3))

0

Add into your style items this line:

<item name="borderlessButtonStyle">@style/Widget.AppCompat.Button.Borderless</item>

I didn't test it myself for your case but you can try it.

Gratien Asimbahwe
  • 1,606
  • 4
  • 19
  • 30