I have a DialogFragment which I pass the custom layout for display.
To this layout I set the background in which I round up a bit of the edge. And I expect to see a beautiful layout with rounded edges, but it turns out this
everything seems to be like, but why does this background appear above and below the form?
When I had such a situation with activism (it was the same), I solved it as described here
I added a custom theme, a background as I need and set the theme in the manifest for this activi ...
But in this situation, I can not set a custom theme in the manifest for the layout which I pass to the DialogFragment , since in the manifest only activation ...
I tried to assign the DialogFragment theme itself.
Here is my topic for him, which describes the animation
<style name="DialogFragmentTheme" parent="@android:style/Theme.Panel"> <item name="android:windowAnimationStyle">@style/MyAnimation.Window</item> </style> <style name="MyAnimation.Window" parent="@android:style/Animation.Activity"> <item name="android:windowEnterAnimation">@anim/open_next</item> <item name="android:windowExitAnimation">@anim/close_next</item> </style> and this is how I add to it those parameters that helped me earlier when there was a problem with activating it turns out like this
<style name="DialogFragmentTheme" parent="@android:style/Theme.Panel"> <item name="android:windowAnimationStyle">@style/MyAnimation.Window</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowNoTitle">true</item> <item name="android:windowIsFloating">true</item> <item name="android:backgroundDimEnabled">false</item> </style> <style name="MyAnimation.Window" parent="@android:style/Animation.Activity"> <item name="android:windowEnterAnimation">@anim/open_next</item> <item name="android:windowExitAnimation">@anim/close_next</item> </style> But nothing happens ... In activit it works, it is not here ... I think because the layout has already been laid out in the layout and it processes it right away, but here I kind of dynamically transfer the layout I need to display in DialogFragment ...
How to get rid of these pieces over and under the form?
Amendment:
As it became clear, the problem is as follows ... I have an animation on this dialog and I implement it through setting styles when I create the builder
like this
AlertDialog.Builder adb = new AlertDialog.Builder(getActivity(), R.style.DialogFragmentTheme); and then the animation works fine. If you set R.style.DialogFragmentTheme through the onResume() method, or in the XML file or in the getTheme() method, then the animation does not work. But if the animation does not work, then the method
getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); and there is no frame around the dialogue. But then the animation does not work ...
How can you make the animation work and the frame around it not to be?

android:theme="@style/..."? - Yuriy SPb ♦android:windowBackgroundregister and justandroid:background, is also transparent? - Yuriy SPb ♦