我正在开发这个在 webview 中检索网页的 android 应用程序,我在屏幕顶部有这个横幅。它在纵向布局中并不明显,但在横向布局中,它几乎占据了屏幕的上半部分。
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/header"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#EAC117"
android:textSize="35sp" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="50dp"
android:layout_height="50dp"
android:src="@raw/firstintentlogo"
android:layout_weight="1" android:contentDescription="@string/headLogoName"/>
</LinearLayout>
我不知道在java文件中“当手机处于横向模式时,隐藏这个linearLayout”。
有什么建议么?