public static class

ToolbarSwitcherDialog.Builder

extends SkeletalFragmentBuilder<E extends Fragment>
java.lang.Object
   ↳ com.pdftron.pdf.interfaces.builder.SkeletalFragmentBuilder<E extends Fragment>
     ↳ com.pdftron.pdf.dialog.toolbarswitcher.dialog.ToolbarSwitcherDialog.Builder

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<ToolbarSwitcherDialog.Builder> CREATOR
Public Constructors
Builder()
Public Methods
ToolbarSwitcherDialog build(Context context)
Convenience build method that calls build(Context, Class) with the default class for this builder.
void checkArgs(Context context)
Check the arguments of this builder.
Bundle createBundle(Context context)
Create the bundle that will be passed as arguments to the Fragment.
int describeContents()
ToolbarSwitcherDialog.Builder setAnchor(Rect anchor)
Sets anchor rectangle in window location for tablet mode.
ToolbarSwitcherDialog.Builder setAnchor(RectF anchor)
Sets anchor rectangle in window location for tablet mode.
ToolbarSwitcherDialog.Builder setAnchorInScreen(Rect anchor)
Sets anchor rectangle in screen position for tablet mode.
ToolbarSwitcherDialog.Builder setAnchorView(View view)
Sets anchor view for tablet mode.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class com.pdftron.pdf.interfaces.builder.SkeletalFragmentBuilder
From class java.lang.Object
From interface android.os.Parcelable
From interface com.pdftron.pdf.interfaces.builder.Builder

Fields

public static final Creator<ToolbarSwitcherDialog.Builder> CREATOR

Public Constructors

public Builder ()

Public Methods

public ToolbarSwitcherDialog build (Context context)

Convenience build method that calls build(Context, Class) with the default class for this builder.

Parameters
context the context used to initialize the fragment and its theme.
Returns
  • an instance of E with the specified parameters from the builder.

public void checkArgs (Context context)

Check the arguments of this builder. You can also det the default builder parameters in this method.

Parameters
context used to initialize default building parameters

public Bundle createBundle (Context context)

Create the bundle that will be passed as arguments to the Fragment. Called right after calling checkArgs(Context)

Parameters
context used to initialize arguments for the bundle.
Returns
  • the bundle with the required arguments for the Fragment.

public int describeContents ()

public ToolbarSwitcherDialog.Builder setAnchor (Rect anchor)

Sets anchor rectangle in window location for tablet mode. The annotation style dialog will be displayed around the anchor rectangle. This is equivalent to call setAnchor(RectF)

Parameters
anchor The anchor rectangle
Returns
  • The builder

public ToolbarSwitcherDialog.Builder setAnchor (RectF anchor)

Sets anchor rectangle in window location for tablet mode. The annotation style dialog will be displayed around the anchor rectangle.
You can get window location of a view as follows:

 int[] pos = new int[2];
 view.getLocationInWindow(pos);
 RectF rect = new RectF(pos[0], pos[1], pos[0] + view.getWidth(), pos[1] + view.getHeight());
 builder.setAnchor(rect);
 

where view is an instance of View, and builder is an instance of ToolbarSwitcherDialog.Builder

Parameters
anchor The anchor rectangle
Returns
  • The builder

public ToolbarSwitcherDialog.Builder setAnchorInScreen (Rect anchor)

Sets anchor rectangle in screen position for tablet mode. The annotation style dialog will be displayed around the anchor rectangle.
You can get screen location of a view as follows:

 int[] pos = new int[2];
 view.getLocationInScreen(pos);
 RectF rect = new RectF(pos[0], pos[1], pos[0] + view.getWidth(), pos[1] + view.getHeight());
 builder.setAnchorInScreen(rect);
 

where view is an instance of View, and builder is an instance of ToolbarSwitcherDialog.Builder

Parameters
anchor The anchor rectangle
Returns
  • The builder

public ToolbarSwitcherDialog.Builder setAnchorView (View view)

Sets anchor view for tablet mode. The annotation style dialog will be displayed around the anchor rectangle.

Parameters
view The anchor view
Returns
  • The builder

public void writeToParcel (Parcel dest, int flags)