新增网格样式的扫描激光(类似支付宝扫码样式)
This commit is contained in:
@@ -57,7 +57,7 @@ public class CodeActivity extends AppCompatActivity {
|
||||
*/
|
||||
private void createQRCode(String content){
|
||||
//生成二维码最好放子线程生成防止阻塞UI,这里只是演示
|
||||
Bitmap logo = BitmapFactory.decodeResource(getResources(),R.mipmap.ic_launcher);
|
||||
Bitmap logo = BitmapFactory.decodeResource(getResources(),R.drawable.logo);
|
||||
Bitmap bitmap = CodeUtils.createQRCode(content,600,logo);
|
||||
//显示二维码
|
||||
ivCode.setImageBitmap(bitmap);
|
||||
|
||||
BIN
app/src/main/res/drawable-xxhdpi/logo.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@@ -19,7 +19,8 @@
|
||||
app:frameColor="@color/colorPrimary"
|
||||
app:cornerColor="@color/colorPrimary"
|
||||
app:resultPointColor="@color/colorAccent"
|
||||
app:labelTextLocation="bottom"/>
|
||||
app:labelTextLocation="bottom"
|
||||
app:laserStyle="grid"/>
|
||||
<ImageView
|
||||
android:id="@+id/ivFlash"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user