For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <h1>My First Heading</h1> | |
| <p>My first paragraph.</p> | |
| </body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 = ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git branch -d the_local_branch | |
| git push origin :the_remote_branch | |
| git remote show origin | |
| git remote set-url origin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |