Set Floating Button Position

If you're using the floating button as your primary invocation method, you can set a position for it to show up by default.

There are two variables here that can be manipulated:

  • floatingButtonEdge: Which edge of the screen to show the button
  • floatingButtonTopOffset: The position of the button on the y-axis

Edge

BugReporting.floatingButtonEdge = .maxXEdge
IBGBugReporting.floatingButtonEdge = CGRectMaxXEdge;
BugReporting.setFloatingButtonEdge(InstabugFloatingButtonEdge.RIGHT);
BugReporting.setFloatingButtonEdge(InstabugFloatingButtonEdge.RIGHT)
Instabug.setFloatingButtonEdge(Instabug.floatingButtonEdge.right, 250);
BugReporting.setFloatingButtonEdge(FloatingButtonEdge.right, 250);
Instabug.setFloatingButtonEdge(Instabug.floatingButtonEdge.right, 250);
//iOS
IBGBugReporting.FloatingButtonEdge = CoreGraphics.CGRectEdge.MaxXEdge;

//Android
new Instabug.Builder(this, "YOUR_ANDROID_TOKEN")
    .SetInvocationEvent(InstabugInvocationEvent.Shake)
    .SetFloatingButtonEdge(IBGFloatingButtonEdge.Left)
    .Build();
Top Offset

BugReporting.floatingButtonTopOffset = 48
IBGBugReporting.floatingButtonTopOffset = 48;
BugReporting.setFloatingButtonOffset(50);
BugReporting.setFloatingButtonOffset(50)
//iOS
IBGBugReporting.FloatingButtonTopOffset = 10;

//Android
BugReporting.SetFloatingButtonOffset(50);