You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

io.arcblock.forge:stylize_qr

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

io.arcblock.forge:stylize_qr

android sdk base on zxing to generate stylize QR code


Version published
Maintainers
1

Readme

Source

StylizeQRCode

generate stylized QR code based on ZXing

Usage

Basic Dot Style QRCode

    val bitmap = StylizeQRGenerator.Builder()
      .dotStyle(true)
      .margin(2)
      .build()
      .generate(text)
   binding.qrNormal.setImageBitmap(bitmap)
image

Gradient Style

    val gradient = GradientDrawable(GradientDrawable.Orientation.BL_TR, arrayOf(Color.BLUE, Color.RED).toIntArray())
    val bitmapGradient = StylizeQRGenerator.Builder()
      .dotStyle(true)
      .margin(2)
      .gradient(gradient)
      .build()
      .generate(text)
    binding.qrGradient.setImageBitmap(bitmapGradient)
image

Background Style

    val bg = ContextCompat.getDrawable(this, R.drawable.bg)?.toBitmap(150, 150, Bitmap.Config.ARGB_8888)!!
    val bitmapBG = StylizeQRGenerator.Builder()
      .dotStyle(true)
      .background(bg)
      .margin(2)
      .build()
      .generate(longText)
    binding.qrBg.setImageBitmap(bitmapBG)
image
    val logo = ContextCompat.getDrawable(this, R.drawable.logo)?.toBitmap(150, 150, Bitmap.Config.RGB_565)!!
    val bitmapLogo = StylizeQRGenerator.Builder()
      .dotStyle(true)
      .background(bg)
      .margin(2)
      .logo(logo)
      .build()
      .generate(text)
    binding.qrLogo.setImageBitmap(bitmapLogo)
image

FAQs

Package last updated on 15 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc