1

I want an activity to take the whole screen's width but not the screen's height. and, I want to see the activity that is below.

I use this in the manifest :

<activity
        android:name="activities.Dialoger"
        android:label="@string/app_name"
        android:launchMode="singleTop"
        android:screenOrientation="portrait"
        android:theme="@android:style/Theme.Panel"/>

But, the "dialoger" doesn't use the whole width even if I wrote this in the XML file :

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/semi_transparent"
    android:gravity="center"
    android:orientation="vertical">

So, how the activity can take the whole width?

4

1 回答 1

0

没关系。

我找到了解决方案。在清单中:

android:theme="@android:style/Theme.Panel"

在 XML 中:

android:minWidth="400dp"
于 2012-09-04T19:40:39.313 回答