1

画面の高さではなく、画面全体の幅を取得するアクティビティが必要です。そして、以下の活動を見たいです。

私はこれをマニフェストで使用します:

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

しかし、これをXMLファイルに書き込んだとしても、「ダイアログ」は幅全体を使用しません。

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

では、どのように活動が全幅を占めることができるのでしょうか?

4

1 に答える 1

0

それで大丈夫です。

私は解決策を見つけました。マニフェストで:

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

そしてXMLで:

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