SpeedBumpView

public class SpeedBumpView
extends FrameLayout

java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ androidx.car.moderator.SpeedBumpView


A wrapping view that will monitor all touch events on its children views and prevent the user from interacting if they have performed a preset number of interactions within a preset amount of time.

When the user has performed the maximum number of interactions per the set unit of time, a message explaining that they are no longer able to interact with the view is also displayed.

Summary

Inherited constants

Inherited fields

Public constructors

SpeedBumpView(Context context)
SpeedBumpView(Context context, AttributeSet attrs)
SpeedBumpView(Context context, AttributeSet attrs, int defStyleAttrs)
SpeedBumpView(Context context, AttributeSet attrs, int defStyleAttrs, int defStyleRes)

Public methods

void addView(View child, int index, ViewGroup.LayoutParams params)
boolean dispatchTouchEvent(MotionEvent ev)
void onAttachedToWindow()
void onDetachedFromWindow()

Inherited methods

Public constructors

SpeedBumpView

public SpeedBumpView (Context context)

Parameters
context Context

SpeedBumpView

public SpeedBumpView (Context context, 
                AttributeSet attrs)

Parameters
context Context

attrs AttributeSet

SpeedBumpView

public SpeedBumpView (Context context, 
                AttributeSet attrs, 
                int defStyleAttrs)

Parameters
context Context

attrs AttributeSet

defStyleAttrs int

SpeedBumpView

public SpeedBumpView (Context context, 
                AttributeSet attrs, 
                int defStyleAttrs, 
                int defStyleRes)

Parameters
context Context

attrs AttributeSet

defStyleAttrs int

defStyleRes int

Public methods

addView

public void addView (View child, 
                int index, 
                ViewGroup.LayoutParams params)

Parameters
child View

index int

params ViewGroup.LayoutParams

dispatchTouchEvent

public boolean dispatchTouchEvent (MotionEvent ev)

Parameters
ev MotionEvent

Returns
boolean

onAttachedToWindow

public void onAttachedToWindow ()

onDetachedFromWindow

public void onDetachedFromWindow ()