移动开发平台 mPaaS 二维码页面

By | 2021年4月23日

AUQRCodeView 提供一个二维码页面。

效果图

依赖

参见 管理组件依赖

接口说明

  
  1. /**
  2. * 设置头像名称
  3. * @param name
  4. */
  5. public void setAvatarName(CharSequence name)
  6. /**
  7. * 设置二维码信息
  8. * @param title
  9. * @param description
  10. */
  11. public void setCodeInfo(CharSequence title, CharSequence description)
  12. /**
  13. * 设置二维码标题
  14. * @param title
  15. */
  16. public void setCodeTitle(CharSequence title)
  17. /**
  18. * 设置二维码描述信息
  19. * @param description
  20. */
  21. public void setCodeDescription(CharSequence description)
  22. /**
  23. * 设置按钮信息 带吱口令图标
  24. * @param title
  25. * @param content
  26. */
  27. public void setButtonInfo(CharSequence title, CharSequence content)
  28. /**
  29. * 设置按钮信息
  30. * @param title
  31. * @param content
  32. * @param isToken 有无吱口令图标
  33. */
  34. public void setButtonInfo(CharSequence title, CharSequence content, boolean isToken)
  35. /**
  36. * 设置按钮标题
  37. * @param title
  38. */
  39. public void setButtonTitle(CharSequence title)
  40. /**
  41. * 设置标题是否有图标
  42. * @param isToken
  43. */
  44. public void setButtonToken(boolean isToken)
  45. /**
  46. * 设置按钮是否可见
  47. * @param isVisible
  48. */
  49. public void setButtonVisibility(boolean isVisible)
  50. /**
  51. * 设置按钮内容信息
  52. * @param content
  53. */
  54. public void setButtonContent(CharSequence content)
  55. /**
  56. * 获取头像 imageView
  57. * @return
  58. */
  59. public AUImageView getAvatarImage()
  60. /**
  61. * 获取头像名称 View
  62. * @return
  63. */
  64. public AUTextView getAvatarName()
  65. /**
  66. * 获取二维码 imageView
  67. * @return
  68. */
  69. public AUImageView getCodeImage()
  70. /**
  71. * 获取二维码标题
  72. * @return
  73. */
  74. public AUTextView getCodeTitle()
  75. /**
  76. * 获取二维码描述信息
  77. * @return
  78. */
  79. public AUEmptyGoneTextView getCodeDescription()
  80. /**
  81. * 获取按钮
  82. * @return
  83. */
  84. public AULinearLayout getButton()
  85. /**
  86. * 获取按钮标题
  87. * @return
  88. */
  89. public AUTextView getButtonTitle()
  90. /**
  91. * 获取按钮内容信息
  92. * @return
  93. */
  94. public AUEmptyGoneTextView getButtonContent()

代码示例

  
  1. AUQRCodeView codeView = new AUQRCodeView(this);
  2. codeView.setAvartarName("生活号名称");
  3. codeView.setCodeInfo("用支付宝扫二维码,加入该生活圈","该二维码将在2017年11月05日失效");
  4. codeView.setButtonInfo("点击生成吱口令","推荐生活号給微信、QQ好友");
  5. codeView.getCodeImage().setImageResource(R.drawable.qr_default);

请关注公众号获取更多资料

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注