I have a Button
inside an Activity
with Dialog
style.
Here is xml file of my Activity
:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="Button" />
</RelativeLayout>
Here is the style of my Activity
which causes to show it as a Dialog
<style name="Modal" parent="Theme.AppCompat.Light.Dialog">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowFullscreen">false</item>
<item name="android:windowContentOverlay">@null</item>
</style>
This Activity
show as full screen even though the android:windowFullscreen
is false! and when I remove the android:layout_alignParentBottom="true"
from the Activity
xml file, the height
of Activity
changed to wrap_content
and there is no problem. I want to know how can I solve this problem without removing the attribute of Button
.
Here you can see the result of showing Activity
with android:layout_alignParentBottom="true"
and with out android:layout_alignParentBottom="true"
.