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

Commit 679e5c0d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Avoid talkback speaking unnecessary information"

parents cc20554d 202320d7
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -596,6 +596,12 @@ public class DirectoryFragment extends Fragment implements SwipeRefreshLayout.On
    }

    private int calculateColumnCount(@ViewMode int mode) {
        // For fixing a11y issue b/141223688, if there's only "no items" displayed, we should set
        // span column to 1 to avoid talkback speaking unnecessary information.
        if (mModel != null && mModel.getItemCount() == 0) {
            return 1;
        }

        if (mode == MODE_LIST) {
            // List mode is a "grid" with 1 column.
            return 1;