We have an Android Application that is distributed through a Samsung Knox profile. In the application there is a change password fragment that has a ScrollView nested within a RelativeLayout and containing a single RelativeLayout.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical"
tools:context=".ui.view.fragments.ChangeUserPasswordFragment">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:background="@color/create_profile_button_background"
android:paddingBottom="10dp">
<Button
android:id="@+id/cancel_change_password"
style="@style/LatoRegularWhiteBackgroundButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:padding="@dimen/activity_margin"
android:text="@string/back" />
</RelativeLayout>
<!-- Header Bar-->
<ScrollView
android:id="@+id/update_password_form"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/outer_layout"
android:layout_width="@dimen/form_field_width"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginStart="@dimen/account_horizontal_margin"
android:layout_marginEnd="@dimen/account_horizontal_margin"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
style="@style/LatoLightTextViewStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="94dp"
android:layout_marginBottom="70dp"
android:text="@string/change_password"
android:textAlignment="center"
android:textColor="@color/dark"
android:textSize="@dimen/h1_font_size" />
<include
android:id="@+id/error_bar_password_change"
layout="@layout/error_bar"
android:layout_width="@dimen/error_message_label_width"
android:layout_height="@dimen/error_message_field_height"
android:layout_marginTop="@dimen/create_profile_fields_top_margin"
android:visibility="gone" />
<include
android:id="@+id/old_password"
layout="@layout/form_field"
android:layout_width="@dimen/form_field_width"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/create_profile_fields_top_margin" />
<include
android:id="@+id/new_password"
layout="@layout/form_field"
android:layout_width="@dimen/form_field_width"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/create_profile_fields_top_margin" />
<include
android:id="@+id/confirm_new_password"
layout="@layout/form_field"
android:layout_width="@dimen/form_field_width"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/create_profile_fields_top_margin" />
</LinearLayout>
<!--Save Button-->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/outer_layout">
<Button
android:id="@+id/save_button"
style="@style/PrimaryButton"
android:layout_width="@dimen/action_button_width"
android:layout_height="@dimen/action_button_height"
android:layout_centerInParent="true"
android:layout_marginBottom="40dp"
android:background="@drawable/primary_button"
android:text="@string/change_password_save"
android:visibility="visible" />
</RelativeLayout> <!--/save button-->
</RelativeLayout>
</ScrollView>
</RelativeLayout>
</LinearLayout>
When outside of Knox's kiosk mode that application can scroll the content by dragging upward or downward with a touch gesture. When in kiosk mode the user cannot scroll the content, except by pressing "Next" in the soft keyboard, shifting the focus to the next field. We need the user to be able to scroll by dragging upward or downward in kiosk mode as well as out of it.