tubi_tv_seek_bar_thumb_normal_shape.xml


Overview

The `tubi_tv_seek_bar_thumb_normal_shape.xml` file defines a custom drawable shape used for the "thumb" element of a seek bar in the Tubi TV Android application. Specifically, it creates a white circular (oval) shape that serves as the normal (default) visual appearance of the seek bar thumb, which users drag to change playback position or other continuous values.

This XML drawable resource ensures consistent styling of the seek bar thumb, adhering to the app's design language by using predefined color resources and fixed dimensions.


Detailed Explanation

This file is an Android **Shape Drawable** resource definition, specifying how the thumb of the seek bar should be drawn.

Root Element: <shape>

Child Elements and Attributes

Element

Attributes

Description

``

`android:color="@color/tubi_tv_player_white"`

Sets the fill color of the shape, referencing a white color resource defined elsewhere in the app.

``

`android:color="@color/tubi_tv_player_white"`
`android:width="1dp"`

Defines the border color and thickness around the shape, also white with a 1dp width stroke.

``

`android:height="25dp"`
`android:width="25dp"`

Sets fixed dimensions of the oval to 25 density-independent pixels in both height and width, making it a perfect circle.


Usage Example

This drawable is typically applied as the `thumb` drawable for a SeekBar widget in Android layouts or programmatically.

In XML Layout

<SeekBar
    android:id="@+id/media_seekbar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:thumb="@drawable/tubi_tv_seek_bar_thumb_normal_shape" />

Programmatically in Java/Kotlin

val seekBar: SeekBar = findViewById(R.id.media_seekbar)
val thumbDrawable = ContextCompat.getDrawable(context, R.drawable.tubi_tv_seek_bar_thumb_normal_shape)
seekBar.thumb = thumbDrawable

Implementation Details


Interaction with Other Components


Visual Diagram

flowchart TD
    A[SeekBar Widget] --> B[tubi_tv_seek_bar_thumb_normal_shape.xml]
    B --> C[Shape Drawable (Oval)]
    C --> D[Solid Fill: @color/tubi_tv_player_white]
    C --> E[Stroke: 1dp, @color/tubi_tv_player_white]
    C --> F[Size: 25dp x 25dp]

**Diagram Explanation:**


Summary

`tubi_tv_seek_bar_thumb_normal_shape.xml` is a simple yet essential UI resource defining the appearance of the seek bar thumb in the Tubi TV app. The file ensures the thumb is a white, circular, and consistent control element across the app by using a shape drawable with fixed size and color references. It integrates seamlessly with the Android UI framework, enhancing the overall user experience during media playback control.