Commit 86618769 by insun Committed by kim-vde

Remove unnessary resources

1) As we don't display metadata (title) removed titlebar.
2) Removed exo_ic_{forward,rewind}_30.xml which are not used.

PiperOrigin-RevId: 325195605
parent b26d578f
...@@ -34,7 +34,7 @@ import java.util.ArrayList; ...@@ -34,7 +34,7 @@ import java.util.ArrayList;
private static final long DURATION_FOR_HIDING_ANIMATION_MS = 250; private static final long DURATION_FOR_HIDING_ANIMATION_MS = 250;
private static final long DURATION_FOR_SHOWING_ANIMATION_MS = 250; private static final long DURATION_FOR_SHOWING_ANIMATION_MS = 250;
// Int for defining the UX state where all the views (TitleBar, ProgressBar, BottomBar) are // Int for defining the UX state where all the views (ProgressBar, BottomBar) are
// all visible. // all visible.
private static final int UX_STATE_ALL_VISIBLE = 0; private static final int UX_STATE_ALL_VISIBLE = 0;
// Int for defining the UX state where only the ProgressBar view is visible. // Int for defining the UX state where only the ProgressBar view is visible.
...@@ -61,7 +61,6 @@ import java.util.ArrayList; ...@@ -61,7 +61,6 @@ import java.util.ArrayList;
@Nullable private StyledPlayerControlView styledPlayerControlView; @Nullable private StyledPlayerControlView styledPlayerControlView;
@Nullable private ViewGroup titleBar;
@Nullable private ViewGroup embeddedTransportControls; @Nullable private ViewGroup embeddedTransportControls;
@Nullable private ViewGroup bottomBar; @Nullable private ViewGroup bottomBar;
@Nullable private ViewGroup minimalControls; @Nullable private ViewGroup minimalControls;
...@@ -165,9 +164,6 @@ import java.util.ArrayList; ...@@ -165,9 +164,6 @@ import java.util.ArrayList;
v.addOnLayoutChangeListener(onLayoutChangeListener); v.addOnLayoutChangeListener(onLayoutChangeListener);
// Relating to Title Bar View
ViewGroup titleBar = v.findViewById(R.id.exo_title_bar);
// Relating to Center View // Relating to Center View
ViewGroup centerView = v.findViewById(R.id.exo_center_view); ViewGroup centerView = v.findViewById(R.id.exo_center_view);
embeddedTransportControls = v.findViewById(R.id.exo_embedded_transport_controls); embeddedTransportControls = v.findViewById(R.id.exo_embedded_transport_controls);
...@@ -193,12 +189,10 @@ import java.util.ArrayList; ...@@ -193,12 +189,10 @@ import java.util.ArrayList;
overflowHideButton.setOnClickListener(this::onOverflowButtonClick); overflowHideButton.setOnClickListener(this::onOverflowButtonClick);
} }
this.titleBar = titleBar;
this.bottomBar = bottomBar; this.bottomBar = bottomBar;
this.timeBar = timeBar; this.timeBar = timeBar;
Resources resources = v.getResources(); Resources resources = v.getResources();
float titleBarHeight = resources.getDimension(R.dimen.exo_title_bar_height);
float progressBarHeight = resources.getDimension(R.dimen.exo_custom_progress_thumb_size); float progressBarHeight = resources.getDimension(R.dimen.exo_custom_progress_thumb_size);
float bottomBarHeight = resources.getDimension(R.dimen.exo_bottom_bar_height); float bottomBarHeight = resources.getDimension(R.dimen.exo_bottom_bar_height);
...@@ -286,7 +280,6 @@ import java.util.ArrayList; ...@@ -286,7 +280,6 @@ import java.util.ArrayList;
}); });
hideMainBarsAnimator hideMainBarsAnimator
.play(fadeOutAnimator) .play(fadeOutAnimator)
.with(ofTranslationY(0, -titleBarHeight, titleBar))
.with(ofTranslationY(0, bottomBarHeight, timeBar)) .with(ofTranslationY(0, bottomBarHeight, timeBar))
.with(ofTranslationY(0, bottomBarHeight, bottomBar)); .with(ofTranslationY(0, bottomBarHeight, bottomBar));
...@@ -336,7 +329,6 @@ import java.util.ArrayList; ...@@ -336,7 +329,6 @@ import java.util.ArrayList;
}); });
hideAllBarsAnimator hideAllBarsAnimator
.play(fadeOutAnimator) .play(fadeOutAnimator)
.with(ofTranslationY(0, -titleBarHeight, titleBar))
.with(ofTranslationY(0, bottomBarHeight + progressBarHeight, timeBar)) .with(ofTranslationY(0, bottomBarHeight + progressBarHeight, timeBar))
.with(ofTranslationY(0, bottomBarHeight + progressBarHeight, bottomBar)); .with(ofTranslationY(0, bottomBarHeight + progressBarHeight, bottomBar));
...@@ -356,7 +348,6 @@ import java.util.ArrayList; ...@@ -356,7 +348,6 @@ import java.util.ArrayList;
}); });
showMainBarsAnimator showMainBarsAnimator
.play(fadeInAnimator) .play(fadeInAnimator)
.with(ofTranslationY(-titleBarHeight, 0, titleBar))
.with(ofTranslationY(bottomBarHeight, 0, timeBar)) .with(ofTranslationY(bottomBarHeight, 0, timeBar))
.with(ofTranslationY(bottomBarHeight, 0, bottomBar)); .with(ofTranslationY(bottomBarHeight, 0, bottomBar));
...@@ -376,7 +367,6 @@ import java.util.ArrayList; ...@@ -376,7 +367,6 @@ import java.util.ArrayList;
}); });
showAllBarsAnimator showAllBarsAnimator
.play(fadeInAnimator) .play(fadeInAnimator)
.with(ofTranslationY(-titleBarHeight, 0, titleBar))
.with(ofTranslationY(bottomBarHeight + progressBarHeight, 0, timeBar)) .with(ofTranslationY(bottomBarHeight + progressBarHeight, 0, timeBar))
.with(ofTranslationY(bottomBarHeight + progressBarHeight, 0, bottomBar)); .with(ofTranslationY(bottomBarHeight + progressBarHeight, 0, bottomBar));
...@@ -584,7 +574,6 @@ import java.util.ArrayList; ...@@ -584,7 +574,6 @@ import java.util.ArrayList;
getWidth(embeddedTransportControls), getWidth(timeView) + getWidth(overflowShowButton)); getWidth(embeddedTransportControls), getWidth(timeView) + getWidth(overflowShowButton));
int defaultModeHeight = int defaultModeHeight =
getHeight(embeddedTransportControls) getHeight(embeddedTransportControls)
+ getHeight(titleBar)
+ getHeight(timeBar) + getHeight(timeBar)
+ getHeight(bottomBar); + getHeight(bottomBar);
...@@ -636,7 +625,6 @@ import java.util.ArrayList; ...@@ -636,7 +625,6 @@ import java.util.ArrayList;
} }
int[] idsToHideInMinimalMode = { int[] idsToHideInMinimalMode = {
R.id.exo_title_bar,
R.id.exo_bottom_bar, R.id.exo_bottom_bar,
R.id.exo_prev, R.id.exo_prev,
R.id.exo_next, R.id.exo_next,
......
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2020 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportWidth="24"
android:viewportHeight="24"
android:width="24dp"
android:height="24dp">
<group>
<clip-path
android:pathData="M24 24L0 24 0 0 24 0 24 24Z" />
<path
android:pathData="M9.6 13.5l0.4 0c0.2 0 0.4 -0.1 0.5 -0.2 0.1 -0.1 0.2 -0.2 0.2 -0.4l0 -0.2c0 0 -0.1 -0.1 -0.1 -0.2 0 -0.1 -0.1 -0.1 -0.2 -0.1l-0.5 0c0 0 -0.1 0.1 -0.2 0.1 -0.1 0 -0.1 0.1 -0.1 0.2l0 0.2 -1 0c0 -0.2 0 -0.3 0.1 -0.5 0.1 -0.2 0.2 -0.3 0.3 -0.4 0.1 -0.1 0.3 -0.2 0.4 -0.2 0.1 0 0.4 -0.1 0.5 -0.1 0.2 0 0.4 0 0.6 0.1 0.2 0.1 0.3 0.1 0.5 0.2 0.2 0.1 0.2 0.2 0.3 0.4 0.1 0.2 0.1 0.3 0.1 0.5l0 0.3c0 0 -0.1 0.2 -0.1 0.3 0 0.1 -0.1 0.2 -0.2 0.2 -0.1 0 -0.2 0.1 -0.3 0.2 0.2 0.1 0.4 0.2 0.5 0.4 0.1 0.2 0.2 0.4 0.2 0.6 0 0.2 0 0.4 -0.1 0.5 -0.1 0.1 -0.2 0.3 -0.3 0.4C11 15.9 10.8 16 10.6 16 10.4 16 10.2 16.1 10 16.1 9.8 16.1 9.6 16.1 9.5 16 9.4 15.9 9.2 15.9 9 15.8 8.8 15.7 8.8 15.6 8.7 15.4 8.6 15.2 8.6 15 8.6 14.8l0.8 0 0 0.2c0 0 0.1 0.1 0.1 0.2 0 0.1 0.1 0.1 0.2 0.1l0.5 0c0 0 0.1 -0.1 0.2 -0.1 0.1 0 0.1 -0.1 0.1 -0.2l0 -0.5c0 0 -0.1 -0.1 -0.1 -0.2 0 -0.1 -0.1 -0.1 -0.2 -0.1l-0.6 0 0 -0.7zm5.7 0.7c0 0.3 0 0.6 -0.1 0.8l-0.3 0.6c0 0 -0.3 0.3 -0.5 0.3 -0.2 0 -0.4 0.1 -0.6 0.1 -0.2 0 -0.4 0 -0.6 -0.1C13 15.8 12.9 15.7 12.7 15.6 12.5 15.5 12.5 15.3 12.4 15 12.3 14.7 12.3 14.5 12.3 14.2l0 -0.7c0 -0.3 0 -0.6 0.1 -0.8l0.3 -0.6c0 0 0.3 -0.3 0.5 -0.3 0.2 0 0.4 -0.1 0.6 -0.1 0.2 0 0.4 0 0.6 0.1 0.2 0.1 0.3 0.2 0.5 0.3 0.2 0.1 0.2 0.3 0.3 0.6 0.1 0.3 0.1 0.5 0.1 0.8l0 0.7zm-0.9 -0.8l0 -0.5c0 0 -0.1 -0.2 -0.1 -0.3 0 -0.1 -0.1 -0.1 -0.2 -0.2 -0.1 -0.1 -0.2 -0.1 -0.3 -0.1 -0.1 0 -0.2 0 -0.3 0.1l-0.2 0.2c0 0 -0.1 0.2 -0.1 0.3l0 2c0 0 0.1 0.2 0.1 0.3 0 0.1 0.1 0.1 0.2 0.2 0.1 0.1 0.2 0.1 0.3 0.1 0.1 0 0.2 0 0.3 -0.1l0.2 -0.2c0 0 0.1 -0.2 0.1 -0.3l0 -1.5zM4 13c0 4.4 3.6 8 8 8 4.4 0 8 -3.6 8 -8l-2 0c0 3.3 -2.7 6 -6 6C8.7 19 6 16.3 6 13 6 9.7 8.7 7 12 7l0 4 5 -5 -5 -5 0 4C7.6 5 4 8.6 4 13Z"
android:fillColor="#FFFFFF" />
</group>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2020 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:viewportWidth="24"
android:viewportHeight="24"
android:width="24dp"
android:height="24dp">
<group>
<clip-path
android:pathData="M0 0L24 0 24 24 0 24 0 0Z" />
<path
android:pathData="M12 5l0 -4 -5 5 5 5 0 -4c3.3 0 6 2.7 6 6 0 3.3 -2.7 6 -6 6 -3.3 0 -6 -2.7 -6 -6l-2 0c0 4.4 3.6 8 8 8 4.4 0 8 -3.6 8 -8 0 -4.4 -3.6 -8 -8 -8zm-1.1 11l-0.9 0 0 -3.3 -1 0.3 0 -0.7 1.8 -0.6 0.1 0 0 4.3zm4.3 -1.8c0 0.3 0 0.6 -0.1 0.8l-0.3 0.6c0 0 -0.3 0.3 -0.5 0.3 -0.2 0 -0.4 0.1 -0.6 0.1 -0.2 0 -0.4 0 -0.6 -0.1 -0.2 -0.1 -0.3 -0.2 -0.5 -0.3 -0.2 -0.1 -0.2 -0.3 -0.3 -0.6 -0.1 -0.3 -0.1 -0.5 -0.1 -0.8l0 -0.7c0 -0.3 0 -0.6 0.1 -0.8l0.3 -0.6c0 0 0.3 -0.3 0.5 -0.3 0.2 0 0.4 -0.1 0.6 -0.1 0.2 0 0.4 0 0.6 0.1 0.2 0.1 0.3 0.2 0.5 0.3 0.2 0.1 0.2 0.3 0.3 0.6 0.1 0.3 0.1 0.5 0.1 0.8l0 0.7zm-0.9 -0.8l0 -0.5c0 0 -0.1 -0.2 -0.1 -0.3 0 -0.1 -0.1 -0.1 -0.2 -0.2 -0.1 -0.1 -0.2 -0.1 -0.3 -0.1 -0.1 0 -0.2 0 -0.3 0.1l-0.2 0.2c0 0 -0.1 0.2 -0.1 0.3l0 2c0 0 0.1 0.2 0.1 0.3 0 0.1 0.1 0.1 0.2 0.2 0.1 0.1 0.2 0.1 0.3 0.1 0.1 0 0.2 0 0.3 -0.1l0.2 -0.2c0 0 0.1 -0.2 0.1 -0.3l0 -1.5z"
android:fillColor="#FFFFFF" />
</group>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
android:layout_height="match_parent"
android:layout_width="match_parent">
<gradient
android:layout_height="match_parent"
android:layout_width="match_parent"
android:startColor="@color/exo_title_bar_gradient_start"
android:endColor="@color/exo_title_bar_gradient_end"
android:angle="270" />
</shape>
...@@ -36,37 +36,6 @@ ...@@ -36,37 +36,6 @@
layout="@layout/exo_styled_embedded_transport_controls" /> layout="@layout/exo_styled_embedded_transport_controls" />
</FrameLayout> </FrameLayout>
<LinearLayout
android:id="@+id/exo_title_bar"
android:background="@drawable/exo_title_bar_gradient"
android:baselineAligned="false"
android:layout_gravity="top"
style="@style/ExoStyledControls.TitleBar">
<LinearLayout
android:id="@+id/exo_title_bar_left"
android:gravity="center_vertical"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="horizontal">
<TextView
android:id="@+id/exo_title_text"
android:gravity="center_vertical"
android:ellipsize="middle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:paddingStart="@dimen/exo_icon_padding"
android:paddingEnd="@dimen/exo_icon_padding"
android:paddingLeft="@dimen/exo_icon_padding"
android:paddingRight="@dimen/exo_icon_padding"
android:textSize="15sp"
android:textColor="#FFFFFFFF"/>
</LinearLayout>
</LinearLayout>
<FrameLayout <FrameLayout
android:id="@+id/exo_bottom_bar" android:id="@+id/exo_bottom_bar"
android:layout_width="match_parent" android:layout_width="match_parent"
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
<color name="exo_white">#ffffff</color> <color name="exo_white">#ffffff</color>
<color name="exo_white_opacity_70">#B3ffffff</color> <color name="exo_white_opacity_70">#B3ffffff</color>
<color name="exo_black_opacity_70">#B3000000</color> <color name="exo_black_opacity_70">#B3000000</color>
<color name="exo_title_bar_gradient_start">#d0000000</color>
<color name="exo_title_bar_gradient_end">#00000000</color>
<color name="exo_widget_center_view_background">#90000000</color> <color name="exo_widget_center_view_background">#90000000</color>
<color name="exo_bottom_bar_background">#b0000000</color> <color name="exo_bottom_bar_background">#b0000000</color>
</resources> </resources>
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
<dimen name="exo_custom_progress_thumb_size">16dp</dimen> <dimen name="exo_custom_progress_thumb_size">16dp</dimen>
<dimen name="exo_custom_progress_margin_bottom">41dp</dimen> <dimen name="exo_custom_progress_margin_bottom">41dp</dimen>
<dimen name="exo_title_bar_height">48dp</dimen>
<dimen name="exo_bottom_bar_height">48dp</dimen> <dimen name="exo_bottom_bar_height">48dp</dimen>
<dimen name="exo_time_view_padding">10dp</dimen> <dimen name="exo_time_view_padding">10dp</dimen>
......
...@@ -118,11 +118,6 @@ ...@@ -118,11 +118,6 @@
<item name="android:contentDescription">@string/exo_controls_play_description</item> <item name="android:contentDescription">@string/exo_controls_play_description</item>
</style> </style>
<style name="ExoStyledControls.TitleBar">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/exo_title_bar_height</item>
</style>
<style name="ExoStyledControls.TimeText"> <style name="ExoStyledControls.TimeText">
<item name="android:layout_width">wrap_content</item> <item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item> <item name="android:layout_height">wrap_content</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment