All Products
Search
Document Center

Recording float tip

Last Updated: May 27, 2021

AURecordFloatTip is used to display a floating layer indicating that audio is being recorded. It provides users with more intuitive experience during recording.

Sample image

Dependency

See Quick start.

Structure

 
  1. public AURecordFloatTip(Activity activity) ;
  2. public AURecordFloatTip(Activity activity, String tip);

API description

 
  1. /**
  2. * Display the floating layer.
  3. */
  4. public void show();
  5. /**
  6. * Make the floating layer disappear.
  7. */
  8. public void dismiss();
  9. /**
  10. * Obtain floating layer text view.
  11. *
  12. * @return
  13. */
  14. public AUTextView getTipTextView();
  15. /**
  16. * Obtain floating layer icon view.
  17. *
  18. * @return
  19. */
  20. public AUImageView getIconView();

Sample code

 
  1. if (!isSHowAURecordFloatTip) {
  2. ((AUButton) view).setText("关闭AURecordFloatTip");
  3. if (mAURecordFloatTip == null) {
  4. mAURecordFloatTip = new AURecordFloatTip(this, "正在录音");
  5. }
  6. mAURecordFloatTip.show();
  7. isSHowAURecordFloatTip = true;
  8. } else {
  9. ((AUButton) view).setText("显示AURecordFloatTip");
  10. if (mAURecordFloatTip != null) {
  11. mAURecordFloatTip.dismiss();
  12. }
  13. isSHowAURecordFloatTip = false;
  14. }