Skip to content

Instantly share code, notes, and snippets.

private Bitmap combineBitmaps(Bitmap bmp1, Bitmap bmp2, int angle){
Bitmap bmOverlay = Bitmap.createBitmap(bmp1.getWidth()+2*bmp2.getWidth(), bmp1.getHeight()+2*bmp2.getHeight(), bmp1.getConfig());
Canvas canvas = new Canvas(bmOverlay);
int centerX = canvas.getWidth()/2;
int centerY = canvas.getHeight()/2;
canvas.drawBitmap(bmp1, centerX-bmp1.getWidth()/2, centerY-bmp1.getHeight()/2, null);
int R = canvas.getHeight()/2 - bmp2.getHeight()/2;
@pvllnspk
pvllnspk / adb
Last active October 23, 2015 08:55
adb shell ls /system/bin
adb shell dumpsys
adb shell pm
adb shell am
-----------------------------------------------
adb shell dumpsys | grep DUMP
adb shell service list
-----------------------------------------------
adb shell dumpsys dbinfo <your app package>
adb shell dumpsys meminfo <your app package>
@pvllnspk
pvllnspk / GIT
Last active January 27, 2017 12:41
git branch -d the_local_branch
git push origin :the_remote_branch
git remote show origin
git remote set-url origin
@pvllnspk
pvllnspk / README.md
Created September 11, 2017 13:34 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

private void initCache() {
Picasso picasso = new Picasso.Builder(this).downloader(new DiskCacheOkHttp3Downloader(getApplicationContext())).build();
Picasso.setSingletonInstance(picasso);
}
public class DiskCacheOkHttp3Downloader extends NonFinalOkHttp3Downloader {
public DiskCacheOkHttp3Downloader(Context context) {
super(context);
1.
for(int i = 0; i < threads.size(); i++) {
threads.get(i).start();
threads.get(i).join();
}
2.
String result = executorService.submit(callable).get();
List<Callable<String>> callables = ...
<!DOCTYPE html>
<html>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>