Android 滚动视图中的 Studio Tabhost 始终位于顶部

Android Studio Tabhost in scrollview always at top

我在 android 工作室中有一个滚动视图内的 tabhost。 tabhost 本身位于一些文本之下。 Here is an image of the xml file 但是,每当我在设备上打开应用程序时,滚动视图都会在顶部设置 tabhost,因此我必须向上滚动才能看到它上面的文本。 为什么会这样,是否有解决办法?

提前致谢。

TabHost 是第一个可以请求焦点的视图。所以解决方法是在 ScrollView.

LinearLayout 顶部有另一个可聚焦视图

我为此使用了以下 View

    <View android:focusableInTouchMode="true" android:layout_width="0px" android:layout_height="0px"/>

注:TabHost inside a ScrollView forces it it to scroll to the bottom and Stop EditText from gaining focus at Activity startup给我很大启发。