com.mob.tools.utils.BitmapHelper Java Examples
The following examples show how to use
com.mob.tools.utils.BitmapHelper.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: OnekeyShare.java From YiZhi with Apache License 2.0 | 5 votes |
/** 设置一个将被截图分享的View , surfaceView是截不了图片的*/ public void setViewToShare(View viewToShare) { try { Bitmap bm = BitmapHelper.captureView(viewToShare, viewToShare.getWidth(), viewToShare.getHeight()); params.put("viewToShare", bm); } catch (Throwable e) { e.printStackTrace(); } }
Example #2
Source File: OnekeyShare.java From enjoyshop with Apache License 2.0 | 5 votes |
/** 设置一个将被截图分享的View , surfaceView是截不了图片的*/ public void setViewToShare(View viewToShare) { try { Bitmap bm = BitmapHelper.captureView(viewToShare, viewToShare.getWidth(), viewToShare.getHeight()); params.put("viewToShare", bm); } catch (Throwable e) { e.printStackTrace(); } }
Example #3
Source File: OnekeyShare.java From LQRWeChat with MIT License | 5 votes |
/** 设置一个将被截图分享的View , surfaceView是截不了图片的*/ public void setViewToShare(View viewToShare) { try { Bitmap bm = BitmapHelper.captureView(viewToShare, viewToShare.getWidth(), viewToShare.getHeight()); params.put("viewToShare", bm); } catch (Throwable e) { e.printStackTrace(); } }
Example #4
Source File: ResourcesManager.java From ShareSDK-for-Android with MIT License | 5 votes |
private void download(){ new Thread() { public void run() { String[] urls = randomPic(); testImageUrl = urls[1]; //imageUrl = urls[1]; imageUrl = "https://t3.ftcdn.net/jpg/02/01/25/00/240_F_201250053_xMFe9Hax6w01gOiinRLEPX0Wt1zGCzYz.jpg"; try { //testImage = BitmapHelper.downloadBitmap(MobSDK.getContext(), urls[3]); testImage = BitmapHelper.downloadBitmap(MobSDK.getContext(), "https://t3.ftcdn.net/jpg/02/01/25/00/240_F_201250053_xMFe9Hax6w01gOiinRLEPX0Wt1zGCzYz.jpg"); imageBmp = BitmapHelper.getBitmap(testImage); imagePath = testImage; } catch (Throwable t) { t.printStackTrace(); testImage = null; } initTestText(); String videoUrl = "http://f1.webshare.mob.com/dvideo/demovideos.mp4"; try { testVideo = new NetworkHelper().downloadCache(MobSDK.getContext(), videoUrl, "videos", true, null); filePath = testVideo; } catch (Throwable e) { e.printStackTrace(); } } }.start(); }