Saturday, 2 February 2019

Accessibility focus of childviews in nestedscrollview

I have a problem with the accessibility focus of the NestedScrollView child views. Currently the focus iteration during accessibility mode only iterates through the views where the views are visible in the screen. Is there a layout configuration where I can set to scroll the NestedScrollview during focus iteration. Currently the focus iteration just stops once it reaches the last visible view on the current screen and not scroll the scrollview to the next focusable view.

Tested with android version 4.3(Galaxy nexus) and 5.1.1(Nexus 4). Talkback version is 4.2.0.

<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/clMain_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    android:focusable="true">

  <android.support.design.widget.AppBarLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/lblAppbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
    android:fitsSystemWindows="true"
    android:contentDescription="@null">

    <android.support.design.widget.CollapsingToolbarLayout
        android:id="@+id/lblCollapsingToolbar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_scrollFlags="scroll|exitUntilCollapsed"
        app:expandedTitleTextAppearance="@android:color/transparent"
        android:fitsSystemWindows="true"
        app:toolbarId="@+id/toolbar"
        app:contentScrim="@color/theme_primary"
        app:statusBarScrim="@color/theme_primary_dark"
        android:contentDescription="@null">

    ...

    </android.support.design.widget.CollapsingToolbarLayout>


    </android.support.design.widget.AppBarLayout>

  <android.support.v4.widget.NestedScrollView
    android:id="@+id/nsvScrollview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:contentDescription="@null"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    android:fillViewport="true">

    <LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:contentDescription="@null"
      android:orientation="vertical">

      ... - child views here

    </LinearLayout>

  </android.support.v4.widget.NestedScrollView>

</android.support.design.widget.CoordinatorLayout>



from Accessibility focus of childviews in nestedscrollview

No comments:

Post a Comment