У меня есть <fragment>
для деятельности карты в моем приложении для Android. Это расположение:Android: Фрагмент занимает весь экран
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="481dp" android:id="@+id/map" tools:context=".MapsActivity"
android:name="com.google.android.gms.maps.SupportMapFragment"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:id="@+id/button"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:background="@drawable/round"
android:layout_below="@+id/map" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView2"
android:layout_alignParentBottom="true"
android:layout_alignTop="@+id/button"
android:layout_alignStart="@+id/button"
android:layout_alignEnd="@+id/button"
android:src="@drawable/tick"/>
</RelativeLayout>
Однако, когда приложение работает, он потребляет весь экран и весь экран показывает карту и отображается запивая кнопку.
Однако, когда я проектирования приложения на этапе компоновки, он показывает правильное форматирование.
Помощь ценится. Благодарю.
Я вижу сжатую зеленую кнопку в эмуляторе фото – Dreo
Да я не хочу его сжимает. Как исправить разрешение? –