All Products
Search
Document Center

Mobile Platform as a Service:QR code page

Last Updated:Mar 15, 2022

AUQRCodeView generates a QR code of current page.

Sample image

QR

Dependency

See Quick start.

API description

/**
* Set the avatar name.
* @param name
*/
public void setAvatarName(CharSequence name)

/**
* Set QR code information.
* @param title
* @param description
*/
public void setCodeInfo(CharSequence title, CharSequence description)

/**
* Set the QR code title.
* @param title
*/
public void setCodeTitle(CharSequence title)

/**
* Set QR code description.
* @param description
*/
public void setCodeDescription(CharSequence description)

/**
* Set the button information with a Zhi Token icon.
* @param title
* @param content
*/
public void setButtonInfo(CharSequence title, CharSequence content)

/**
* Set button information.
* @param title
* @param content
* @param isToken Whether a Zhi Token icon is provided.
*/
public void setButtonInfo(CharSequence title, CharSequence content, boolean isToken)

/**
* Set the button title.
* @param title
*/
public void setButtonTitle(CharSequence title)

/**
* Whether the title includes an icon.
* @param isToken
*/
public void setButtonToken(boolean isToken)

/**
* Whether the button is visible.
* @param isVisible
*/
public void setButtonVisibility(boolean isVisible)

/**
* Set button content.
* @param content
*/
public void setButtonContent(CharSequence content)

/**
* Obtain vatar imageView.
* @return
*/
public AUImageView getAvatarImage()

/**
* Obtain avatar name View.
* @return
*/
public AUTextView getAvatarName()

/**
* Obtain QR code imageView.
* @return
*/
public AUImageView getCodeImage()

/**
* Obtain the QR code title.
* @return
*/
public AUTextView getCodeTitle()

/**
* Obtain the QR code description.
* @return
*/
public AUEmptyGoneTextView getCodeDescription()

/**
* Obtain the button.
* @return
*/
public AULinearLayout getButton()

/**
* Obtain the button title.
* @return
*/
public AUTextView getButtonTitle()

/**
* Obtain button content.
* @return
*/
public AUEmptyGoneTextView getButtonContent()

Code sample

AUQRCodeView codeView = new AUQRCodeView(this);
codeView.setAvartarName("Lifestyle name");
codeView.setCodeInfo("Scan the QR code with Alipay to join the Social Circle","The QR code will become invalid on November 05, 2017");
codeView.setButtonInfo("Click to generate a Zhi Token","Recommend Lifestyle to WeChat and QQ friends");
codeView.getCodeImage().setImageResource(R.drawable.qr_default);