Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 744a6928 authored by Annie Chin's avatar Annie Chin
Browse files

Set accessibility traversal for fab. Remove AccessibilityDelegate.

Bug: 20202588

fab will now receive focus before "more options" menu on alarm and world
clock tabs.
Removed accessibilityDelegate from ViewPager; users can no longer
single-swipe to go to next tab.

Change-Id: Id4b997650bd1f1fa5d24642e608751590f3ce18c
parent 8ddd5e64
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -69,10 +69,11 @@
        android:layout_marginBottom="@dimen/footer_button_layout_margin" >
        <ImageButton
            android:id="@+id/menu_button"
            android:contentDescription="@string/button_menu"
            style="?android:attr/actionOverflowButtonStyle"
            android:layout_gravity="end|center_vertical"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
            android:layout_height="wrap_content"
            android:accessibilityTraversalAfter="@+id/fab"
            android:contentDescription="@string/button_menu" />
    </FrameLayout>
</FrameLayout>
+3 −2
Original line number Diff line number Diff line
@@ -31,10 +31,11 @@
        android:layout_marginBottom="@dimen/footer_button_layout_margin" >
        <ImageButton
            android:id="@+id/menu_button"
            android:contentDescription="@string/button_menu"
            style="?android:attr/actionOverflowButtonStyle"
            android:layout_gravity="end|center_vertical"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
            android:layout_height="wrap_content"
            android:accessibilityTraversalAfter="@+id/fab"
            android:contentDescription="@string/button_menu" />
    </FrameLayout>
</FrameLayout>
+3 −0
Original line number Diff line number Diff line
@@ -124,6 +124,9 @@ public class DeskClock extends BaseActivity implements
            mViewPager = (ViewPager) findViewById(R.id.desk_clock_pager);
            // Keep all four tabs to minimize jank.
            mViewPager.setOffscreenPageLimit(3);
            // Set Accessibility Delegate to null so ViewPager doesn't intercept movements and
            // prevent the fab from being selected.
            mViewPager.setAccessibilityDelegate(null);
            mTabsAdapter = new TabsAdapter(this, mViewPager);
            createTabs(mSelectedTab);
        }