Class ImageButton

All Implemented Interfaces:
Drawable.Callback

public class ImageButton extends ImageView

Displays a button with an image (instead of text) that can be pressed or clicked by the user. By default, an ImageButton looks like a regular Button, with the standard button background that changes color during different button states.

To remove the standard button background image, define your own background image or set the background color to be transparent.

See the Buttons guide.

  • Constructor Details

    • ImageButton

      public ImageButton(Context context)
  • Method Details

    • onResolvePointerIcon

      public PointerIcon onResolvePointerIcon(@Nonnull MotionEvent event)
      Description copied from class: View
      Returns the pointer icon for the motion event, or null if it doesn't specify the icon. The default implementation does not care the location or event types, but some subclasses may use it (such as WebViews).
      Overrides:
      onResolvePointerIcon in class View
      Parameters:
      event - The MotionEvent from a mouse
      See Also: