1
ここでは、テキストビューとスイッチを備えた単純な水平LinearLayoutを示します。水平線LinearLayoutのスイッチで計算された高さが発生する
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="horizontal">
<TextView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:text="Change the visibility of the below Switch to experiment the height measurement." />
<Switch
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="visible" />
</LinearLayout>
このレイアウトのレンダリングには問題があります。下に示すように、テキストビューは切り取られており、線形レイアウトはコンテンツをラップできません。
私はこの問題は消えスイッチを削除します。
誰でもこの問題を経験しましたか?これはバグですか?
ありがとうございます。
あなたはそれが完璧に動作し、実際のデバイス上でそれを実行すると、心配もする必要はありません:) – shahid17june
shahid17june @は、私の驚きに、それは起こりません。私にバグみたいだが、もっとよく見えるようにする必要がある –
ここにあなたのすべてのXMLコードを投稿できますか? – shahid17june