setInitialActivitySizePx

fun CustomTabsIntent.Builder.setInitialActivitySizePx(@Dimension(unit = 1) widthPx: Int, @Dimension(unit = 1) heightPx: Int, activityHeightResizeBehavior: ActivityHeightResizeBehavior = ActivityHeightResizeBehavior.Default): CustomTabsIntent.Builder(source)

Sets the Custom Tab Activity's initial width/height in pixels. The Custom Tab will behave as a side sheet if the screen's width is bigger than the breakpoint value set by CustomTabsIntent.Builder.setActivitySideSheetBreakpointDp and the screen is big enough, see doc for CustomTabsIntent.EXTRA_INITIAL_ACTIVITY_WIDTH_PX.

This is equivalent to calling CustomTabsIntent.Builder.setInitialActivityWidthPx and setInitialActivityHeightPx with widthPx and heightPx + activityHeightResizeBehavior respectively.

Since

0.3.0

Parameters

widthPx

The Custom Tab Activity's initial width in pixels.

heightPx

The Custom Tab Activity's initial height in pixels.

activityHeightResizeBehavior

Desired height behavior.

See also


fun CustomTabsIntent.Builder.setInitialActivitySizePx(@Dimension(unit = 1) sizePx: Pair<Int, Int>, activityHeightResizeBehavior: ActivityHeightResizeBehavior = ActivityHeightResizeBehavior.Default): CustomTabsIntent.Builder(source)

Sets the Custom Tab Activity's initial width/height in pixels. The Custom Tab will behave as a side sheet if the screen's width is bigger than the breakpoint value set by CustomTabsIntent.Builder.setActivitySideSheetBreakpointDp and the screen is big enough, see doc for CustomTabsIntent.EXTRA_INITIAL_ACTIVITY_WIDTH_PX.

This is equivalent to calling setInitialActivitySizePx with widthPx and heightPx set to sizePx's first and second entries respectively, as well as activityHeightResizeBehavior.

Since

0.3.0

Parameters

sizePx

The Custom Tab Activity's initial width + height in pixels.

activityHeightResizeBehavior

Desired height behavior.

See also


fun CustomTabsIntent.Builder.setInitialActivitySizePx(size: Size, activityHeightResizeBehavior: ActivityHeightResizeBehavior = ActivityHeightResizeBehavior.Default): CustomTabsIntent.Builder(source)

Sets the Custom Tab Activity's initial width/height in pixels. The Custom Tab will behave as a side sheet if the screen's width is bigger than the breakpoint value set by CustomTabsIntent.Builder.setActivitySideSheetBreakpointDp and the screen is big enough, see doc for CustomTabsIntent.EXTRA_INITIAL_ACTIVITY_WIDTH_PX.

This is equivalent to calling setInitialActivitySizePx with widthPx and heightPx set to size's Size.getWidth and Size.getHeight values respectively, as well as activityHeightResizeBehavior.

Since

0.3.0

Parameters

size

The Custom Tab Activity's initial width + height in pixels.

activityHeightResizeBehavior

Desired height behavior.

See also