tubi_tv_drawable_pause_selector_tv.xml


Overview

`tubi_tv_drawable_pause_selector_tv.xml` is an Android **drawable selector resource file** designed to define the visual state changes of a UI element in the Tubi TV application, likely a pause/play control button optimized for TV devices. This XML file associates different drawable resources (images or drawable selectors) with specific UI states such as pressed and focused states, enabling dynamic visual feedback to the user when interacting with playback controls via a remote or other input devices.

By specifying these drawable states, the file helps improve user experience on TV platforms by ensuring the UI responds visually to user focus and interaction, which is critical for non-touch navigation.


Detailed Explanation

XML Structure and Attributes

Child Elements: <item>

Each `` defines a drawable resource and optionally associates it with one or more view states.

Attribute

Description

Value in this file

`android:drawable`

The drawable resource to show when the state(s) match.

References to drawable resources (`@drawable/...`)

android:state_pressed

True if the view is currently pressed (clicked).

`true` for first item

android:state_focused

True or false if the view is (or is not) currently focused.

`true` for second item, `false` for third item

Items in this selector

Item No.

State(s)

Drawable Resource

Description

1

state_pressed="true"

@drawable/tubi_tv_play_selector

Shows when the button is pressed (actively clicked).

2

state_focused="true"

`@drawable/tubi_tv_pause_large`

Shows when the button has focus (e.g., highlighted by TV remote).

3

state_focused="false"

@drawable/tubi_tv_play_selector

Default state when button is not focused.


Usage Example

This selector is typically referenced in a layout XML or programmatically assigned as the **background** or **source drawable** of an ImageView or Button representing the playback control on TV.

<ImageView
    android:id="@+id/play_pause_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/tubi_tv_drawable_pause_selector_tv"
    android:focusable="true"
    android:clickable="true"/>

When the user navigates to this button using a remote control, the UI will:


Important Implementation Details


Interaction with Other Parts of the System


Visual Diagram: Component Interaction

componentDiagram
    component "Playback Control UI Element\n(ImageView/Button)" as PlaybackControl
    component "tubi_tv_drawable_pause_selector_tv.xml\n(State List Drawable)" as DrawableSelector
    component "tubi_tv_play_selector\n(Drawable Selector)" as PlaySelector
    component "tubi_tv_pause_large\n(Static Drawable)" as PauseDrawable

    PlaybackControl --> DrawableSelector : uses as src/background
    DrawableSelector --> PlaySelector : references drawable
    DrawableSelector --> PauseDrawable : references drawable

    note right of PlaybackControl
      Handles user interaction (focus, press)
      Displays visual feedback based on state
    end

Summary

`tubi_tv_drawable_pause_selector_tv.xml` is a simple yet essential Android drawable selector resource enabling dynamic visual feedback for playback controls on TV devices. It manages different drawable states for pressed and focused UI conditions, enhancing user navigation experience by tying UI states to appropriate icons (play or pause). This file is part of a broader drawable resource system and integrates tightly with the TV UI components for media playback control.


If you need additional details on the referenced drawable files or how this integrates with the playback logic code, those would be covered in their respective documentation files.