fix: 二维码静默区改为0,修复圆角不对称
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,7 +73,7 @@ class BindFragment : BaseFragment<FragmentBindBinding>() {
|
||||
// ZXing 生成二维码 Bitmap(缩小静默区,让二维码更大)
|
||||
val size = 500
|
||||
val hints = hashMapOf<com.google.zxing.EncodeHintType, Any>(
|
||||
com.google.zxing.EncodeHintType.MARGIN to 1 // 默认4格,改为1格
|
||||
com.google.zxing.EncodeHintType.MARGIN to 0 // 去掉静默区,圆角裁剪才对称
|
||||
)
|
||||
val bitMatrix: BitMatrix = MultiFormatWriter().encode(
|
||||
qrData, BarcodeFormat.QR_CODE, size, size, hints
|
||||
|
||||
Reference in New Issue
Block a user