0

Currently, in my android project. I am using a couple Activities and presenting them as if they are dialogs. I basically in my AndroidManifest do this

<activity
    android:name=".view.common.activity.message.TextMessageActivity"
    android:screenOrientation="portrait"
    android:theme="@style/MessageDialog" />

And in my styles.xml

<style name="MessageDialog" parent="@style/Theme.AppCompat.Light.Dialog">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
    <item name="android:windowNoTitle">true</item>
</style>

Now, i notice that the width and height are almost covering the whole screen. Are there anyway for me to tweak the height so that it doesn't do that? Perhaps setting a fixed height of 300dp or set height by having a really wide padding to top and bottom.

Zhen Liu
  • 7,550
  • 14
  • 53
  • 96
  • Why you don't use native dialog with a custom view? – Cochi Jun 01 '18 at 17:48
  • https://stackoverflow.com/questions/6624480/how-to-customize-the-width-and-height-when-show-an-activity-as-a-dialog?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – Steve M Jun 01 '18 at 17:53
  • @Cochi Because basically i had some activities before, and now people wants to present them as dialogs, the easiest thing for me to change is to just modify some styling. – Zhen Liu Jun 01 '18 at 20:58

0 Answers0