public class

PointerPropertiesBuilder

extends java.lang.Object

 java.lang.Object

↳androidx.test.core.view.PointerPropertiesBuilder

Gradle dependencies

compile group: 'androidx.test', name: 'core', version: '1.6.1'

  • groupId: androidx.test
  • artifactId: core
  • version: 1.6.1

Artifact androidx.test:core:1.6.1 it located at Google repository (https://maven.google.com/)

Overview

Builder for .

Summary

Methods
public PointerPropertiesbuild()

public static PointerPropertiesBuildernewBuilder()

public PointerPropertiesBuildersetId(int id)

public PointerPropertiesBuildersetToolType(int toolType)

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public PointerPropertiesBuilder setId(int id)

public PointerPropertiesBuilder setToolType(int toolType)

public PointerProperties build()

public static PointerPropertiesBuilder newBuilder()

Source

package androidx.test.core.view;

import android.view.MotionEvent.PointerProperties;

/** Builder for {@link PointerProperties}. */
public class PointerPropertiesBuilder {

  private int id;
  private int toolType;

  private PointerPropertiesBuilder() {}

  public PointerPropertiesBuilder setId(int id) {
    this.id = id;
    return this;
  }

  public PointerPropertiesBuilder setToolType(int toolType) {
    this.toolType = toolType;
    return this;
  }

  public PointerProperties build() {
    final PointerProperties pointerProperties = new PointerProperties();
    pointerProperties.id = id;
    pointerProperties.toolType = toolType;
    return pointerProperties;
  }

  public static PointerPropertiesBuilder newBuilder() {
    return new PointerPropertiesBuilder();
  }
}