Class AudioView
-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback
,android.view.KeyEvent.Callback
,android.view.View.OnClickListener
,android.view.ViewManager
,android.view.ViewParent
,android.view.accessibility.AccessibilityEventSource
public class AudioView extends FrameLayout implements View.OnClickListener
Bottom auxiliary bar displayed when interacting with sound annotations. Provides buttons for recording/playing back SoundAnnotation as well as audio seek bar.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
AudioView.AudioInspectorLifecycleListener
Listener for the lifecycle of the AudioView.
-
Constructor Summary
Constructors Constructor Description AudioView(Context context)
AudioView(Context context, AttributeSet attrs)
AudioView(Context context, AttributeSet attrs, int defStyleAttr)
AudioView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
-
Method Summary
Modifier and Type Method Description void
onClick(View v)
void
bindController(@NonNull() AudioPlaybackController controller)
Binds to audio playback controller. void
bindController(@NonNull() AudioRecordingController controller)
Binds to audio recording controller. void
unbindController()
Unbinds from controllers. void
setVisibility(int visibility)
void
show(boolean animate)
void
hide(boolean animate)
int
getAudioInspectorHeight()
Returns audio inspector height without any window insets (in immersive mode). boolean
isVisible()
Indicates whether audio inspector is visible. void
addOnAudioInspectorLifecycleListener(@NonNull() AudioView.AudioInspectorLifecycleListener listener)
Adds an AudioInspectorLifecycleListener for listening to the view lifecycle. void
removeOnAudioInspectorLifecycleListener(@NonNull() AudioView.AudioInspectorLifecycleListener listener)
Removes a previously added AudioInspectorLifecycleListener. -
-
Constructor Detail
-
AudioView
AudioView(Context context)
-
AudioView
AudioView(Context context, AttributeSet attrs)
-
AudioView
AudioView(Context context, AttributeSet attrs, int defStyleAttr)
-
AudioView
AudioView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
-
-
Method Detail
-
bindController
void bindController(@NonNull() AudioPlaybackController controller)
Binds to audio playback controller. Animates audio interaction bar into view if now shown yet.
-
bindController
void bindController(@NonNull() AudioRecordingController controller)
Binds to audio recording controller. Animates audio interaction bar into view if now shown yet.
-
unbindController
void unbindController()
Unbinds from controllers. Animates audio inspector out of view.
-
setVisibility
void setVisibility(int visibility)
-
show
void show(boolean animate)
-
hide
void hide(boolean animate)
-
getAudioInspectorHeight
int getAudioInspectorHeight()
Returns audio inspector height without any window insets (in immersive mode).
-
isVisible
boolean isVisible()
Indicates whether audio inspector is visible.
-
addOnAudioInspectorLifecycleListener
void addOnAudioInspectorLifecycleListener(@NonNull() AudioView.AudioInspectorLifecycleListener listener)
Adds an AudioInspectorLifecycleListener for listening to the view lifecycle. If the listener has already been added previously, this method will be a no-op. Passing
null
is not allowed and will result in an exception.- Parameters:
listener
- AudioInspectorLifecycleListener that should be notified.
-
removeOnAudioInspectorLifecycleListener
void removeOnAudioInspectorLifecycleListener(@NonNull() AudioView.AudioInspectorLifecycleListener listener)
Removes a previously added AudioInspectorLifecycleListener. Upon calling this method the
listener
will no longer be notified of any lifecycle changes. If the listener has not been added previously, this method will be a no-op. Passingnull
is not allowed, and will result in an exception.- Parameters:
listener
- AudioInspectorLifecycleListener that should be removed.
-
-
-
-