レイアウトに問題があります。私は風景と肖像画の両方で動作する1つのXMLファイルを構築しようとしています。 1つの特定のレイアウトでは、回転(ポートレートからランドスケープまで)で、レイアウトは拡大するようです。すべてのオブジェクトがそこにあるにもかかわらず、大きなギャップができます。アンドロイド:オリエンテーションでレイアウトサイズが変更されます
これは、ポートレートでの表示方法です。
これらそれが回転(ランドスケープ)の後でどのように描いています。
私のxmlファイルは次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimaryDark"
android:orientation="vertical">
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:fitsSystemWindows="false"
android:id="@+id/coordintorLayout">
<com.andremion.floatingnavigationview.FloatingNavigationView
android:id="@+id/floating_navigation_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
app:layout_anchor="@+id/toolbar"
app:layout_anchorGravity="bottom|end"
app:drawMenuBelowFab="true"
app:headerLayout="@layout/navigation_view_header"
app:menu="@menu/menu" />
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorPrimaryDark"
android:orientation="vertical">
<include
layout="@layout/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_gravity="center"
android:gravity="bottom|center">
<!--
<include
layout="@layout/single_item_customize"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
-->
<ViewStub
android:id="@+id/layout_stub1"
android:inflatedId="@+id/inflated_layout_stub1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.75" />
<ViewStub
android:id="@+id/layout_stub2"
android:inflatedId="@+id/inflated_layout_stub2"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.75" />
<ViewStub
android:id="@+id/layout_stub3"
android:inflatedId="@+id/inflated_layout_stub3"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.25" />
<TextView
android:layout_width="match_parent"
android:layout_height="0px"
android:layout_weight="0.25"
android:inputType="textMultiLine"
android:ems="10"
android:id="@+id/editText"
android:background="@color/colorPrimaryDark"
android:clickable="false"
android:editable="false"
android:enabled="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:freezesText="false"
android:linksClickable="false"
android:longClickable="false"
android:text="@string/default_message" />
</LinearLayout >
</ScrollView>
</LinearLayout>
</android.support.design.widget.CoordinatorLayout>
</LinearLayout>
私は何かが私のxmlと間違っていることをかなり確信しているが、私はそれを把握することはできません。
ありがとうございました。
PS:私はすでに私のマニフェスト内の
android:configChanges="orientation|screenSize|keyboardHidden"
を持っています。
こんにちは。解決策を質問のテキストに編集しないでください。スタックオーバーフローでは、答えが受け入れられたときに問題が解決されたとみなされます。編集した解決策を回答として投稿し、それを受け入れたものとしてマークしてください(あなた自身の回答を受け入れることを妨げる24時間の制限があるかもしれないので、約10時間以上待たなければなりません)。 – Dragomok
申し訳ありません。私の間違い。それを変更しました。 –