All Products
Search
Document Center

QR code page

Last Updated: May 25, 2021

AUQRCodeView generates a QR code of current page.

Sample image

Dependency

See Quick start.

API description

 
  1. /**
  2. * Set the avatar name.
  3. * @param name
  4. */
  5. public void setAvatarName(CharSequence name)
  6. /**
  7. * Set QR code information.
  8. * @param title
  9. * @param description
  10. */
  11. public void setCodeInfo(CharSequence title, CharSequence description)
  12. /**
  13. * Set the QR code title.
  14. * @param title
  15. */
  16. public void setCodeTitle(CharSequence title)
  17. /**
  18. * Set QR code description.
  19. * @param description
  20. */
  21. public void setCodeDescription(CharSequence description)
  22. /**
  23. * Set the button information with a Zhi Token icon.
  24. * @param title
  25. * @param content
  26. */
  27. public void setButtonInfo(CharSequence title, CharSequence content)
  28. /**
  29. * Set button information.
  30. * @param title
  31. * @param content
  32. * @param isToken Whether a Zhi Token icon is provided.
  33. */
  34. public void setButtonInfo(CharSequence title, CharSequence content, boolean isToken)
  35. /**
  36. * Set the button title.
  37. * @param title
  38. */
  39. public void setButtonTitle(CharSequence title)
  40. /**
  41. * Whether the title includes an icon.
  42. * @param isToken
  43. */
  44. public void setButtonToken(boolean isToken)
  45. /**
  46. * Whether the button is visible.
  47. * @param isVisible
  48. */
  49. public void setButtonVisibility(boolean isVisible)
  50. /**
  51. * Set button content.
  52. * @param content
  53. */
  54. public void setButtonContent(CharSequence content)
  55. /**
  56. * Obtain vatar imageView.
  57. * @return
  58. */
  59. public AUImageView getAvatarImage()
  60. /**
  61. * Obtain avatar name View.
  62. * @return
  63. */
  64. public AUTextView getAvatarName()
  65. /**
  66. * Obtain QR code imageView.
  67. * @return
  68. */
  69. public AUImageView getCodeImage()
  70. /**
  71. * Obtain the QR code title.
  72. * @return
  73. */
  74. public AUTextView getCodeTitle()
  75. /**
  76. * Obtain the QR code description.
  77. * @return
  78. */
  79. public AUEmptyGoneTextView getCodeDescription()
  80. /**
  81. * Obtain the button.
  82. * @return
  83. */
  84. public AULinearLayout getButton()
  85. /**
  86. * Obtain the button title.
  87. * @return
  88. */
  89. public AUTextView getButtonTitle()
  90. /**
  91. * Obtain button content.
  92. * @return
  93. */
  94. public AUEmptyGoneTextView getButtonContent()

Sample code

 
  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);