Class Clipboard

java.lang.Object
icyllis.modernui.core.Clipboard

@MainThread public final class Clipboard extends Object
A helper class to get/set clipboard text, methods are only expected to be called from the main thread.
  • Constructor Details

    • Clipboard

      public Clipboard()
  • Method Details

    • getText

      @Nullable public static String getText()
      Get text from clipboard, or null if it is empty or cannot be converted to string.
      Returns:
      the clipboard text
    • setText

      public static void setText(@NonNull CharSequence text)
      Set clipboard text.
      Parameters:
      text - the text to set, must be not null