In the previous post, Matrix.postScale() is used to draw the bitmap, but the result is not perfect. The aspect ratio of prepared bitmap is 1.67 (480x800), when scale it and draw on the screen with 1.5 aspect ratio (320x480), the width will be stretched.
To keep the aspect ratio, we can use Matrix.ScaleToFit.CENTER .
Tuesday, March 13, 2012
Tuesday, March 6, 2012
Android Note: Draw once and scale to fit different screen size
When develops Game Apps, how to draw the UI to fit all devices with different screen size may be a problem.
Monday, March 5, 2012
Friday, February 10, 2012
QR Code Generator v1.0.8 Released
QR Code Generator v1.0.8 has released.
In this version, the default name format of the saved QR Code image file is changed to yyyyMMddHHmmss, it may let the file name more readable.
Another new feature is the background mode to create your own QR Code image more convenient.
In addition to the default template style, now you could choose any Photo or Picture as the background. Press the Other button in the template dialog and choose a image via built-in Gallery or other File Manager apps.
There are two new buttons, Zoom In and Zoom Out, will be appeared in the background mode. Press them to enlarge or narrow the QR Code result. Besides, you could also touch and move the QR Code result to any position on the background.
Download v1.0.8 from Market:
https://market.android.com/details?id=com.ykart.tool.qrcodegen
In this version, the default name format of the saved QR Code image file is changed to yyyyMMddHHmmss, it may let the file name more readable.
Another new feature is the background mode to create your own QR Code image more convenient.
In addition to the default template style, now you could choose any Photo or Picture as the background. Press the Other button in the template dialog and choose a image via built-in Gallery or other File Manager apps.
There are two new buttons, Zoom In and Zoom Out, will be appeared in the background mode. Press them to enlarge or narrow the QR Code result. Besides, you could also touch and move the QR Code result to any position on the background.
Download v1.0.8 from Market:
https://market.android.com/details?id=com.ykart.tool.qrcodegen
Saturday, February 4, 2012
QR Code Generator: Where can find the saved image files
One question you may meet after using QR Code Generator: Where is my saved image file?
The answer is all saved or tmp files will be placed under the path:
/mnt/sdcard/YKART/QRCode/
(Default base path of external storage may not the same in different devices)
You can view the images by using built-in app Gallery,
or download file manager apps from Market.
The answer is all saved or tmp files will be placed under the path:
/mnt/sdcard/YKART/QRCode/
(Default base path of external storage may not the same in different devices)
You can view the images by using built-in app Gallery,
or download file manager apps from Market.
Thursday, February 2, 2012
QR Code Generator
QR Code Generator is a convenient tool that help you create a QR Code image. Many content types are supported, as following:
- Text
- URL
- Phone number
- Contact
- Geolocation
- SMS
It is very easy to use. Select the type first, input the content and press the "Generate" button, then the QR Code will be created. You can save it in the external storage or share it via other applications, like Facebook or Gmail.
The result image of same content can be different by set Color, Error Correction Level or Template. For example:
With Blue color |
Apply Android Robot template |
This is my first Android application, hope you like it.
Download from Market:
https://market.android.com/details?id=com.ykart.tool.qrcodegen
Subscribe to:
Posts (Atom)