Revision control
Copy as Markdown
<?xml version="1.0" encoding="utf-8"?>
<data>
<import type="org.mozilla.vrbrowser.ui.widgets.dialogs.VoiceSearchWidget.State"/>
<variable
name="state"
type="State" />
</data>
<RelativeLayout
android:layout_width="@dimen/prompt_dialog_width"
android:layout_height="@dimen/prompt_dialog_height"
android:background="@drawable/dialog_background"
android:paddingStart="@dimen/prompt_dialog_padding_sides"
android:paddingTop="@dimen/prompt_dialog_padding_top"
android:paddingEnd="@dimen/prompt_dialog_padding_sides"
android:paddingBottom="@dimen/prompt_dialog_padding_bottom">
<FrameLayout
android:id="@+id/animationContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="5dp"
android:layout_marginBottom="15dp">
<ImageView
android:id="@+id/voiceSearchAnimationListening"
android:layout_width="@dimen/voice_search_input_width"
android:layout_height="@dimen/voice_search_input_height"
android:layout_gravity="center"
android:src="@drawable/ic_voice_search_volume_input_black"
visibleInvisible="@{state != State.SEARCHING }"
tools:src="@drawable/ic_voice_search_volume_input_black" />
<ImageView
android:id="@+id/voiceSearchAnimationSearching"
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/spinner"
visibleInvisible="@{state == State.SEARCHING }"
tools:src="@drawable/spinner" />
</FrameLayout>
<FrameLayout
android:id="@+id/titleContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/animationContainer"
android:layout_marginBottom="10dp">
<TextView
android:id="@+id/voiceSearchStart"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/voice_search_start"
android:textColor="@color/white"
android:textSize="24sp"
android:typeface="sans"
visibleInvisible="@{state == State.LISTENING}"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
tools:text="@string/voice_search_start" />
<TextView
android:id="@+id/voiceSearchSearching"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/voice_search_decoding"
android:textColor="@color/white"
android:textSize="24sp"
android:typeface="sans"
visibleInvisible="@{state == State.SEARCHING}"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
tools:text="@string/voice_search_decoding" />
<TextView
android:id="@+id/voiceSearchError"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text='@{String.format("%s %s", @string/voice_search_error, @string/voice_search_try_again)}'
android:textColor="@color/white"
android:textSize="24sp"
android:typeface="sans"
visibleInvisible="@{state == State.SPEECH_ERROR}"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
tools:text='@{String.format("%s %s", @string/voice_search_error, @string/voice_search_try_again)}' />
<TextView
android:id="@+id/voiceSearchPermissions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/voice_search_permission_after_decline"
android:textColor="@color/white"
android:textSize="24sp"
android:typeface="sans"
visibleInvisible="@{state == State.PERMISSIONS}"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
tools:text="@string/voice_search_permission_after_decline" />
</FrameLayout>
<FrameLayout
android:id="@+id/descriptionContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/buttonsContainer"
android:layout_marginBottom="15dp"
visibleGone="@{state == State.LISTENING || state == State.SPEECH_ERROR}">
<TextView
android:id="@+id/description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/voice_search_example"
android:textColor="@color/rhino"
android:textSize="12sp"
android:typeface="sans"
android:visibility="visible"
android:gravity="center"
android:layout_gravity="center"
tools:text="@string/voice_search_example" />
</FrameLayout>
<FrameLayout
android:id="@+id/buttonsContainer"
android:layout_width="322dp"
android:layout_height="36dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true">
<Button
android:id="@+id/closeButton"
android:layout_width="156dp"
android:layout_height="36dp"
android:background="@drawable/dialog_regular_button_background"
android:fontFamily="sans-serif"
android:scaleType="fitCenter"
android:layout_gravity="center_horizontal"
android:gravity="center"
tools:text="@string/voice_search_close"
android:text="@string/voice_search_close"
android:textColor="@drawable/dialog_button_text_color"
android:textStyle="bold" />
</FrameLayout>
</RelativeLayout>
</layout>