[Android Open source] a very simple and easy-to-use style to display the two-dimensional code generated by the library Qrcodestyle

Source: Internet
Author: User


Class Library Description
    • A very simple and easy to use style to display the two-dimensional code generated by the library
    • Free combination of two-dimensional code style
Usage examples
    • Set the logo with round rim
        Bitmap logo = BitmapFactory.decodeResource(getResources(), R.mipmap.logo);        ImageView logo_iv = (ImageView) findViewById(R.id.logo_circle_space_iv);        Bitmap targetBitmap = QRCodeStyle.Builder.builder()                .setQr(BitmapFactory.decodeResource(getResources(), R.mipmap.qr))                .setLogo(logo)                .setCircle(true)                .setSpace(5)                .build().get();        logo_iv.setImageBitmap(targetBitmap);
    • Set Mask Picture
        Bitmap mask = BitmapFactory.decodeResource(getResources(), R.mipmap.logo);        ImageView logo_iv = (ImageView) findViewById(R.id.mask_iv);        Bitmap targetBitmap = QRCodeStyle.Builder.builder()                .setQr(BitmapFactory.decodeResource(getResources(), R.mipmap.qr))                .setMask(mask)                .build().get();        logo_iv.setImageBitmap(targetBitmap);
    • Set a background picture
        Bitmap bg = BitmapFactory.decodeResource(getResources(), R.mipmap.bg);        ImageView logo_iv = (ImageView) findViewById(R.id.bg_iv);        Bitmap targetBitmap = QRCodeStyle.Builder.builder()                .setQr(BitmapFactory.decodeResource(getResources(), R.mipmap.qr))                .setBg(bg)                .build().get();        logo_iv.setImageBitmap(targetBitmap);
    • All examples are shown in this class to refer to Mainactivity
GitHub Address
https://github.com/wu928320442/QRCodeStyle
Gradle Import
‘com.wjj.easy:qrcodestyle:1.0.0‘
About the author
    • QQ 928320442
    • Email [Email protected]

[Android Open source] a very simple and easy-to-use style to display the two-dimensional code generated by the library Qrcodestyle

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.