gpt4 book ai didi

android - ScrollView 在全屏模式下不起作用

转载 作者:行者123 更新时间:2023-11-29 00:21:47 25 4
gpt4 key购买 nike

在我的应用程序中,我正在使用主题

android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen"

在我的布局中 android:fillViewport="true" 但滚动不起作用。当我删除全屏时 - android:theme="@android:style/Theme.Holo.NoActionBar" 没问题。有解决这个问题的想法吗?

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:fillViewport="true" >
<LinearLayout
android:id="@+id/nameFields"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >

<TextView

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/versionNumber"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="15pt" />



<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="@string/time_between_records"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/base_directory"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="@string/continuous_mode"
android:textAppearance="?android:attr/textAppearanceLarge" />



<TextView
android:id="@+id/minIcpValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/minIcpValue"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/maxIcpValue"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/maxIcpValue"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/alarmsMode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="@string/alarmsMode"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/clinicalMode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/clinicMode"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/trialID"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="@string/clinicId"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/snapShotMode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:text="@string/snapshot_mode"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/screenShotMode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:text="@string/screenshot_mode"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:id="@+id/enableTrialMode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/enableClinicalTrialScreen"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:text="@string/monitorName"
android:textAppearance="?android:attr/textAppearanceLarge" />


</LinearLayout>
</ScrollView>

最佳答案

不要应用主题来删除操作栏。

在设置内容 View 之前,您必须像这样以编程方式删除操作栏。

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);

关于android - ScrollView 在全屏模式下不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22510231/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com