Reformat audioplayer_fragment.xml

This commit is contained in:
TacoTheDank 2022-03-22 20:51:38 -04:00
parent 8e905e99d2
commit d1ce817323
1 changed files with 222 additions and 221 deletions

View File

@ -1,273 +1,274 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout <RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar <androidx.appcompat.widget.Toolbar
android:layout_width="match_parent" android:id="@+id/toolbar"
android:layout_height="wrap_content" android:layout_width="match_parent"
android:minHeight="?attr/actionBarSize" android:layout_height="wrap_content"
android:theme="?attr/actionBarTheme" android:layout_alignParentTop="true"
android:layout_alignParentTop="true" android:minHeight="?attr/actionBarSize"
app:navigationContentDescription="@string/toolbar_back_button_content_description" android:theme="?attr/actionBarTheme"
app:navigationIcon="?homeAsUpIndicator" app:navigationContentDescription="@string/toolbar_back_button_content_description"
android:id="@+id/toolbar"/> app:navigationIcon="?homeAsUpIndicator" />
<androidx.fragment.app.FragmentContainerView <androidx.fragment.app.FragmentContainerView
android:id="@+id/playerFragment" android:id="@+id/playerFragment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_alignParentTop="true"
android:background="?attr/background_elevated" android:background="?attr/background_elevated"
tools:layout_height="@dimen/external_player_height" android:elevation="8dp"
android:elevation="8dp"/> tools:layout_height="@dimen/external_player_height" />
<androidx.viewpager2.widget.ViewPager2 <androidx.viewpager2.widget.ViewPager2
android:id="@+id/pager" android:id="@+id/pager"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_above="@id/playtime_layout" android:layout_above="@id/playtime_layout"
android:layout_below="@id/toolbar" android:layout_below="@id/toolbar"
android:layout_marginBottom="12dp" android:layout_marginBottom="12dp"
android:foreground="?android:windowContentOverlay" android:foreground="?android:windowContentOverlay"
android:orientation="vertical" /> android:orientation="vertical" />
<ImageView <ImageView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="8dp" android:layout_height="8dp"
android:layout_alignBottom="@id/pager" android:layout_alignBottom="@id/pager"
app:srcCompat="@drawable/bg_gradient" android:importantForAccessibility="no"
app:tint="?android:attr/windowBackground" app:srcCompat="@drawable/bg_gradient"
android:importantForAccessibility="no"/> app:tint="?android:attr/windowBackground" />
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/cardViewSeek" android:id="@+id/cardViewSeek"
android:alpha="0" android:layout_width="wrap_content"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:layout_alignBottom="@+id/pager"
android:layout_marginLeft="16dp" android:layout_centerHorizontal="true"
android:layout_marginRight="16dp" android:layout_marginLeft="16dp"
android:layout_alignBottom="@+id/pager" android:layout_marginRight="16dp"
android:layout_centerHorizontal="true" android:layout_marginBottom="12dp"
android:layout_marginBottom="12dp" android:alpha="0"
app:cardCornerRadius="8dp" app:cardBackgroundColor="?attr/seek_background"
app:cardBackgroundColor="?attr/seek_background" app:cardCornerRadius="8dp"
app:cardElevation="0dp" app:cardElevation="0dp"
tools:alpha="1"> tools:alpha="1">
<TextView <TextView
android:id="@+id/txtvSeek" android:id="@+id/txtvSeek"
android:gravity="center" android:layout_width="wrap_content"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_height="wrap_content" android:gravity="center"
android:paddingLeft="24dp" android:paddingLeft="24dp"
android:paddingTop="4dp" android:paddingTop="4dp"
android:paddingRight="24dp" android:paddingRight="24dp"
android:paddingBottom="4dp" android:paddingBottom="4dp"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="16sp" android:textSize="16sp"
tools:text="1:06:29" /> tools:text="1:06:29" />
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<LinearLayout <LinearLayout
android:id="@+id/playtime_layout" android:id="@+id/playtime_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentBottom="true" android:layout_alignParentBottom="true"
android:layoutDirection="ltr" android:layoutDirection="ltr"
android:orientation="vertical"> android:orientation="vertical">
<de.danoeh.antennapod.view.ChapterSeekBar <de.danoeh.antennapod.view.ChapterSeekBar
android:id="@+id/sbPosition" android:id="@+id/sbPosition"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:max="500" android:layout_marginLeft="8dp"
tools:progress="100" android:layout_marginRight="8dp"
android:layout_marginLeft="8dp" android:clickable="true"
android:layout_marginRight="8dp" android:max="500"
android:clickable="true"/> tools:progress="100" />
<RelativeLayout <RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:paddingLeft="8dp"
android:paddingRight="8dp">
<TextView
android:id="@+id/txtvPosition"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingLeft="8dp" android:layout_alignParentStart="true"
android:paddingRight="8dp" android:layout_alignParentLeft="true"
android:layout_marginBottom="4dp" android:layout_marginStart="16dp"
android:layout_marginTop="4dp"> android:layout_marginLeft="16dp"
android:text="@string/position_default_label"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_micro" />
<TextView <TextView
android:id="@+id/txtvPosition" android:id="@+id/txtvLength"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:layout_alignParentEnd="true"
android:layout_alignParentStart="true" android:layout_alignParentRight="true"
android:layout_marginLeft="16dp" android:layout_marginEnd="16dp"
android:layout_marginStart="16dp" android:layout_marginRight="16dp"
android:text="@string/position_default_label" android:background="?android:attr/selectableItemBackground"
android:textColor="?android:attr/textColorSecondary" android:text="@string/position_default_label"
android:textSize="@dimen/text_size_micro"/> android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_micro" />
<TextView
android:id="@+id/txtvLength"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_marginRight="16dp"
android:layout_marginEnd="16dp"
android:text="@string/position_default_label"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_micro"
android:background="?android:attr/selectableItemBackground"/>
</RelativeLayout> </RelativeLayout>
<RelativeLayout <RelativeLayout
android:id="@+id/player_control" android:id="@+id/player_control"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="24dp"> android:layout_marginBottom="24dp">
<de.danoeh.antennapod.view.PlayButton <de.danoeh.antennapod.view.PlayButton
android:id="@+id/butPlay" android:id="@+id/butPlay"
android:layout_width="@dimen/audioplayer_playercontrols_length_big" android:layout_width="@dimen/audioplayer_playercontrols_length_big"
android:layout_height="@dimen/audioplayer_playercontrols_length_big" android:layout_height="@dimen/audioplayer_playercontrols_length_big"
android:layout_marginLeft="@dimen/audioplayer_playercontrols_margin" android:layout_centerHorizontal="true"
android:layout_marginStart="@dimen/audioplayer_playercontrols_margin" android:layout_centerVertical="true"
android:layout_marginRight="@dimen/audioplayer_playercontrols_margin" android:layout_marginStart="@dimen/audioplayer_playercontrols_margin"
android:layout_marginEnd="@dimen/audioplayer_playercontrols_margin" android:layout_marginLeft="@dimen/audioplayer_playercontrols_margin"
android:padding="8dp" android:layout_marginEnd="@dimen/audioplayer_playercontrols_margin"
android:layout_centerHorizontal="true" android:layout_marginRight="@dimen/audioplayer_playercontrols_margin"
android:layout_centerVertical="true" android:background="?attr/selectableItemBackgroundBorderless"
android:background="?attr/selectableItemBackgroundBorderless" android:contentDescription="@string/pause_label"
android:contentDescription="@string/pause_label" android:padding="8dp"
app:srcCompat="@drawable/ic_play_48dp" android:scaleType="fitCenter"
android:scaleType="fitCenter" app:srcCompat="@drawable/ic_play_48dp"
tools:srcCompat="@drawable/ic_play_48dp"/> tools:srcCompat="@drawable/ic_play_48dp" />
<de.danoeh.antennapod.ui.common.CircularProgressBar <de.danoeh.antennapod.ui.common.CircularProgressBar
android:layout_width="@dimen/audioplayer_playercontrols_length_big" android:layout_width="@dimen/audioplayer_playercontrols_length_big"
android:layout_height="@dimen/audioplayer_playercontrols_length_big" android:layout_height="@dimen/audioplayer_playercontrols_length_big"
android:layout_marginLeft="16dp" android:layout_centerHorizontal="true"
android:layout_marginStart="16dp" android:layout_centerVertical="true"
android:layout_marginRight="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:layout_marginLeft="16dp"
android:layout_centerHorizontal="true" android:layout_marginEnd="16dp"
android:layout_centerVertical="true" android:layout_marginRight="16dp"
app:foregroundColor="?attr/action_icon_color"/> app:foregroundColor="?attr/action_icon_color" />
<ProgressBar <ProgressBar
style="?android:attr/progressBarStyle" android:id="@+id/progLoading"
android:layout_width="@dimen/audioplayer_playercontrols_length_big" android:layout_width="@dimen/audioplayer_playercontrols_length_big"
android:layout_height="@dimen/audioplayer_playercontrols_length_big" android:layout_height="@dimen/audioplayer_playercontrols_length_big"
android:layout_centerHorizontal="true" android:layout_centerHorizontal="true"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:id="@+id/progLoading" android:visibility="gone"
android:visibility="gone"/> style="?android:attr/progressBarStyle" />
<ImageButton <ImageButton
android:id="@+id/butRev" android:id="@+id/butRev"
android:layout_width="@dimen/audioplayer_playercontrols_length" android:layout_width="@dimen/audioplayer_playercontrols_length"
android:layout_height="@dimen/audioplayer_playercontrols_length" android:layout_height="@dimen/audioplayer_playercontrols_length"
android:layout_toLeftOf="@id/butPlay" android:layout_centerVertical="true"
android:layout_toStartOf="@id/butPlay" android:layout_marginStart="@dimen/audioplayer_playercontrols_margin"
android:layout_marginLeft="@dimen/audioplayer_playercontrols_margin" android:layout_marginLeft="@dimen/audioplayer_playercontrols_margin"
android:layout_marginStart="@dimen/audioplayer_playercontrols_margin" android:layout_toStartOf="@id/butPlay"
android:layout_centerVertical="true" android:layout_toLeftOf="@id/butPlay"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/rewind_label" android:contentDescription="@string/rewind_label"
app:srcCompat="@drawable/ic_fast_rewind" android:scaleType="fitCenter"
android:scaleType="fitCenter" app:srcCompat="@drawable/ic_fast_rewind"
tools:srcCompat="@drawable/ic_fast_rewind"/> tools:srcCompat="@drawable/ic_fast_rewind" />
<TextView <TextView
android:id="@+id/txtvRev" android:id="@+id/txtvRev"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/butRev" android:layout_below="@id/butRev"
android:layout_alignLeft="@id/butRev" android:layout_alignStart="@id/butRev"
android:layout_alignStart="@id/butRev" android:layout_alignLeft="@id/butRev"
android:layout_alignRight="@id/butRev" android:layout_alignEnd="@id/butRev"
android:layout_alignEnd="@id/butRev" android:layout_alignRight="@id/butRev"
android:gravity="center" android:clickable="false"
android:text="30" android:gravity="center"
android:textSize="12sp" android:text="30"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
android:clickable="false"/> android:textSize="12sp" />
<de.danoeh.antennapod.ui.common.PlaybackSpeedIndicatorView <de.danoeh.antennapod.ui.common.PlaybackSpeedIndicatorView
android:id="@+id/butPlaybackSpeed" android:id="@+id/butPlaybackSpeed"
android:layout_width="@dimen/audioplayer_playercontrols_length" android:layout_width="@dimen/audioplayer_playercontrols_length"
android:layout_height="@dimen/audioplayer_playercontrols_length" android:layout_height="@dimen/audioplayer_playercontrols_length"
android:layout_toLeftOf="@id/butRev" android:layout_centerVertical="true"
android:layout_toStartOf="@id/butRev" android:layout_toStartOf="@id/butRev"
android:layout_centerVertical="true" android:layout_toLeftOf="@id/butRev"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/playback_speed" android:contentDescription="@string/playback_speed"
tools:srcCompat="@drawable/ic_playback_speed" app:foregroundColor="?attr/action_icon_color"
app:foregroundColor="?attr/action_icon_color"/> tools:srcCompat="@drawable/ic_playback_speed" />
<TextView <TextView
android:id="@+id/txtvPlaybackSpeed" android:id="@+id/txtvPlaybackSpeed"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/butPlaybackSpeed" android:layout_below="@id/butPlaybackSpeed"
android:layout_alignLeft="@id/butPlaybackSpeed" android:layout_alignStart="@id/butPlaybackSpeed"
android:layout_alignStart="@id/butPlaybackSpeed" android:layout_alignLeft="@id/butPlaybackSpeed"
android:layout_alignRight="@id/butPlaybackSpeed" android:layout_alignEnd="@id/butPlaybackSpeed"
android:layout_alignEnd="@id/butPlaybackSpeed" android:layout_alignRight="@id/butPlaybackSpeed"
android:gravity="center" android:clickable="false"
android:text="1.00" android:gravity="center"
android:textSize="12sp" android:text="1.00"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
android:clickable="false"/> android:textSize="12sp" />
<ImageButton <ImageButton
android:id="@+id/butFF" android:id="@+id/butFF"
android:layout_width="@dimen/audioplayer_playercontrols_length" android:layout_width="@dimen/audioplayer_playercontrols_length"
android:layout_height="@dimen/audioplayer_playercontrols_length" android:layout_height="@dimen/audioplayer_playercontrols_length"
android:layout_toRightOf="@id/butPlay" android:layout_centerVertical="true"
android:layout_toEndOf="@id/butPlay" android:layout_marginEnd="@dimen/audioplayer_playercontrols_margin"
android:layout_marginRight="@dimen/audioplayer_playercontrols_margin" android:layout_marginRight="@dimen/audioplayer_playercontrols_margin"
android:layout_marginEnd="@dimen/audioplayer_playercontrols_margin" android:layout_toEndOf="@id/butPlay"
android:layout_centerVertical="true" android:layout_toRightOf="@id/butPlay"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/fast_forward_label" android:contentDescription="@string/fast_forward_label"
app:srcCompat="@drawable/ic_fast_forward" android:scaleType="fitCenter"
android:scaleType="fitCenter" app:srcCompat="@drawable/ic_fast_forward"
tools:srcCompat="@drawable/ic_fast_forward"/> tools:srcCompat="@drawable/ic_fast_forward" />
<TextView <TextView
android:id="@+id/txtvFF" android:id="@+id/txtvFF"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@id/butFF" android:layout_below="@id/butFF"
android:layout_alignLeft="@id/butFF" android:layout_alignStart="@id/butFF"
android:layout_alignStart="@id/butFF" android:layout_alignLeft="@id/butFF"
android:layout_alignRight="@id/butFF" android:layout_alignEnd="@id/butFF"
android:layout_alignEnd="@id/butFF" android:layout_alignRight="@id/butFF"
android:gravity="center" android:clickable="false"
android:text="30" android:gravity="center"
android:textSize="12sp" android:text="30"
android:textColor="?android:attr/textColorSecondary" android:textColor="?android:attr/textColorSecondary"
android:clickable="false"/> android:textSize="12sp" />
<ImageButton <ImageButton
android:id="@+id/butSkip" android:id="@+id/butSkip"
android:layout_width="@dimen/audioplayer_playercontrols_length" android:layout_width="@dimen/audioplayer_playercontrols_length"
android:layout_height="@dimen/audioplayer_playercontrols_length" android:layout_height="@dimen/audioplayer_playercontrols_length"
android:layout_toRightOf="@id/butFF" android:layout_centerVertical="true"
android:layout_toEndOf="@id/butFF" android:layout_toEndOf="@id/butFF"
android:layout_centerVertical="true" android:layout_toRightOf="@id/butFF"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:scaleType="fitCenter" android:contentDescription="@string/skip_episode_label"
app:srcCompat="@drawable/ic_skip_48dp" android:scaleType="fitCenter"
android:contentDescription="@string/skip_episode_label" app:srcCompat="@drawable/ic_skip_48dp"
tools:srcCompat="@drawable/ic_skip_48dp"/> tools:srcCompat="@drawable/ic_skip_48dp" />
</RelativeLayout> </RelativeLayout>
</LinearLayout> </LinearLayout>