height = left.getHeight()(because left bitmap is taller than) Canvas canvas = new Canvas(leftRight);  canvas.drawBitmap(right, left.getWidth(), 0, new Paint()); canvas.drawBitma...">
Home » Source Code » Bitmap combination

Bitmap combination

2015-02-11 03:19:25
The author
Download(s): 0
Point (s): 1 
Category Category:
AndroidAndroid JavaJava


height:1.5;">height = left.getHeight()(because left bitmap is taller than)
 Canvas canvas = new Canvas(leftRight);


canvas.drawBitmap(right, left.getWidth(), 0, new Paint()); 

canvas.drawBitmap(right, left.getWidth(), 0, new Paint()); 

And this is the result in device.

With above explanation, I think you can create bitmap by combine many bitmaps vertically as below.
private void verticalCombine() { int width = Math.max(left.getWidth(), right.getWidth()); int height = left.getHeight() + right.getHeight();
    Bitmap leftRight = Bitmap.createBitmap(width, height, Config.ARGB_8888);
    Canvas canvas = new Canvas(leftRight);
    canvas.drawBitmap(left, 0, 0, new Paint());
    canvas.drawBitmap(right, 0, left.getHeight(), new Paint());

Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
.classpath475.00 B2013-08-14|14:07
.project857.00 B2013-08-16|10:42
AndroidManifest.xml894.00 B2013-08-14|14:07
BuildConfig.java168.00 B2013-08-16|10:42
R.java2.64 kB2013-08-16|13:42
ic_launcher-web.png50.19 kB2013-08-14|14:07
android-support-v4.jar543.16 kB2013-08-14|14:07
proguard-project.txt781.00 B2013-08-14|14:07
project.properties563.00 B2013-08-14|14:07
ic_launcher.png7.48 kB2013-08-14|14:07
left.png7.49 kB2013-08-16|11:39
right.png3.61 kB2013-08-16|10:49
ic_launcher.png3.69 kB2013-08-14|14:07
ic_launcher.png12.22 kB2013-08-14|14:07
ic_launcher.png24.20 kB2013-08-14|14:07
activity_main.xml693.00 B2013-08-14|14:14
main.xml409.00 B2013-08-16|13:41
dimens.xml203.00 B2013-08-14|14:07
dimens.xml277.00 B2013-08-14|14:07
styles.xml334.00 B2013-08-14|14:07
styles.xml391.00 B2013-08-14|14:07
dimens.xml220.00 B2013-08-14|14:07
strings.xml231.00 B2013-08-14|14:07
styles.xml697.00 B2013-08-14|14:07
MainActivity.java2.40 kB2013-08-16|13:42
Sponsored links


(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words

Thanks for uploading this I needed it badly but one thing about it that it's not downloading. I tried many times on pc with speedy paper reviews but didn’t work then tried on mobile it worked fine what's the matter.

  • 1
  • Page 1
  • Total 1

Bitmap combination (583.67 kB)

Need 1 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points


Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com


CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D