All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.robolectric.shadows.ShadowMeasuredTextBuilder Maven / Gradle / Ivy

There is a newer version: 4.14
Show newest version
package org.robolectric.shadows;

import android.graphics.text.MeasuredText;
import android.os.Build;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.Resetter;

@Implements(
    value = MeasuredText.Builder.class,
    minSdk = Build.VERSION_CODES.Q,
    isInAndroidSdk = false)
public class ShadowMeasuredTextBuilder {

  private static int nativeCounter = 0;

  @Implementation
  protected static long nInitBuilder() {
    return ++nativeCounter;
  }

  @Implementation
  protected static long nBuildMeasuredText(
      long nativeBuilderPtr,
      long hintMtPtr,
      char[] text,
      boolean computeHyphenation,
      boolean computeLayout) {
    return ++nativeCounter;
  }

  @Resetter
  public static void reset() {
    nativeCounter = 0;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy