public class

PropertyInspectorCoordinatorLayout

extends FrameLayout
implements PropertyInspectorCoordinatorLayoutController
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.FrameLayout
         ↳ com.pspdfkit.ui.inspector.PropertyInspectorCoordinatorLayout

Class Overview

This layout is responsible for handling PropertyInspectors. It is used in PdfActivity, but it can be added to any view group, for example to the root view of the custom activity.

PSPDFKit ships with property inspector controllers that manage property inspector lifecycle for built in inspectors:

We recommend to use these controllers instead of manually managing your UI.

Summary

[Expand]
Inherited Constants
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
PropertyInspectorCoordinatorLayout(Context context)
PropertyInspectorCoordinatorLayout(Context context, AttributeSet attrs)
PropertyInspectorCoordinatorLayout(Context context, AttributeSet attrs, int defStyleAttr)
PropertyInspectorCoordinatorLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
Public Methods
void addPropertyInspectorLifecycleListener(PropertyInspectorCoordinatorLayoutController.PropertyInspectorLifecycleListener lifecycleListener)
Adds the listener for lifecycle changes of the PropertyInspector as it goes through the PropertyInspectorCoordinatorLayout - preparing, displaying, removing.
boolean hideInspector(boolean animate)
Removes active inspector if visible.
boolean isInspectorVisible(PropertyInspector inspector)
Tests if inspector is currently active in coordinator.
boolean isInspectorVisible()
Tests if coordinator has any active inspector currently visible.
void removePropertyInspectorLifecycleListener(PropertyInspectorCoordinatorLayoutController.PropertyInspectorLifecycleListener lifecycleListener)
Removes previously registered listener for lifecycle changes of the PropertyInspector as it goes through the PropertyInspectorCoordinatorLayout - preparing, displaying, removing.
void setBottomInset(int bottomInset)
Sets bottom inset for displayed PropertyInspectors.
void setDrawUnderBottomInset(boolean showInspectorUnderBottomInset, boolean showInspectorViewsUnderBottomInset)
boolean showInspector(PropertyInspector propertyInspector, boolean animate)
Displays property inspector.
Protected Methods
boolean fitSystemWindows(Rect insets)
void onDetachedFromWindow()
[Expand]
Inherited Methods
From class android.widget.FrameLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.accessibility.AccessibilityEventSource
From interface com.pspdfkit.ui.inspector.PropertyInspectorCoordinatorLayoutController

Public Constructors

public PropertyInspectorCoordinatorLayout (Context context)

public PropertyInspectorCoordinatorLayout (Context context, AttributeSet attrs)

public PropertyInspectorCoordinatorLayout (Context context, AttributeSet attrs, int defStyleAttr)

public PropertyInspectorCoordinatorLayout (Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Public Methods

public void addPropertyInspectorLifecycleListener (PropertyInspectorCoordinatorLayoutController.PropertyInspectorLifecycleListener lifecycleListener)

Adds the listener for lifecycle changes of the PropertyInspector as it goes through the PropertyInspectorCoordinatorLayout - preparing, displaying, removing. If the listener has already been added previously, this method will be a no-op. Adding null is not allowed, and will result in an exception.

Parameters
lifecycleListener PropertyInspectorLifecycleListener that should be notified. Must be non-null.

public boolean hideInspector (boolean animate)

Removes active inspector if visible.

Parameters
animate Whether to animate the change.
Returns
  • True if inspector was visible and is now hidden, false if it was already hidden.

public boolean isInspectorVisible (PropertyInspector inspector)

Tests if inspector is currently active in coordinator.

Parameters
inspector Inspector instance.
Returns
  • True if inspector is currently active in coordinator layout.

public boolean isInspectorVisible ()

Tests if coordinator has any active inspector currently visible.

Returns
  • True if there is inspector visible.

public void removePropertyInspectorLifecycleListener (PropertyInspectorCoordinatorLayoutController.PropertyInspectorLifecycleListener lifecycleListener)

Removes previously registered listener for lifecycle changes of the PropertyInspector as it goes through the PropertyInspectorCoordinatorLayout - preparing, displaying, removing. Upon calling this method the listener will no longer be notified of any changes. If the listener has not been added, this method will be a no-op. Adding null is not allowed,and will result in an exception.

Parameters
lifecycleListener PropertyInspectorLifecycleListener that should be removed. Must be non-null.

public void setBottomInset (int bottomInset)

Sets bottom inset for displayed PropertyInspectors. This will be added on top of standard immersive mode insets.

public void setDrawUnderBottomInset (boolean showInspectorUnderBottomInset, boolean showInspectorViewsUnderBottomInset)

public boolean showInspector (PropertyInspector propertyInspector, boolean animate)

Displays property inspector. This replaces previous displayed inspector.

Parameters
propertyInspector Inspector instance to show.
animate Whether to animate the change.
Returns
  • True if inspector was hidden and is now visible, false if it was already visible.

Protected Methods

protected boolean fitSystemWindows (Rect insets)

protected void onDetachedFromWindow ()