> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fastpix.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/docs/_mcp/server.

# Set the video resize mode

> Control how video scales inside the FastPix Android Player view with resize modes like fit, fill, and zoom.

The resize mode controls how video scales inside the `PlayerView`. Use it to letterbox a video so nothing is cropped, or to fill the view and crop the overflow, which is what full-screen feeds do.

\


## Before you begin

Make sure you have the FastPix Android Player SDK installed and a player set up. See [Install FastPix Android player](/docs/android-player/install-fastpix-android-player) and [Set up the player](/docs/android-player/set-up-the-player).

\


## Set the resize mode

Set `resizeMode` on the `PlayerView` in code:

```kotlin
playerView.resizeMode = ResizeMode.ZOOM   // fill the view, cropping the overflow
```

Or set it in your layout XML:

```xml
<io.fastpix.media3.PlayerView
    android:id="@+id/playerView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:fastPixResizeMode="zoom" />
```

\


## Resize modes

| Mode            | Behavior                                                   |
| --------------- | ---------------------------------------------------------- |
| `FIT` (default) | Scale to fit inside the view, letterboxing as needed.      |
| `FIXED_WIDTH`   | Match the view's width; height follows the content.        |
| `FIXED_HEIGHT`  | Match the view's height; width follows the content.        |
| `FILL`          | Stretch to fill, ignoring aspect ratio.                    |
| `ZOOM`          | Fill while preserving aspect ratio, cropping the overflow. |

`FIT` is right for a general-purpose player, where cropping would hide content. Full-screen feeds normally want `ZOOM`, so a source of any shape fills the page the way short-form apps present it.

\


#### Frequently asked questions

Set `resizeMode = ResizeMode.ZOOM` (or `app:fastPixResizeMode="zoom"` in XML). `ZOOM` fills the view while preserving aspect ratio and crops the overflow, so there are no letterbox bars.

`FIT`. It scales the video to fit inside the view and letterboxes as needed, so no content is cropped. This is the right default for a general-purpose player.

`FILL` stretches the video to fill the view and ignores aspect ratio, which can distort the picture. `ZOOM` fills the view while preserving aspect ratio and crops whatever overflows, so the picture stays undistorted.

Yes. Use the `app:fastPixResizeMode` attribute on the `PlayerView`, for example `app:fastPixResizeMode="zoom"`. You can also change it at runtime with the `resizeMode` property.

\


## What's next

* [Preload and cache for faster startup](/docs/android-player/preload-and-cache-for-faster-startup) to make feed items start faster.
* [Enable fullscreen mode](/docs/android-player/enable-fullscreen-mode) for full-screen playback.