アクティビティにこのレイアウトがあり、" " にダイアログ フラグメントを追加したいのですがmap_extras
、ダイアログ フラグメントが画面の中央に配置されません。私は何を間違っていますか?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map_activity"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout
android:id="@+id/map_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
</RelativeLayout>
<RelativeLayout
android:id="@+id/map_extras"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</RelativeLayout>
</RelativeLayout>
これは、ダイアログ フラグメントのレイアウトです。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="#FFFFFF"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="asdf1" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="asdf2" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="asdf3" />
</LinearLayout>