Package 

Class ViewCompat

    • Method Summary

      Modifier and Type Method Description
      static int generateViewId() Generate a value suitable for use in setId.This value will not collide with ID values generated at build time by aapt for R.id.
      static Point getScreenSize(Context context)
      static boolean isTouchExplorationEnabled(Context context) Returns whether touch exploration is enbaledThat often means that Talkback is enabled, but more importantly it means thatthe user is using some kind of touch assist.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • generateViewId

         static int generateViewId()

        Generate a value suitable for use in setId.This value will not collide with ID values generated at build time by aapt for R.id.

      • isTouchExplorationEnabled

         static boolean isTouchExplorationEnabled(Context context)

        Returns whether touch exploration is enbaled

        That often means that Talkback is enabled, but more importantly it means thatthe user is using some kind of touch assist. Meaning that they'll be slower to tap things.

        Usually you'll want to use this method to disable things based on timers, like anauto dismiss.