Codota Logo
OneStepHelper
Code IndexAdd Codota to your IDE (free)

How to use
OneStepHelper
in
smartisanos.api

Best Java code snippets using smartisanos.api.OneStepHelper (Showing top 11 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: SmartisanTech/SmartisanOS-SDK

public static synchronized OneStepHelper getInstance(Context context) {
  if (mInstance == null) {
    mInstance = new OneStepHelper(context);
  }
  return mInstance;
}
origin: SmartisanTech/SmartisanOS-SDK

  @Override
  public boolean onLongClick(View view) {
    if (mOneStepHelper.isOneStepShowing()) {
      File f = createTestFileIfNotExists("drag_file_test.txt");
      mOneStepHelper.dragFile(view, f, "text/plain", f.getName());
      return true;
    }
    return false;
  }
});
origin: SmartisanTech/SmartisanOS-SDK

  @Override
  public boolean onLongClick(View view) {
    if (mOneStepHelper.isOneStepShowing()) {
      File f = new File(SAMPLE_FILE_DIR, DRAG_IMG_FILE_NAME);
      if (!f.exists()) {
        copyAssetFile2Sdcard(DRAG_IMG_FILE_NAME);
      }
      mOneStepHelper.dragImage(view, f, "image/jpeg");
      return true;
    }
    return false;
  }
});
origin: SmartisanTech/SmartisanOS-SDK

  @Override
  public boolean onLongClick(View v) {
    if (mOneStepHelper.isOneStepShowing()) {
      mOneStepHelper.dragLink(v, "http://t.tt");
      return true;
    }
    return false;
  }
});
origin: SmartisanTech/SmartisanOS-SDK

  @Override
  public boolean onLongClick(View v) {
    if (mOneStepHelper.isOneStepShowing()) {
      mOneStepHelper.dragText(v, "永远年轻,永远热泪盈眶!");
      return true;
    }else {
      Toast.makeText(MainActivity.this, "还没进入OneStep模式呢.", Toast.LENGTH_SHORT).show();
    }
    return false;
  }
});
origin: SmartisanTech/SmartisanOS-SDK

@Override
public void onClick(View view) {
  if (mOneStepHelper.isOneStepShowing()) {
    mTextDragPopupWindow = mOneStepHelper.showDragPopupText(btn_show_popup,
        dragListener,
        "One Step",
        btn_show_popup.getLeft(),
        btn_show_popup.getTop());
  }
}
origin: SmartisanTech/SmartisanOS-SDK

  @Override
  public boolean onLongClick(View view) {
    if (mOneStepHelper.isOneStepShowing()) {
      int size = 3;
      File[] files = new File[size];
      String[] mimeTypes = new String[size];
      File f1 = new File(SAMPLE_FILE_DIR, DRAG_IMG_FILE_NAME);
      if (!f1.exists()) {
        copyAssetFile2Sdcard(DRAG_IMG_FILE_NAME);
      }
      files[0] = f1;
      mimeTypes[0] = "image/jpeg";
      File f2 = new File(SAMPLE_FILE_DIR, "music_cover.png");
      if (!f2.exists()) {
        copyAssetFile2Sdcard("music_cover.png");
      }
      files[1] = f2;
      mimeTypes[1] = "image/png";
      File f3 = new File(SAMPLE_FILE_DIR, "ic_fso_folder.png");
      if (!f3.exists()) {
        copyAssetFile2Sdcard("ic_fso_folder.png");
      }
      files[2] = f3;
      mimeTypes[2] = "image/png";
      mOneStepHelper.dragMultipleImages(view, files, mimeTypes);
      return true;
    }
    return false;
  }
});
origin: SmartisanTech/SmartisanOS-SDK

mOneStepHelper = OneStepHelper.getInstance(MainActivity.this);
View textView = findViewById(R.id.text);
textView.setOnLongClickListener(new View.OnLongClickListener() {
origin: SmartisanTech/SmartisanOS-SDK

  @Override
  public boolean onLongClick(View view) {
    if (mOneStepHelper.isOneStepShowing()) {
      //3张图片的尺寸请参考 OneStepHelper 接口说明。
      //background 或 content 为空时使用默认图片;
      //content 和 avatar 同时为空时,相当于调用 mOneStepHelper.dragText(View, CharSequence);
      Bitmap background = null;
      Bitmap content = BitmapFactory.decodeResource(getResources(), R.mipmap.drag_card_content);
      Bitmap avatar = BitmapFactory.decodeResource(getResources(), R.mipmap.music_cover);
      mOneStepHelper.dragText(view, "拖拽的文本内容", background, content, avatar);
      return true;
    }
    return false;
  }
});
origin: SmartisanTech/SmartisanOS-SDK

  @Override
  public boolean onLongClick(View view) {
    if (mOneStepHelper.isOneStepShowing()) {
      File f = createTestFileIfNotExists("drag_file_test.mp3");
      Bitmap content = BitmapFactory.decodeResource(getResources(), R.mipmap.drag_card_content);
      Bitmap avatar = BitmapFactory.decodeResource(getResources(), R.mipmap.music_cover);
      mOneStepHelper.dragFile(view, f, "audio/mpeg", null, content, avatar);
      return true;
    }
    return false;
  }
});
origin: SmartisanTech/SmartisanOS-SDK

  @Override
  public boolean onLongClick(View view) {
    if (mOneStepHelper.isOneStepShowing()) {
      File f = new File(SAMPLE_FILE_DIR, DRAG_IMG_FILE_NAME);
      if (!f.exists()) {
        copyAssetFile2Sdcard(DRAG_IMG_FILE_NAME);
      }
      Bitmap specificContent = BitmapFactory.decodeResource(getResources(), R.mipmap.ic_fso_folder);
      mOneStepHelper.dragImage(view, specificContent, f, "image/png");
      return true;
    }
    return false;
  }
});
smartisanos.apiOneStepHelper

Most used methods

  • <init>
  • dragFile
    Long Press and Drag to share a File. We will add file icon for the drag bubble by the file extension
  • dragImage
    Long Press and Drag to share a image.
  • dragLink
    Long Press and Drag to share link. This Method will display a link icon when drag. For example: Smar
  • dragMultipleImages
    Long Press and Drag to share multi images.
  • dragText
    Long Press and Drag to share java.lang.CharSequence content. You can set the style of popup bubble,
  • getInstance
  • isOneStepShowing
    Whether in one step mode or not.
  • showDragPopupText
    Popup drag window to share text. For example: Smartisan Browser App long press and share an select t

Popular in Java

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now