/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.supportv4.widget; import android.annotation.TargetApi; import android.app.Activity; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Paint.Align; import android.graphics.Paint.Style; import android.graphics.Rect; import android.graphics.RectF; import android.os.Build; import android.os.Bundle; import android.support.v4.view.ViewCompat; import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat; import android.support.v4.view.accessibility.AccessibilityNodeProviderCompat; import android.support.v4.widget.ExploreByTouchHelper; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.view.accessibility.AccessibilityEvent; import com.example.android.supportv4.R; import java.util.ArrayList; import java.util.List; /** * This example shows how to use the {@link ExploreByTouchHelper} class in the * Android support library to add accessibility support to a custom view that * represents multiple logical items. *

* The {@link ExploreByTouchHelper} class wraps * {@link AccessibilityNodeProviderCompat} and simplifies exposing information * about a custom view's logical structure to accessibility services. *

* The custom view in this example is responsible for: *

*

* The helper class implementation in this example is responsible for: *