Add StyledPlayerView and StyledPlayerControlView into ui/
Moved ui2/ code and resources into ui/ PiperOrigin-RevId: 318984707
This commit is contained in:
parent
2e749f70ae
commit
a3bbcf3395
@ -202,6 +202,7 @@
|
||||
* Upgrade Truth dependency from 0.44 to 1.0.
|
||||
* Upgrade to JUnit 4.13-rc-2.
|
||||
* UI
|
||||
* Add `StyledPlayerView` and `StyledPlayerControlView`.
|
||||
* Remove `SimpleExoPlayerView` and `PlaybackControlView`.
|
||||
* Remove deperecated `exo_simple_player_view.xml` and
|
||||
`exo_playback_control_view.xml` from resource.
|
||||
|
@ -34,6 +34,7 @@ project.ext {
|
||||
androidxCollectionVersion = '1.1.0'
|
||||
androidxMediaVersion = '1.0.1'
|
||||
androidxMultidexVersion = '2.0.0'
|
||||
androidxRecyclerViewVersion = '1.1.0'
|
||||
androidxTestCoreVersion = '1.2.0'
|
||||
androidxTestJUnitVersion = '1.1.1'
|
||||
androidxTestRunnerVersion = '1.2.0'
|
||||
|
@ -20,6 +20,7 @@ dependencies {
|
||||
api 'androidx.media:media:' + androidxMediaVersion
|
||||
implementation 'androidx.annotation:annotation:' + androidxAnnotationVersion
|
||||
implementation 'androidx.appcompat:appcompat:' + androidxAppCompatVersion
|
||||
implementation 'androidx.recyclerview:recyclerview:' + androidxRecyclerViewVersion
|
||||
implementation 'com.google.guava:guava:' + guavaVersion
|
||||
compileOnly 'org.checkerframework:checker-qual:' + checkerframeworkVersion
|
||||
compileOnly 'org.jetbrains.kotlin:kotlin-annotations-jvm:' + kotlinAnnotationsVersion
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,736 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
package com.google.android.exoplayer2.ui;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.AnimatorSet;
|
||||
import android.animation.ObjectAnimator;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.content.res.Resources;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewGroup.MarginLayoutParams;
|
||||
import android.view.animation.LinearInterpolator;
|
||||
import androidx.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/* package */ final class StyledPlayerControlViewLayoutManager
|
||||
implements View.OnLayoutChangeListener {
|
||||
private static final long ANIMATION_INTERVAL_MS = 2_000;
|
||||
private static final long DURATION_FOR_HIDING_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
|
||||
// all visible.
|
||||
private static final int UX_STATE_ALL_VISIBLE = 0;
|
||||
// Int for defining the UX state where only the ProgressBar view is visible.
|
||||
private static final int UX_STATE_ONLY_PROGRESS_VISIBLE = 1;
|
||||
// Int for defining the UX state where none of the views are visible.
|
||||
private static final int UX_STATE_NONE_VISIBLE = 2;
|
||||
// Int for defining the UX state where the views are being animated to be hidden.
|
||||
private static final int UX_STATE_ANIMATING_HIDE = 3;
|
||||
// Int for defining the UX state where the views are being animated to be shown.
|
||||
private static final int UX_STATE_ANIMATING_SHOW = 4;
|
||||
|
||||
private int uxState = UX_STATE_ALL_VISIBLE;
|
||||
private boolean isMinimalMode;
|
||||
private boolean needToShowBars;
|
||||
private boolean disableAnimation = false;
|
||||
|
||||
@Nullable private StyledPlayerControlView styledPlayerControlView;
|
||||
|
||||
@Nullable private ViewGroup titleBar;
|
||||
@Nullable private ViewGroup embeddedTransportControls;
|
||||
@Nullable private ViewGroup bottomBar;
|
||||
@Nullable private ViewGroup minimalControls;
|
||||
@Nullable private ViewGroup basicControls;
|
||||
@Nullable private ViewGroup extraControls;
|
||||
@Nullable private ViewGroup extraControlsScrollView;
|
||||
@Nullable private ViewGroup timeView;
|
||||
@Nullable private View timeBar;
|
||||
@Nullable private View overflowShowButton;
|
||||
|
||||
@Nullable private AnimatorSet hideMainBarsAnimator;
|
||||
@Nullable private AnimatorSet hideProgressBarAnimator;
|
||||
@Nullable private AnimatorSet hideAllBarsAnimator;
|
||||
@Nullable private AnimatorSet showMainBarsAnimator;
|
||||
@Nullable private AnimatorSet showAllBarsAnimator;
|
||||
@Nullable private ValueAnimator overflowShowAnimator;
|
||||
@Nullable private ValueAnimator overflowHideAnimator;
|
||||
|
||||
void show() {
|
||||
if (this.styledPlayerControlView == null) {
|
||||
return;
|
||||
}
|
||||
StyledPlayerControlView styledPlayerControlView = this.styledPlayerControlView;
|
||||
if (!styledPlayerControlView.isVisible()) {
|
||||
styledPlayerControlView.setVisibility(View.VISIBLE);
|
||||
styledPlayerControlView.updateAll();
|
||||
styledPlayerControlView.requestPlayPauseFocus();
|
||||
}
|
||||
styledPlayerControlView.post(showAllBars);
|
||||
}
|
||||
|
||||
void hide() {
|
||||
if (styledPlayerControlView == null
|
||||
|| uxState == UX_STATE_ANIMATING_HIDE
|
||||
|| uxState == UX_STATE_NONE_VISIBLE) {
|
||||
return;
|
||||
}
|
||||
removeHideCallbacks();
|
||||
if (isAnimationDisabled()) {
|
||||
postDelayedRunnable(hideController, 0);
|
||||
} else if (uxState == UX_STATE_ONLY_PROGRESS_VISIBLE) {
|
||||
postDelayedRunnable(hideProgressBar, 0);
|
||||
} else {
|
||||
postDelayedRunnable(hideAllBars, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void setDisableAnimation(boolean disableAnimation) {
|
||||
this.disableAnimation = disableAnimation;
|
||||
}
|
||||
|
||||
void resetHideCallbacks() {
|
||||
if (uxState == UX_STATE_ANIMATING_HIDE) {
|
||||
return;
|
||||
}
|
||||
removeHideCallbacks();
|
||||
int showTimeoutMs =
|
||||
styledPlayerControlView != null ? styledPlayerControlView.getShowTimeoutMs() : 0;
|
||||
if (showTimeoutMs > 0) {
|
||||
if (isAnimationDisabled()) {
|
||||
postDelayedRunnable(hideController, showTimeoutMs);
|
||||
} else if (uxState == UX_STATE_ONLY_PROGRESS_VISIBLE) {
|
||||
postDelayedRunnable(hideProgressBar, ANIMATION_INTERVAL_MS);
|
||||
} else {
|
||||
postDelayedRunnable(hideMainBars, showTimeoutMs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void removeHideCallbacks() {
|
||||
if (styledPlayerControlView == null) {
|
||||
return;
|
||||
}
|
||||
styledPlayerControlView.removeCallbacks(hideController);
|
||||
styledPlayerControlView.removeCallbacks(hideAllBars);
|
||||
styledPlayerControlView.removeCallbacks(hideMainBars);
|
||||
styledPlayerControlView.removeCallbacks(hideProgressBar);
|
||||
}
|
||||
|
||||
void onViewAttached(StyledPlayerControlView v) {
|
||||
styledPlayerControlView = v;
|
||||
|
||||
v.addOnLayoutChangeListener(this);
|
||||
|
||||
// Relating to Title Bar View
|
||||
ViewGroup titleBar = v.findViewById(R.id.exo_title_bar);
|
||||
|
||||
// Relating to Center View
|
||||
ViewGroup centerView = v.findViewById(R.id.exo_center_view);
|
||||
embeddedTransportControls = v.findViewById(R.id.exo_embedded_transport_controls);
|
||||
|
||||
// Relating to Minimal Layout
|
||||
minimalControls = v.findViewById(R.id.exo_minimal_controls);
|
||||
|
||||
// Relating to Bottom Bar View
|
||||
ViewGroup bottomBar = v.findViewById(R.id.exo_bottom_bar);
|
||||
|
||||
// Relating to Bottom Bar Left View
|
||||
timeView = v.findViewById(R.id.exo_time);
|
||||
View timeBar = v.findViewById(R.id.exo_progress);
|
||||
|
||||
// Relating to Bottom Bar Right View
|
||||
basicControls = v.findViewById(R.id.exo_basic_controls);
|
||||
extraControls = v.findViewById(R.id.exo_extra_controls);
|
||||
extraControlsScrollView = v.findViewById(R.id.exo_extra_controls_scroll_view);
|
||||
overflowShowButton = v.findViewById(R.id.exo_overflow_show);
|
||||
View overflowHideButton = v.findViewById(R.id.exo_overflow_hide);
|
||||
if (overflowShowButton != null && overflowHideButton != null) {
|
||||
overflowShowButton.setOnClickListener(overflowListener);
|
||||
overflowHideButton.setOnClickListener(overflowListener);
|
||||
}
|
||||
|
||||
this.titleBar = titleBar;
|
||||
this.bottomBar = bottomBar;
|
||||
this.timeBar = timeBar;
|
||||
|
||||
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 bottomBarHeight = resources.getDimension(R.dimen.exo_bottom_bar_height);
|
||||
|
||||
ValueAnimator fadeOutAnimator = ValueAnimator.ofFloat(1.0f, 0.0f);
|
||||
fadeOutAnimator.setInterpolator(new LinearInterpolator());
|
||||
fadeOutAnimator.addUpdateListener(
|
||||
animation -> {
|
||||
float animatedValue = (float) animation.getAnimatedValue();
|
||||
|
||||
if (centerView != null) {
|
||||
centerView.setAlpha(animatedValue);
|
||||
}
|
||||
if (minimalControls != null) {
|
||||
minimalControls.setAlpha(animatedValue);
|
||||
}
|
||||
});
|
||||
fadeOutAnimator.addListener(
|
||||
new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
if (timeBar instanceof DefaultTimeBar && !isMinimalMode) {
|
||||
((DefaultTimeBar) timeBar).hideScrubber(DURATION_FOR_HIDING_ANIMATION_MS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (centerView != null) {
|
||||
centerView.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
if (minimalControls != null) {
|
||||
minimalControls.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
ValueAnimator fadeInAnimator = ValueAnimator.ofFloat(0.0f, 1.0f);
|
||||
fadeInAnimator.setInterpolator(new LinearInterpolator());
|
||||
fadeInAnimator.addUpdateListener(
|
||||
animation -> {
|
||||
float animatedValue = (float) animation.getAnimatedValue();
|
||||
|
||||
if (centerView != null) {
|
||||
centerView.setAlpha(animatedValue);
|
||||
}
|
||||
if (minimalControls != null) {
|
||||
minimalControls.setAlpha(animatedValue);
|
||||
}
|
||||
});
|
||||
fadeInAnimator.addListener(
|
||||
new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
if (centerView != null) {
|
||||
centerView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (minimalControls != null) {
|
||||
minimalControls.setVisibility(isMinimalMode ? View.VISIBLE : View.INVISIBLE);
|
||||
}
|
||||
if (timeBar instanceof DefaultTimeBar && !isMinimalMode) {
|
||||
((DefaultTimeBar) timeBar).showScrubber(DURATION_FOR_SHOWING_ANIMATION_MS);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
hideMainBarsAnimator = new AnimatorSet();
|
||||
hideMainBarsAnimator.setDuration(DURATION_FOR_HIDING_ANIMATION_MS);
|
||||
hideMainBarsAnimator.addListener(
|
||||
new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
setUxState(UX_STATE_ANIMATING_HIDE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
setUxState(UX_STATE_ONLY_PROGRESS_VISIBLE);
|
||||
if (needToShowBars) {
|
||||
if (styledPlayerControlView != null) {
|
||||
styledPlayerControlView.post(showAllBars);
|
||||
}
|
||||
needToShowBars = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
hideMainBarsAnimator
|
||||
.play(fadeOutAnimator)
|
||||
.with(ofTranslationY(0, -titleBarHeight, titleBar))
|
||||
.with(ofTranslationY(0, bottomBarHeight, timeBar))
|
||||
.with(ofTranslationY(0, bottomBarHeight, bottomBar));
|
||||
|
||||
hideProgressBarAnimator = new AnimatorSet();
|
||||
hideProgressBarAnimator.setDuration(DURATION_FOR_HIDING_ANIMATION_MS);
|
||||
hideProgressBarAnimator.addListener(
|
||||
new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
setUxState(UX_STATE_ANIMATING_HIDE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
setUxState(UX_STATE_NONE_VISIBLE);
|
||||
if (needToShowBars) {
|
||||
if (styledPlayerControlView != null) {
|
||||
styledPlayerControlView.post(showAllBars);
|
||||
}
|
||||
needToShowBars = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
hideProgressBarAnimator
|
||||
.play(ofTranslationY(bottomBarHeight, bottomBarHeight + progressBarHeight, timeBar))
|
||||
.with(ofTranslationY(bottomBarHeight, bottomBarHeight + progressBarHeight, bottomBar));
|
||||
|
||||
hideAllBarsAnimator = new AnimatorSet();
|
||||
hideAllBarsAnimator.setDuration(DURATION_FOR_HIDING_ANIMATION_MS);
|
||||
hideAllBarsAnimator.addListener(
|
||||
new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
setUxState(UX_STATE_ANIMATING_HIDE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
setUxState(UX_STATE_NONE_VISIBLE);
|
||||
if (needToShowBars) {
|
||||
if (styledPlayerControlView != null) {
|
||||
styledPlayerControlView.post(showAllBars);
|
||||
}
|
||||
needToShowBars = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
hideAllBarsAnimator
|
||||
.play(fadeOutAnimator)
|
||||
.with(ofTranslationY(0, -titleBarHeight, titleBar))
|
||||
.with(ofTranslationY(0, bottomBarHeight + progressBarHeight, timeBar))
|
||||
.with(ofTranslationY(0, bottomBarHeight + progressBarHeight, bottomBar));
|
||||
|
||||
showMainBarsAnimator = new AnimatorSet();
|
||||
showMainBarsAnimator.setDuration(DURATION_FOR_SHOWING_ANIMATION_MS);
|
||||
showMainBarsAnimator.addListener(
|
||||
new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
setUxState(UX_STATE_ANIMATING_SHOW);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
setUxState(UX_STATE_ALL_VISIBLE);
|
||||
}
|
||||
});
|
||||
showMainBarsAnimator
|
||||
.play(fadeInAnimator)
|
||||
.with(ofTranslationY(-titleBarHeight, 0, titleBar))
|
||||
.with(ofTranslationY(bottomBarHeight, 0, timeBar))
|
||||
.with(ofTranslationY(bottomBarHeight, 0, bottomBar));
|
||||
|
||||
showAllBarsAnimator = new AnimatorSet();
|
||||
showAllBarsAnimator.setDuration(DURATION_FOR_SHOWING_ANIMATION_MS);
|
||||
showAllBarsAnimator.addListener(
|
||||
new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
setUxState(UX_STATE_ANIMATING_SHOW);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
setUxState(UX_STATE_ALL_VISIBLE);
|
||||
}
|
||||
});
|
||||
showAllBarsAnimator
|
||||
.play(fadeInAnimator)
|
||||
.with(ofTranslationY(-titleBarHeight, 0, titleBar))
|
||||
.with(ofTranslationY(bottomBarHeight + progressBarHeight, 0, timeBar))
|
||||
.with(ofTranslationY(bottomBarHeight + progressBarHeight, 0, bottomBar));
|
||||
|
||||
overflowShowAnimator = ValueAnimator.ofFloat(0.0f, 1.0f);
|
||||
overflowShowAnimator.setDuration(DURATION_FOR_SHOWING_ANIMATION_MS);
|
||||
overflowShowAnimator.addUpdateListener(
|
||||
animation -> animateOverflow((float) animation.getAnimatedValue()));
|
||||
overflowShowAnimator.addListener(
|
||||
new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
if (extraControlsScrollView != null) {
|
||||
extraControlsScrollView.setVisibility(View.VISIBLE);
|
||||
extraControlsScrollView.setTranslationX(extraControlsScrollView.getWidth());
|
||||
extraControlsScrollView.scrollTo(extraControlsScrollView.getWidth(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (basicControls != null) {
|
||||
basicControls.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
overflowHideAnimator = ValueAnimator.ofFloat(1.0f, 0.0f);
|
||||
overflowHideAnimator.setDuration(DURATION_FOR_SHOWING_ANIMATION_MS);
|
||||
overflowHideAnimator.addUpdateListener(
|
||||
animation -> animateOverflow((float) animation.getAnimatedValue()));
|
||||
overflowHideAnimator.addListener(
|
||||
new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
if (basicControls != null) {
|
||||
basicControls.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (extraControlsScrollView != null) {
|
||||
extraControlsScrollView.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void onViewDetached(StyledPlayerControlView v) {
|
||||
v.removeOnLayoutChangeListener(this);
|
||||
}
|
||||
|
||||
boolean isFullyVisible() {
|
||||
if (styledPlayerControlView == null) {
|
||||
return false;
|
||||
}
|
||||
return uxState == UX_STATE_ALL_VISIBLE;
|
||||
}
|
||||
|
||||
private void setUxState(int uxState) {
|
||||
int prevUxState = this.uxState;
|
||||
this.uxState = uxState;
|
||||
if (styledPlayerControlView != null) {
|
||||
StyledPlayerControlView styledPlayerControlView = this.styledPlayerControlView;
|
||||
if (uxState == UX_STATE_NONE_VISIBLE) {
|
||||
styledPlayerControlView.setVisibility(View.GONE);
|
||||
} else if (prevUxState == UX_STATE_NONE_VISIBLE) {
|
||||
styledPlayerControlView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
// TODO(insun): Notify specific uxState. Currently reuses legacy visibility listener for API
|
||||
// compatibility.
|
||||
if (prevUxState != uxState) {
|
||||
styledPlayerControlView.notifyOnVisibilityChange();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isAnimationDisabled() {
|
||||
return disableAnimation;
|
||||
}
|
||||
|
||||
private final Runnable showAllBars =
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isAnimationDisabled()) {
|
||||
setUxState(UX_STATE_ALL_VISIBLE);
|
||||
resetHideCallbacks();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (uxState) {
|
||||
case UX_STATE_NONE_VISIBLE:
|
||||
if (showAllBarsAnimator != null) {
|
||||
showAllBarsAnimator.start();
|
||||
}
|
||||
break;
|
||||
case UX_STATE_ONLY_PROGRESS_VISIBLE:
|
||||
if (showMainBarsAnimator != null) {
|
||||
showMainBarsAnimator.start();
|
||||
}
|
||||
break;
|
||||
case UX_STATE_ANIMATING_HIDE:
|
||||
needToShowBars = true;
|
||||
break;
|
||||
case UX_STATE_ANIMATING_SHOW:
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
resetHideCallbacks();
|
||||
}
|
||||
};
|
||||
|
||||
private final Runnable hideAllBars =
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (hideAllBarsAnimator == null) {
|
||||
return;
|
||||
}
|
||||
hideAllBarsAnimator.start();
|
||||
}
|
||||
};
|
||||
|
||||
private final Runnable hideMainBars =
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (hideMainBarsAnimator == null) {
|
||||
return;
|
||||
}
|
||||
hideMainBarsAnimator.start();
|
||||
postDelayedRunnable(hideProgressBar, ANIMATION_INTERVAL_MS);
|
||||
}
|
||||
};
|
||||
|
||||
private final Runnable hideProgressBar =
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (hideProgressBarAnimator == null) {
|
||||
return;
|
||||
}
|
||||
hideProgressBarAnimator.start();
|
||||
}
|
||||
};
|
||||
|
||||
private final Runnable hideController =
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
setUxState(UX_STATE_NONE_VISIBLE);
|
||||
}
|
||||
};
|
||||
|
||||
private static ObjectAnimator ofTranslationY(float startValue, float endValue, View target) {
|
||||
return ObjectAnimator.ofFloat(target, "translationY", startValue, endValue);
|
||||
}
|
||||
|
||||
private void postDelayedRunnable(Runnable runnable, long interval) {
|
||||
if (styledPlayerControlView != null && interval >= 0) {
|
||||
styledPlayerControlView.postDelayed(runnable, interval);
|
||||
}
|
||||
}
|
||||
|
||||
private void animateOverflow(float animatedValue) {
|
||||
if (extraControlsScrollView != null) {
|
||||
int extraControlTranslationX =
|
||||
(int) (extraControlsScrollView.getWidth() * (1 - animatedValue));
|
||||
extraControlsScrollView.setTranslationX(extraControlTranslationX);
|
||||
}
|
||||
|
||||
if (timeView != null) {
|
||||
timeView.setAlpha(1 - animatedValue);
|
||||
}
|
||||
if (basicControls != null) {
|
||||
basicControls.setAlpha(1 - animatedValue);
|
||||
}
|
||||
}
|
||||
|
||||
private final OnClickListener overflowListener =
|
||||
new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
resetHideCallbacks();
|
||||
if (v.getId() == R.id.exo_overflow_show && overflowShowAnimator != null) {
|
||||
overflowShowAnimator.start();
|
||||
} else if (v.getId() == R.id.exo_overflow_hide && overflowHideAnimator != null) {
|
||||
overflowHideAnimator.start();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void onLayoutChange(
|
||||
View v,
|
||||
int left,
|
||||
int top,
|
||||
int right,
|
||||
int bottom,
|
||||
int oldLeft,
|
||||
int oldTop,
|
||||
int oldRight,
|
||||
int oldBottom) {
|
||||
|
||||
boolean shouldBeMinimalMode = shouldBeMinimalMode();
|
||||
if (isMinimalMode != shouldBeMinimalMode) {
|
||||
isMinimalMode = shouldBeMinimalMode;
|
||||
v.post(() -> updateLayoutForSizeChange());
|
||||
}
|
||||
boolean widthChanged = (right - left) != (oldRight - oldLeft);
|
||||
if (!isMinimalMode && widthChanged) {
|
||||
v.post(() -> onLayoutWidthChanged());
|
||||
}
|
||||
}
|
||||
|
||||
private static int getWidth(@Nullable View v) {
|
||||
return (v != null ? v.getWidth() : 0);
|
||||
}
|
||||
|
||||
private static int getHeight(@Nullable View v) {
|
||||
return (v != null ? v.getHeight() : 0);
|
||||
}
|
||||
|
||||
private boolean shouldBeMinimalMode() {
|
||||
if (this.styledPlayerControlView == null) {
|
||||
return isMinimalMode;
|
||||
}
|
||||
ViewGroup playerControlView = this.styledPlayerControlView;
|
||||
|
||||
int width =
|
||||
playerControlView.getWidth()
|
||||
- playerControlView.getPaddingLeft()
|
||||
- playerControlView.getPaddingRight();
|
||||
int height =
|
||||
playerControlView.getHeight()
|
||||
- playerControlView.getPaddingBottom()
|
||||
- playerControlView.getPaddingTop();
|
||||
int defaultModeWidth =
|
||||
Math.max(
|
||||
getWidth(embeddedTransportControls), getWidth(timeView) + getWidth(overflowShowButton));
|
||||
int defaultModeHeight =
|
||||
getHeight(embeddedTransportControls)
|
||||
+ getHeight(titleBar)
|
||||
+ getHeight(timeBar)
|
||||
+ getHeight(bottomBar);
|
||||
|
||||
return (width <= defaultModeWidth || height <= defaultModeHeight);
|
||||
}
|
||||
|
||||
private void updateLayoutForSizeChange() {
|
||||
if (this.styledPlayerControlView == null) {
|
||||
return;
|
||||
}
|
||||
ViewGroup playerControlView = this.styledPlayerControlView;
|
||||
|
||||
if (minimalControls != null) {
|
||||
minimalControls.setVisibility(isMinimalMode ? View.VISIBLE : View.INVISIBLE);
|
||||
}
|
||||
|
||||
View fullScreenButton = playerControlView.findViewById(R.id.exo_fullscreen);
|
||||
if (fullScreenButton != null) {
|
||||
ViewGroup parent = (ViewGroup) fullScreenButton.getParent();
|
||||
parent.removeView(fullScreenButton);
|
||||
|
||||
if (isMinimalMode && minimalControls != null) {
|
||||
minimalControls.addView(fullScreenButton);
|
||||
} else if (!isMinimalMode && basicControls != null) {
|
||||
int index = Math.max(0, basicControls.getChildCount() - 1);
|
||||
basicControls.addView(fullScreenButton, index);
|
||||
} else {
|
||||
parent.addView(fullScreenButton);
|
||||
}
|
||||
}
|
||||
if (timeBar != null) {
|
||||
View timeBar = this.timeBar;
|
||||
MarginLayoutParams timeBarParams = (MarginLayoutParams) timeBar.getLayoutParams();
|
||||
int timeBarMarginBottom =
|
||||
playerControlView
|
||||
.getResources()
|
||||
.getDimensionPixelSize(R.dimen.exo_custom_progress_margin_bottom);
|
||||
timeBarParams.bottomMargin = (isMinimalMode ? 0 : timeBarMarginBottom);
|
||||
timeBar.setLayoutParams(timeBarParams);
|
||||
if (timeBar instanceof DefaultTimeBar
|
||||
&& uxState != UX_STATE_ANIMATING_HIDE
|
||||
&& uxState != UX_STATE_ANIMATING_SHOW) {
|
||||
if (isMinimalMode || uxState != UX_STATE_ALL_VISIBLE) {
|
||||
((DefaultTimeBar) timeBar).hideScrubber();
|
||||
} else {
|
||||
((DefaultTimeBar) timeBar).showScrubber();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int[] idsToHideInMinimalMode = {
|
||||
R.id.exo_title_bar,
|
||||
R.id.exo_bottom_bar,
|
||||
R.id.exo_prev,
|
||||
R.id.exo_next,
|
||||
R.id.exo_rew,
|
||||
R.id.exo_rew_with_amount,
|
||||
R.id.exo_ffwd,
|
||||
R.id.exo_ffwd_with_amount
|
||||
};
|
||||
for (int id : idsToHideInMinimalMode) {
|
||||
View v = playerControlView.findViewById(id);
|
||||
if (v != null) {
|
||||
v.setVisibility(isMinimalMode ? View.INVISIBLE : View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void onLayoutWidthChanged() {
|
||||
if (basicControls == null || extraControls == null) {
|
||||
return;
|
||||
}
|
||||
ViewGroup basicControls = this.basicControls;
|
||||
ViewGroup extraControls = this.extraControls;
|
||||
|
||||
int width =
|
||||
(styledPlayerControlView != null
|
||||
? styledPlayerControlView.getWidth()
|
||||
- styledPlayerControlView.getPaddingLeft()
|
||||
- styledPlayerControlView.getPaddingRight()
|
||||
: 0);
|
||||
int basicBottomBarWidth = getWidth(timeView);
|
||||
for (int i = 0; i < basicControls.getChildCount(); ++i) {
|
||||
basicBottomBarWidth += basicControls.getChildAt(i).getWidth();
|
||||
}
|
||||
|
||||
// BasicControls keeps overflow button at least.
|
||||
int minBasicControlsChildCount = 1;
|
||||
// ExtraControls keeps overflow button and settings button at least.
|
||||
int minExtraControlsChildCount = 2;
|
||||
|
||||
if (basicBottomBarWidth > width) {
|
||||
// move control views from basicControls to extraControls
|
||||
ArrayList<View> movingChildren = new ArrayList<>();
|
||||
int movingWidth = 0;
|
||||
int endIndex = basicControls.getChildCount() - minBasicControlsChildCount;
|
||||
for (int index = 0; index < endIndex; index++) {
|
||||
View child = basicControls.getChildAt(index);
|
||||
movingWidth += child.getWidth();
|
||||
movingChildren.add(child);
|
||||
if (basicBottomBarWidth - movingWidth <= width) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!movingChildren.isEmpty()) {
|
||||
basicControls.removeViews(0, movingChildren.size());
|
||||
|
||||
for (View child : movingChildren) {
|
||||
int index = extraControls.getChildCount() - minExtraControlsChildCount;
|
||||
extraControls.addView(child, index);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
// move controls from extraControls to basicControls if possible, else do nothing
|
||||
ArrayList<View> movingChildren = new ArrayList<>();
|
||||
int movingWidth = 0;
|
||||
int startIndex = extraControls.getChildCount() - minExtraControlsChildCount - 1;
|
||||
for (int index = startIndex; index >= 0; index--) {
|
||||
View child = extraControls.getChildAt(index);
|
||||
movingWidth += child.getWidth();
|
||||
if (basicBottomBarWidth + movingWidth > width) {
|
||||
break;
|
||||
}
|
||||
movingChildren.add(child);
|
||||
}
|
||||
|
||||
if (!movingChildren.isEmpty()) {
|
||||
extraControls.removeViews(startIndex - movingChildren.size() + 1, movingChildren.size());
|
||||
|
||||
for (View child : movingChildren) {
|
||||
basicControls.addView(child, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
26
library/ui/src/main/res/drawable-v21/exo_ripple_ffwd.xml
Normal file
26
library/ui/src/main/res/drawable-v21/exo_ripple_ffwd.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?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.
|
||||
-->
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/exo_gray">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/exo_white" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/background"
|
||||
android:drawable="@drawable/exo_styled_controls_fastforward" />
|
||||
</ripple>
|
26
library/ui/src/main/res/drawable-v21/exo_ripple_rew.xml
Normal file
26
library/ui/src/main/res/drawable-v21/exo_ripple_rew.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?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.
|
||||
-->
|
||||
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/exo_gray">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/exo_white" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/background"
|
||||
android:drawable="@drawable/exo_styled_controls_rewind" />
|
||||
</ripple>
|
31
library/ui/src/main/res/drawable/exo_ic_audiotrack.xml
Normal file
31
library/ui/src/main/res/drawable/exo_ic_audiotrack.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2019 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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M18.2,1L9.8,1C8.81,1 8,1.81 8,2.8v14.4c0,0.99 0.81,1.79 1.8,1.79l8.4,0.01c0.99,0 1.8,-0.81 1.8,-1.8L20,2.8c0,-0.99 -0.81,-1.8 -1.8,-1.8zM14,3c1.1,0 2,0.89 2,2s-0.9,2 -2,2 -2,-0.89 -2,-2 0.9,-2 2,-2zM14,16.5c-2.21,0 -4,-1.79 -4,-4s1.79,-4 4,-4 4,1.79 4,4 -1.79,4 -4,4z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M14,12.5m-2.5,0a2.5,2.5 0,1 1,5 0a2.5,2.5 0,1 1,-5 0"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
<path
|
||||
android:pathData="M6,5H4v16c0,1.1 0.89,2 2,2h10v-2H6V5z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
28
library/ui/src/main/res/drawable/exo_ic_check.xml
Normal file
28
library/ui/src/main/res/drawable/exo_ic_check.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<?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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:pathData="M0 0h24v24H0z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z" />
|
||||
</vector>
|
24
library/ui/src/main/res/drawable/exo_ic_chevron_left.xml
Normal file
24
library/ui/src/main/res/drawable/exo_ic_chevron_left.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<!--
|
||||
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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:pathData="M15.41,7.41L14,6l-6,6 6,6 1.41,-1.41L10.83,12z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
24
library/ui/src/main/res/drawable/exo_ic_chevron_right.xml
Normal file
24
library/ui/src/main/res/drawable/exo_ic_chevron_right.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<!--
|
||||
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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
@ -0,0 +1,29 @@
|
||||
<?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:width="512dp"
|
||||
android:height="512dp"
|
||||
android:viewportWidth="512"
|
||||
android:viewportHeight="512">
|
||||
|
||||
<path
|
||||
android:fillColor="#616161"
|
||||
android:pathData="M 0 0 H 512 V 512 H 0 V 0 Z" />
|
||||
<path
|
||||
android:fillColor="#525252"
|
||||
android:pathData="M256,151v123.14c-6.88-4.02-14.82-6.48-23.33-6.48 c-25.78,0-46.67,20.88-46.67,46.67c0,25.78,20.88,46.67,46.67,46.67s46.67-20.88,46.67-46.67V197.67H326V151H256z" />
|
||||
</vector>
|
31
library/ui/src/main/res/drawable/exo_ic_forward.xml
Normal file
31
library/ui/src/main/res/drawable/exo_ic_forward.xml
Normal file
@ -0,0 +1,31 @@
|
||||
<?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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<group
|
||||
android:scaleX="-0.5"
|
||||
android:scaleY="0.5"
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M12,5V1L7,6l5,5V7c3.31,0 6,2.69 6,6s-2.69,6 -6,6 -6,-2.69 -6,-6H4c0,4.42 3.58,8 8,8s8,-3.58 8,-8 -3.58,-8 -8,-8z"/>
|
||||
</group>
|
||||
</vector>
|
29
library/ui/src/main/res/drawable/exo_ic_forward_30.xml
Normal file
29
library/ui/src/main/res/drawable/exo_ic_forward_30.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?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>
|
25
library/ui/src/main/res/drawable/exo_ic_fullscreen_enter.xml
Normal file
25
library/ui/src/main/res/drawable/exo_ic_fullscreen_enter.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:pathData="M7,14L5,14v5h5v-2L7,17v-3zM5,10h2L7,7h3L10,5L5,5v5zM17,17h-3v2h5v-5h-2v3zM14,5v2h3v3h2L19,5h-5z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
25
library/ui/src/main/res/drawable/exo_ic_fullscreen_exit.xml
Normal file
25
library/ui/src/main/res/drawable/exo_ic_fullscreen_exit.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:pathData="M5,16h3v3h2v-5L5,14v2zM8,8L5,8v2h5L10,5L8,5v3zM14,19h2v-3h3v-2h-5v5zM16,8L16,5h-2v5h5L19,8h-3z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
25
library/ui/src/main/res/drawable/exo_ic_launch.xml
Normal file
25
library/ui/src/main/res/drawable/exo_ic_launch.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z"/>
|
||||
</vector>
|
@ -0,0 +1,25 @@
|
||||
<?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:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM11,16L9,16L9,8h2v8zM15,16h-2L13,8h2v8z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
@ -0,0 +1,25 @@
|
||||
<?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:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM10,16.5v-9l6,4.5 -6,4.5z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
@ -0,0 +1,32 @@
|
||||
<?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:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:pathData="M0,0h24v24H0V0z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M12,2C6.48,2,2,6.48,2,12c0,5.52,4.48,10,10,10c5.52,0,10-4.48,10-10
|
||||
C22,6.48,17.52,2,12,2z
|
||||
M18,12c0,3.31-2.69,6-6,6c-3.31,0-6-2.69-6-6h2c0,2.21,1.79,4,4,4s4-1.79,4-4s-1.79-4-4-4v3L8,7l4-4v3
|
||||
C15.31,6,18,8.69,18,12z" />
|
||||
</vector>
|
32
library/ui/src/main/res/drawable/exo_ic_rewind.xml
Normal file
32
library/ui/src/main/res/drawable/exo_ic_rewind.xml
Normal file
@ -0,0 +1,32 @@
|
||||
<?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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<group
|
||||
android:scaleX="0.5"
|
||||
android:scaleY="0.5"
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M12,5V1L7,6l5,5V7c3.31,0 6,2.69 6,6s-2.69,6 -6,6 -6,-2.69 -6,-6H4c0,4.42 3.58,8 8,8s8,-3.58 8,-8 -3.58,-8 -8,-8z"/>
|
||||
</group>
|
||||
</vector>
|
29
library/ui/src/main/res/drawable/exo_ic_rewind_10.xml
Normal file
29
library/ui/src/main/res/drawable/exo_ic_rewind_10.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?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>
|
25
library/ui/src/main/res/drawable/exo_ic_settings.xml
Normal file
25
library/ui/src/main/res/drawable/exo_ic_settings.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
25
library/ui/src/main/res/drawable/exo_ic_skip_next.xml
Normal file
25
library/ui/src/main/res/drawable/exo_ic_skip_next.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?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:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
25
library/ui/src/main/res/drawable/exo_ic_skip_previous.xml
Normal file
25
library/ui/src/main/res/drawable/exo_ic_skip_previous.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?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:width="40dp"
|
||||
android:height="40dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
25
library/ui/src/main/res/drawable/exo_ic_speed.xml
Normal file
25
library/ui/src/main/res/drawable/exo_ic_speed.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M13.05,9.79L10,7.5v9l3.05,-2.29L16,12zM13.05,9.79L10,7.5v9l3.05,-2.29L16,12zM13.05,9.79L10,7.5v9l3.05,-2.29L16,12zM11,4.07L11,2.05c-2.01,0.2 -3.84,1 -5.32,2.21L7.1,5.69c1.11,-0.86 2.44,-1.44 3.9,-1.62zM5.69,7.1L4.26,5.68C3.05,7.16 2.25,8.99 2.05,11h2.02c0.18,-1.46 0.76,-2.79 1.62,-3.9zM4.07,13L2.05,13c0.2,2.01 1,3.84 2.21,5.32l1.43,-1.43c-0.86,-1.1 -1.44,-2.43 -1.62,-3.89zM5.68,19.74C7.16,20.95 9,21.75 11,21.95v-2.02c-1.46,-0.18 -2.79,-0.76 -3.9,-1.62l-1.42,1.43zM22,12c0,5.16 -3.92,9.42 -8.95,9.95v-2.02C16.97,19.41 20,16.05 20,12s-3.03,-7.41 -6.95,-7.93L13.05,2.05C18.08,2.58 22,6.84 22,12z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
34
library/ui/src/main/res/drawable/exo_ic_subtitle_off.xml
Normal file
34
library/ui/src/main/res/drawable/exo_ic_subtitle_off.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<?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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:pathData="M0,0h24v24H0V0z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M19.5,5.5v13h-15v-13H19.5z M19,4H5C3.89,4,3,4.9,3,6v12c0,1.1,0.89,2,2,2h14c1.1,0,2-0.9,2-2V6C21,4.9,20.1,4,19,4L19,4z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M11,11H9.5v-0.5h-2v3h2V13H11v1c0,0.55-0.45,1-1,1H7c-0.55,0-1-0.45-1-1v-4c0-0.55,0.45-1,1-1h3c0.55,0,1,0.45,1,1V11z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M18,11h-1.5v-0.5h-2v3h2V13H18v1c0,0.55-0.45,1-1,1h-3c-0.55,0-1-0.45-1-1v-4c0-0.55,0.45-1,1-1h3c0.55,0,1,0.45,1,1V11z" />
|
||||
</vector>
|
28
library/ui/src/main/res/drawable/exo_ic_subtitle_on.xml
Normal file
28
library/ui/src/main/res/drawable/exo_ic_subtitle_on.xml
Normal file
@ -0,0 +1,28 @@
|
||||
<?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:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:pathData="M0 0h24v24H0z" />
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:pathData="M19 4H5c-1.11 0-2 0.9-2 2v12c0 1.1 0.89 2 2 2h14c1.1 0 2-0.9 2-2V6c0-1.1-0.9-2-2-2zm-8 7H9.5v-0.5h-2v3h2V13H11v1c0 0.55-0.45 1-1 1H7c-0.55 0-1-0.45-1-1v-4c0-0.55 0.45 -1 1-1h3c0.55 0 1 0.45 1 1v1zm7 0h-1.5v-0.5h-2v3h2V13H18v1c0 0.55-0.45 1-1 1h-3c-0.55 0-1-0.45-1-1v-4c0-0.55 0.45 -1 1-1h3c0.55 0 1 0.45 1 1v1z" />
|
||||
</vector>
|
36
library/ui/src/main/res/drawable/exo_progress.xml
Normal file
36
library/ui/src/main/res/drawable/exo_progress.xml
Normal file
@ -0,0 +1,36 @@
|
||||
<?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.
|
||||
-->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:id="@android:id/background">
|
||||
<shape android:shape="rectangle" >
|
||||
<solid android:color="#26000000" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:id="@android:id/secondaryProgress">
|
||||
<clip>
|
||||
<shape android:shape="rectangle" >
|
||||
<solid android:color="#5Cffffff" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
<item android:id="@android:id/progress">
|
||||
<clip>
|
||||
<shape android:shape="rectangle" >
|
||||
<solid android:color="#ffffff" />
|
||||
</shape>
|
||||
</clip>
|
||||
</item>
|
||||
</layer-list>
|
26
library/ui/src/main/res/drawable/exo_progress_thumb.xml
Normal file
26
library/ui/src/main/res/drawable/exo_progress_thumb.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?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.
|
||||
-->
|
||||
<scale xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:scaleWidth="100%"
|
||||
android:scaleHeight="100%"
|
||||
android:scaleGravity="center"
|
||||
android:level="10000">
|
||||
<shape android:shape="oval" >
|
||||
<solid android:color="#ffffff" />
|
||||
<size android:height="@dimen/exo_custom_progress_thumb_size"
|
||||
android:width="@dimen/exo_custom_progress_thumb_size" />
|
||||
</shape>
|
||||
</scale>
|
29
library/ui/src/main/res/drawable/exo_ripple_ffwd.xml
Normal file
29
library/ui/src/main/res/drawable/exo_ripple_ffwd.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?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.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<layer-list>
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="@color/exo_gray_ripple"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:drawable="@drawable/exo_styled_controls_fastforward"/>
|
||||
</layer-list>
|
||||
</item>
|
||||
<item android:drawable="@drawable/exo_styled_controls_fastforward" />
|
||||
</selector>
|
29
library/ui/src/main/res/drawable/exo_ripple_rew.xml
Normal file
29
library/ui/src/main/res/drawable/exo_ripple_rew.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?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.
|
||||
-->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<layer-list>
|
||||
<item>
|
||||
<shape>
|
||||
<solid android:color="@color/exo_gray_ripple"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:drawable="@drawable/exo_styled_controls_rewind"/>
|
||||
</layer-list>
|
||||
</item>
|
||||
<item android:drawable="@drawable/exo_styled_controls_rewind" />
|
||||
</selector>
|
26
library/ui/src/main/res/drawable/exo_title_bar_gradient.xml
Normal file
26
library/ui/src/main/res/drawable/exo_title_bar_gradient.xml
Normal file
@ -0,0 +1,26 @@
|
||||
<?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>
|
BIN
library/ui/src/main/res/font/roboto_medium_numbers.ttf
Normal file
BIN
library/ui/src/main/res/font/roboto_medium_numbers.ttf
Normal file
Binary file not shown.
@ -0,0 +1,28 @@
|
||||
<?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.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="visible">
|
||||
|
||||
<ImageButton android:id="@+id/exo_prev" style="@style/ExoStyledControls.Button.Previous" />
|
||||
<Button android:id="@+id/exo_rew_with_amount" style="@style/ExoStyledControls.Button.RewWithAmount" />
|
||||
<ImageButton android:id="@+id/exo_play_pause" style="@style/ExoStyledControls.Button.PlayPause" />
|
||||
<Button android:id="@+id/exo_ffwd_with_amount" style="@style/ExoStyledControls.Button.FfwdWithAmount" />
|
||||
<ImageButton android:id="@+id/exo_next" style="@style/ExoStyledControls.Button.Next" />
|
||||
</LinearLayout>
|
@ -0,0 +1,176 @@
|
||||
<?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.
|
||||
-->
|
||||
<merge xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<FrameLayout
|
||||
android:id="@+id/exo_center_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:layoutDirection="ltr">
|
||||
|
||||
<View
|
||||
android:id="@+id/exo_center_view_background"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:background="@color/exo_widget_center_view_background" />
|
||||
|
||||
<include
|
||||
android:id="@+id/exo_embedded_transport_controls"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
layout="@layout/exo_styled_embedded_transport_controls" />
|
||||
</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
|
||||
android:id="@+id/exo_bottom_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/exo_bottom_bar_height"
|
||||
android:layout_gravity="bottom"
|
||||
android:background="@color/exo_bottom_bar_background"
|
||||
android:layoutDirection="ltr">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/exo_time"
|
||||
android:layout_width="@dimen/exo_time_view_width"
|
||||
android:layout_height="@dimen/exo_bottom_bar_height"
|
||||
android:paddingStart="@dimen/exo_time_view_padding"
|
||||
android:paddingEnd="@dimen/exo_time_view_padding"
|
||||
android:paddingLeft="@dimen/exo_time_view_padding"
|
||||
android:paddingRight="@dimen/exo_time_view_padding"
|
||||
android:layout_gravity="bottom|start"
|
||||
android:layoutDirection="ltr">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exo_position"
|
||||
style="@style/ExoStyledControls.TimeText.Position" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exo_time_interpunct"
|
||||
style="@style/ExoStyledControls.TimeText.Interpunct" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exo_duration"
|
||||
style="@style/ExoStyledControls.TimeText.Duration" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/exo_basic_controls"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:orientation="horizontal"
|
||||
android:layoutDirection="ltr">
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_shuffle"
|
||||
style="@style/ExoStyledControls.Button.Bottom.Shuffle"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_repeat_toggle"
|
||||
style="@style/ExoStyledControls.Button.Bottom.RepeatToggle"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@id/exo_vr"
|
||||
style="@style/ExoStyledControls.Button.Bottom.VR"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exo_subtitle"
|
||||
style="@style/ExoStyledControls.Button.Bottom.CC"
|
||||
android:alpha="0.5"
|
||||
android:scaleType="fitCenter"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exo_fullscreen"
|
||||
style="@style/ExoStyledControls.Button.Bottom.FullScreen"/>
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exo_overflow_show"
|
||||
style="@style/ExoStyledControls.Button.Bottom.OverflowShow" />
|
||||
</LinearLayout>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/exo_extra_controls_scroll_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:visibility="invisible">
|
||||
<LinearLayout
|
||||
android:id="@+id/exo_extra_controls"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:orientation="horizontal"
|
||||
android:layoutDirection="ltr">
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exo_settings"
|
||||
style="@style/ExoStyledControls.Button.Bottom.Settings" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/exo_overflow_hide"
|
||||
style="@style/ExoStyledControls.Button.Bottom.OverflowHide" />
|
||||
</LinearLayout>
|
||||
</HorizontalScrollView>
|
||||
</FrameLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/exo_minimal_controls"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="bottom|end"
|
||||
android:visibility="invisible">
|
||||
</LinearLayout>
|
||||
|
||||
<View android:id="@id/exo_progress_placeholder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/exo_custom_progress_thumb_size"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginBottom="@dimen/exo_custom_progress_margin_bottom"/>
|
||||
</merge>
|
18
library/ui/src/main/res/layout/exo_styled_player_view.xml
Normal file
18
library/ui/src/main/res/layout/exo_styled_player_view.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 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.
|
||||
-->
|
||||
<merge>
|
||||
<include layout="@layout/exo_player_view"/>
|
||||
</merge>
|
23
library/ui/src/main/res/layout/exo_styled_settings_list.xml
Normal file
23
library/ui/src/main/res/layout/exo_styled_settings_list.xml
Normal file
@ -0,0 +1,23 @@
|
||||
<?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.
|
||||
-->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/exo_settings_listview"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:background="@color/exo_black_opacity_70"
|
||||
android:scrollbars="vertical"/>
|
@ -0,0 +1,55 @@
|
||||
<?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.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="@dimen/exo_setting_width"
|
||||
android:minHeight="@dimen/exo_settings_height"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/exo_icon"
|
||||
android:layout_width="@dimen/exo_settings_icon_size"
|
||||
android:layout_height="@dimen/exo_settings_icon_size"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="12dp"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/exo_settings_height"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:layout_marginRight="2dp"
|
||||
android:gravity="center|start"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exo_main_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/exo_white"
|
||||
android:textSize="@dimen/exo_settings_main_text_size"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exo_sub_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/exo_white_opacity_70"
|
||||
android:textSize="@dimen/exo_settings_sub_text_size"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -0,0 +1,44 @@
|
||||
<?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.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minWidth="@dimen/exo_setting_width"
|
||||
android:minHeight="@dimen/exo_settings_height"
|
||||
android:background="?android:attr/selectableItemBackground"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/exo_check"
|
||||
android:layout_width="@dimen/exo_settings_icon_size"
|
||||
android:layout_height="@dimen/exo_settings_icon_size"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:visibility="invisible"
|
||||
android:src="@drawable/exo_styled_controls_check"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exo_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="@dimen/exo_settings_height"
|
||||
android:paddingStart="2dp"
|
||||
android:paddingLeft="2dp"
|
||||
android:gravity="center|start"
|
||||
android:textColor="@color/exo_white"
|
||||
android:textSize="@dimen/exo_settings_main_text_size"/>
|
||||
</LinearLayout>
|
47
library/ui/src/main/res/values/arrays.xml
Normal file
47
library/ui/src/main/res/values/arrays.xml
Normal file
@ -0,0 +1,47 @@
|
||||
<?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.
|
||||
-->
|
||||
<resources>
|
||||
<integer-array name="exo_speed_multiplied_by_100">
|
||||
<item>25</item>
|
||||
<item>50</item>
|
||||
<item>75</item>
|
||||
<item>100</item>
|
||||
<item>125</item>
|
||||
<item>150</item>
|
||||
<item>200</item>
|
||||
</integer-array>
|
||||
|
||||
<string-array translatable="false" name="exo_playback_speeds">
|
||||
<item>0.25x</item>
|
||||
<item>0.5x</item>
|
||||
<item>0.75x</item>
|
||||
<item>@string/exo_controls_playback_speed_normal</item>
|
||||
<item>1.25x</item>
|
||||
<item>1.5x</item>
|
||||
<item>2x</item>
|
||||
</string-array>
|
||||
|
||||
<string-array translatable="false" name="exo_settings_main_texts">
|
||||
<item>@string/exo_controls_playback_speed</item>
|
||||
<item>@string/exo_controls_audio_track</item>
|
||||
</string-array>
|
||||
|
||||
<array name="exo_settings_icon_ids">
|
||||
<item>@drawable/exo_styled_controls_speed</item>
|
||||
<item>@drawable/exo_styled_controls_audiotrack</item>
|
||||
</array>
|
||||
</resources>
|
@ -40,7 +40,24 @@
|
||||
<flag name="all" value="2"/>
|
||||
</attr>
|
||||
|
||||
<!-- PlayerControlView attributes -->
|
||||
<!-- PlayerView and StyledPlayerView attributes -->
|
||||
<attr name="use_artwork" format="boolean"/>
|
||||
<attr name="shutter_background_color" format="color"/>
|
||||
<attr name="default_artwork" format="reference"/>
|
||||
<attr name="use_controller" format="boolean"/>
|
||||
<attr name="hide_on_touch" format="boolean"/>
|
||||
<attr name="hide_during_ads" format="boolean"/>
|
||||
<attr name="auto_show" format="boolean"/>
|
||||
<attr name="show_buffering" format="enum">
|
||||
<enum name="never" value="0"/>
|
||||
<enum name="when_playing" value="1"/>
|
||||
<enum name="always" value="2"/>
|
||||
</attr>
|
||||
<attr name="keep_content_on_player_reset" format="boolean"/>
|
||||
<attr name="use_sensor_rotation" format="boolean"/>
|
||||
<attr name="player_layout_id" format="reference"/>
|
||||
|
||||
<!-- PlayerControlView and StyledPlayerControlView attributes -->
|
||||
<attr name="show_timeout" format="integer"/>
|
||||
<attr name="rewind_increment" format="integer"/>
|
||||
<attr name="fastforward_increment" format="integer"/>
|
||||
@ -49,8 +66,11 @@
|
||||
<attr name="show_previous_button" format="boolean"/>
|
||||
<attr name="show_next_button" format="boolean"/>
|
||||
<attr name="show_shuffle_button" format="boolean"/>
|
||||
<attr name="show_subtitle_button" format="boolean"/>
|
||||
<attr name="show_vr_button" format="boolean"/>
|
||||
<attr name="time_bar_min_update_interval" format="integer"/>
|
||||
<attr name="controller_layout_id" format="reference"/>
|
||||
<attr name="disable_animation" format="boolean"/>
|
||||
|
||||
<!-- DefaultTimeBar attributes -->
|
||||
<attr name="bar_height" format="dimension"/>
|
||||
@ -68,21 +88,17 @@
|
||||
<attr name="played_ad_marker_color" format="color"/>
|
||||
|
||||
<declare-styleable name="PlayerView">
|
||||
<attr name="use_artwork" format="boolean"/>
|
||||
<attr name="shutter_background_color" format="color"/>
|
||||
<attr name="default_artwork" format="reference"/>
|
||||
<attr name="use_controller" format="boolean"/>
|
||||
<attr name="hide_on_touch" format="boolean"/>
|
||||
<attr name="hide_during_ads" format="boolean"/>
|
||||
<attr name="auto_show" format="boolean"/>
|
||||
<attr name="show_buffering" format="enum">
|
||||
<enum name="never" value="0"/>
|
||||
<enum name="when_playing" value="1"/>
|
||||
<enum name="always" value="2"/>
|
||||
</attr>
|
||||
<attr name="keep_content_on_player_reset" format="boolean"/>
|
||||
<attr name="use_sensor_rotation" format="boolean"/>
|
||||
<attr name="player_layout_id" format="reference"/>
|
||||
<attr name="use_artwork"/>
|
||||
<attr name="shutter_background_color"/>
|
||||
<attr name="default_artwork"/>
|
||||
<attr name="use_controller"/>
|
||||
<attr name="hide_on_touch"/>
|
||||
<attr name="hide_during_ads"/>
|
||||
<attr name="auto_show"/>
|
||||
<attr name="show_buffering"/>
|
||||
<attr name="keep_content_on_player_reset"/>
|
||||
<attr name="use_sensor_rotation"/>
|
||||
<attr name="player_layout_id"/>
|
||||
<attr name="surface_type"/>
|
||||
<!-- AspectRatioFrameLayout attributes -->
|
||||
<attr name="resize_mode"/>
|
||||
@ -110,6 +126,48 @@
|
||||
<attr name="played_ad_marker_color"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="StyledPlayerView">
|
||||
<attr name="use_artwork"/>
|
||||
<attr name="shutter_background_color"/>
|
||||
<attr name="default_artwork"/>
|
||||
<attr name="use_controller"/>
|
||||
<attr name="hide_on_touch"/>
|
||||
<attr name="hide_during_ads"/>
|
||||
<attr name="auto_show"/>
|
||||
<attr name="show_buffering"/>
|
||||
<attr name="keep_content_on_player_reset"/>
|
||||
<attr name="use_sensor_rotation"/>
|
||||
<attr name="player_layout_id"/>
|
||||
<attr name="surface_type"/>
|
||||
<!-- AspectRatioFrameLayout attributes -->
|
||||
<attr name="resize_mode"/>
|
||||
<!-- PlayerControlView attributes -->
|
||||
<attr name="show_timeout"/>
|
||||
<attr name="rewind_increment"/>
|
||||
<attr name="fastforward_increment"/>
|
||||
<attr name="repeat_toggle_modes"/>
|
||||
<attr name="show_shuffle_button"/>
|
||||
<attr name="show_subtitle_button"/>
|
||||
<attr name="show_vr_button"/>
|
||||
<attr name="time_bar_min_update_interval"/>
|
||||
<attr name="controller_layout_id"/>
|
||||
<attr name="disable_animation"/>
|
||||
<!-- DefaultTimeBar attributes -->
|
||||
<attr name="bar_height"/>
|
||||
<attr name="touch_target_height"/>
|
||||
<attr name="ad_marker_width"/>
|
||||
<attr name="scrubber_enabled_size"/>
|
||||
<attr name="scrubber_disabled_size"/>
|
||||
<attr name="scrubber_dragged_size"/>
|
||||
<attr name="scrubber_drawable"/>
|
||||
<attr name="played_color"/>
|
||||
<attr name="scrubber_color"/>
|
||||
<attr name="buffered_color" />
|
||||
<attr name="unplayed_color"/>
|
||||
<attr name="ad_marker_color"/>
|
||||
<attr name="played_ad_marker_color"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="AspectRatioFrameLayout">
|
||||
<attr name="resize_mode"/>
|
||||
</declare-styleable>
|
||||
@ -142,6 +200,37 @@
|
||||
<attr name="played_ad_marker_color"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="StyledPlayerControlView">
|
||||
<attr name="show_timeout"/>
|
||||
<attr name="rewind_increment"/>
|
||||
<attr name="fastforward_increment"/>
|
||||
<attr name="repeat_toggle_modes"/>
|
||||
<attr name="show_rewind_button"/>
|
||||
<attr name="show_fastforward_button"/>
|
||||
<attr name="show_previous_button"/>
|
||||
<attr name="show_next_button"/>
|
||||
<attr name="show_shuffle_button"/>
|
||||
<attr name="show_subtitle_button"/>
|
||||
<attr name="show_vr_button"/>
|
||||
<attr name="time_bar_min_update_interval"/>
|
||||
<attr name="controller_layout_id"/>
|
||||
<attr name="disable_animation"/>
|
||||
<!-- DefaultTimeBar attributes -->
|
||||
<attr name="bar_height"/>
|
||||
<attr name="touch_target_height"/>
|
||||
<attr name="ad_marker_width"/>
|
||||
<attr name="scrubber_enabled_size"/>
|
||||
<attr name="scrubber_disabled_size"/>
|
||||
<attr name="scrubber_dragged_size"/>
|
||||
<attr name="scrubber_drawable"/>
|
||||
<attr name="played_color"/>
|
||||
<attr name="scrubber_color"/>
|
||||
<attr name="buffered_color" />
|
||||
<attr name="unplayed_color"/>
|
||||
<attr name="ad_marker_color"/>
|
||||
<attr name="played_ad_marker_color"/>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="DefaultTimeBar">
|
||||
<attr name="bar_height"/>
|
||||
<attr name="touch_target_height"/>
|
||||
|
27
library/ui/src/main/res/values/colors.xml
Normal file
27
library/ui/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?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.
|
||||
-->
|
||||
<resources>
|
||||
<color name="exo_gray">#808080</color>
|
||||
<color name="exo_gray_ripple">#80808080</color>
|
||||
<color name="exo_white">#ffffff</color>
|
||||
<color name="exo_white_opacity_70">#B3ffffff</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_bottom_bar_background">#b0000000</color>
|
||||
</resources>
|
55
library/ui/src/main/res/values/dimens.xml
Normal file
55
library/ui/src/main/res/values/dimens.xml
Normal file
@ -0,0 +1,55 @@
|
||||
<?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.
|
||||
-->
|
||||
<resources>
|
||||
<dimen name="exo_setting_width">150dp</dimen>
|
||||
<dimen name="exo_settings_height">48dp</dimen>
|
||||
<dimen name="exo_settings_icon_size">24dp</dimen>
|
||||
<dimen name="exo_settings_text_height">24dp</dimen>
|
||||
<dimen name="exo_settings_main_text_size">14sp</dimen>
|
||||
<dimen name="exo_settings_sub_text_size">12sp</dimen>
|
||||
<dimen name="exo_settings_offset">8dp</dimen>
|
||||
|
||||
<dimen name="exo_icon_size">48dp</dimen>
|
||||
<dimen name="exo_icon_margin">10dp</dimen>
|
||||
<dimen name="exo_pause_icon_padding">6dp</dimen>
|
||||
<dimen name="exo_icon_padding">12dp</dimen>
|
||||
<dimen name="exo_icon_text_size">8dp</dimen>
|
||||
<dimen name="exo_icon_padding_bottom">18.5dp</dimen>
|
||||
|
||||
<dimen name="exo_custom_progress_max_size">2dp</dimen>
|
||||
<dimen name="exo_custom_progress_thumb_size">16dp</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_time_view_padding">10dp</dimen>
|
||||
<dimen name="exo_time_view_width">170sp</dimen>
|
||||
|
||||
<!-- Rounded corner radius for video subtitles. -->
|
||||
<dimen name="exo_subtitle_corner_radius">2dp</dimen>
|
||||
|
||||
<!-- Shadow radius for video subtitles. -->
|
||||
<dimen name="exo_subtitle_shadow_radius">2dp</dimen>
|
||||
|
||||
<!-- Shadow offset for video subtitles. -->
|
||||
<dimen name="exo_subtitle_shadow_offset">2dp</dimen>
|
||||
|
||||
<!-- Outline width for video subtitles. -->
|
||||
<dimen name="exo_subtitle_outline_width">2dp</dimen>
|
||||
|
||||
</resources>
|
@ -36,4 +36,28 @@
|
||||
<drawable name="exo_notification_rewind">@drawable/exo_icon_rewind</drawable>
|
||||
<drawable name="exo_notification_stop">@drawable/exo_icon_stop</drawable>
|
||||
<drawable name="exo_notification_small_icon">@drawable/exo_icon_circular_play</drawable>
|
||||
|
||||
<drawable name="exo_styled_controls_play">@drawable/exo_ic_play_circle_filled</drawable>
|
||||
<drawable name="exo_styled_controls_pause">@drawable/exo_ic_pause_circle_filled</drawable>
|
||||
<drawable name="exo_styled_controls_replay">@drawable/exo_ic_replay_circle_filled</drawable>
|
||||
<drawable name="exo_styled_controls_next">@drawable/exo_ic_skip_next</drawable>
|
||||
<drawable name="exo_styled_controls_previous">@drawable/exo_ic_skip_previous</drawable>
|
||||
<drawable name="exo_styled_controls_fastforward">@drawable/exo_ic_forward</drawable>
|
||||
<drawable name="exo_styled_controls_rewind">@drawable/exo_ic_rewind</drawable>
|
||||
<drawable name="exo_styled_controls_repeat_all">@drawable/exo_icon_repeat_all</drawable>
|
||||
<drawable name="exo_styled_controls_repeat_off">@drawable/exo_icon_repeat_off</drawable>
|
||||
<drawable name="exo_styled_controls_repeat_one">@drawable/exo_icon_repeat_one</drawable>
|
||||
<drawable name="exo_styled_controls_shuffle_off">@drawable/exo_icon_shuffle_off</drawable>
|
||||
<drawable name="exo_styled_controls_shuffle_on">@drawable/exo_icon_shuffle_on</drawable>
|
||||
<drawable name="exo_styled_controls_fullscreen_enter">@drawable/exo_ic_fullscreen_enter</drawable>
|
||||
<drawable name="exo_styled_controls_fullscreen_exit">@drawable/exo_ic_fullscreen_exit</drawable>
|
||||
<drawable name="exo_styled_controls_vr">@drawable/exo_icon_vr</drawable>
|
||||
<drawable name="exo_styled_controls_subtitle_off">@drawable/exo_ic_subtitle_off</drawable>
|
||||
<drawable name="exo_styled_controls_subtitle_on">@drawable/exo_ic_subtitle_on</drawable>
|
||||
<drawable name="exo_styled_controls_overflow_show">@drawable/exo_ic_chevron_right</drawable>
|
||||
<drawable name="exo_styled_controls_overflow_hide">@drawable/exo_ic_chevron_left</drawable>
|
||||
<drawable name="exo_styled_controls_settings">@drawable/exo_ic_settings</drawable>
|
||||
<drawable name="exo_styled_controls_check">@drawable/exo_ic_check</drawable>
|
||||
<drawable name="exo_styled_controls_audiotrack">@drawable/exo_ic_audiotrack</drawable>
|
||||
<drawable name="exo_styled_controls_speed">@drawable/exo_ic_speed</drawable>
|
||||
</resources>
|
||||
|
@ -42,8 +42,6 @@
|
||||
<string name="exo_controls_shuffle_on_description">Shuffle on</string>
|
||||
<!-- Description for a button that controls the shuffle mode of media playback. In this mode shuffle is off. [CHAR LIMIT=40] -->
|
||||
<string name="exo_controls_shuffle_off_description">Shuffle off</string>
|
||||
<!-- Description for a media control button that toggles whether a video playback is fullscreen. [CHAR LIMIT=30] -->
|
||||
<string name="exo_controls_fullscreen_description">Fullscreen mode</string>
|
||||
<!-- Description for a media control button that toggles whether a video playback is in VR mode. [CHAR LIMIT=30] -->
|
||||
<string name="exo_controls_vr_description">VR mode</string>
|
||||
<!-- Description for a button that downloads a piece of media content onto the device. [CHAR LIMIT=20] -->
|
||||
@ -94,4 +92,61 @@
|
||||
<string name="exo_track_bitrate"><xliff:g id="bitrate" example="5.2">%1$.2f</xliff:g> Mbps</string>
|
||||
<!-- Defines a way of appending an item to a list of items. For example appending "banana" to "apple, pear" to get "apple, pear, banana". Note: the command separator will appear between all consecutive list items, so do not use an equivalent of 'and'. [CHAR LIMIT=40] -->
|
||||
<string name="exo_item_list"><xliff:g id="list" example="apple, pear">%1$s</xliff:g>, <xliff:g id="item" example="banana">%2$s</xliff:g></string>
|
||||
|
||||
<!-- The title of audio track selection. It is shown with the currently selected audio track's
|
||||
information (such as language). If a user clicks it, the list of possible audio tracks
|
||||
will be shown. [CHAR_LIMIT=20] -->
|
||||
<string name="exo_controls_audio_track">Audio track</string>
|
||||
<!-- The title of playback speed selection. It is shown with the current playback speed.
|
||||
If a user clicks it, the list of possible playback speeds will be shown.
|
||||
[CHAR_LIMIT=32] -->
|
||||
<string name="exo_controls_playback_speed">Playback speed</string>
|
||||
<!-- It implies that the playback speed is normal (1.0x). [CHAR_LIMIT=16] -->
|
||||
<string name="exo_controls_playback_speed_normal">Normal</string>
|
||||
<!-- Text for displaying custom playback speed. [CHAR_LIMIT=16] -->
|
||||
<string translatable="false" name="exo_controls_custom_playback_speed">
|
||||
<xliff:g id="playback_speed" example="1.05">%1$.2f</xliff:g>x
|
||||
</string>
|
||||
<!-- Placeholder text for displaying time. Used to calculate which size layout to use. -->
|
||||
<string translatable="false" name="exo_controls_time_placeholder">00:00:00</string>
|
||||
<!-- Content description of the left arrow button to navigate a list of buttons.
|
||||
If a user clicks the arrow, it goes back to the previous button list.
|
||||
[CHAR_LIMIT=32] -->
|
||||
<string name="exo_controls_overflow_left_button_description">Back to previous button list</string>
|
||||
<!-- Content description of the right arrow button to navigate a list of buttons.
|
||||
If a user clicks the arrow, it shows a list of other buttons.
|
||||
[CHAR_LIMIT=32] -->
|
||||
<string name="exo_controls_overflow_right_button_description">See more buttons</string>
|
||||
<!-- Content description of the seek bar, which indicates the playback progress.
|
||||
[CHAR_LIMIT=32] -->
|
||||
<string name="exo_controls_seek_bar_description">Playback progress</string>
|
||||
<!-- Content description of the settings button.
|
||||
[CHAR_LIMIT=32] -->
|
||||
<string name="exo_controls_settings_description">Settings</string>
|
||||
<!-- Content description of the close caption (subtitle) button, when subtitle is turned on.
|
||||
If a user clicks the button, it will turned off.
|
||||
[CHAR_LIMIT=40] -->
|
||||
<string name="exo_controls_cc_is_on">Subtitle is on. Click to hide it.</string>
|
||||
<!-- Content description of the close caption (subtitle) button, when subtitle is turned off.
|
||||
If a user clicks the button, it will turned on.
|
||||
[CHAR_LIMIT=40] -->
|
||||
<string name="exo_controls_cc_is_off">Subtitle is off. Click to show it.</string>
|
||||
<!-- Content description of the "rewind" button.
|
||||
If a user clicks the button, it rewinds back by rewind amount.
|
||||
[CHAR_LIMIT=32] -->
|
||||
<string name="exo_controls_rewind_desc_holder">
|
||||
Rewind by <xliff:g id="rewind_amount" example="10">%d</xliff:g> seconds</string>
|
||||
<!-- Content description of the "fast-forward" button.
|
||||
If a user clicks the button, it fast-forwards by fast forward amount.
|
||||
[CHAR_LIMIT=32] -->
|
||||
<string name="exo_controls_ffwd_desc_holder">
|
||||
Go forward by <xliff:g id="fastforward_amount" example="30">%d</xliff:g> seconds</string>
|
||||
<!-- Content description of the full screen enter button.
|
||||
If a user clicks the button, the widget goes into full-screen mode.
|
||||
[CHAR_LIMIT=32] -->
|
||||
<string name="exo_controls_fullscreen_enter_description">Full screen enter</string>
|
||||
<!-- Content description of the full screen exit button.
|
||||
If a user clicks the button, the widget exits full-screen mode.
|
||||
[CHAR_LIMIT=32] -->
|
||||
<string name="exo_controls_fullscreen_exit_description">Full screen exit</string>
|
||||
</resources>
|
||||
|
@ -56,4 +56,142 @@
|
||||
<item name="android:contentDescription">@string/exo_controls_vr_description</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls" />
|
||||
|
||||
<style name="ExoStyledControls.Button">
|
||||
<item name="android:background">?android:attr/selectableItemBackground</item>
|
||||
<item name="android:scaleType">fitXY</item>
|
||||
<item name="android:layout_width">@dimen/exo_icon_size</item>
|
||||
<item name="android:layout_height">@dimen/exo_icon_size</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Previous">
|
||||
<item name="android:src">@drawable/exo_styled_controls_previous</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_previous_description</item>
|
||||
<item name="android:padding">@dimen/exo_icon_padding</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Next">
|
||||
<item name="android:src">@drawable/exo_styled_controls_next</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_next_description</item>
|
||||
<item name="android:padding">@dimen/exo_icon_padding</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.PlayPause">
|
||||
<item name="android:src">@drawable/exo_styled_controls_play</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_play_description</item>
|
||||
<item name="android:padding">@dimen/exo_pause_icon_padding</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.FfwdWithAmount">
|
||||
<item name="android:background">@drawable/exo_ripple_ffwd</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_ffwd_desc_holder</item>
|
||||
<item name="android:gravity">center|bottom</item>
|
||||
<item name="android:paddingBottom">@dimen/exo_icon_padding_bottom</item>
|
||||
<item name="android:textAppearance">@style/ExoStyledControls.ButtonText</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.RewWithAmount">
|
||||
<item name="android:background">@drawable/exo_ripple_rew</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_rewind_desc_holder</item>
|
||||
<item name="android:gravity">center|bottom</item>
|
||||
<item name="android:paddingBottom">@dimen/exo_icon_padding_bottom</item>
|
||||
<item name="android:textAppearance">@style/ExoStyledControls.ButtonText</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.ButtonText">
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">@dimen/exo_icon_text_size</item>
|
||||
<item name="android:textColor">@color/exo_white</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Minimal" />
|
||||
|
||||
<!-- TODO(insun): Merge play and pause buttons in minimal mode as well. -->
|
||||
<style name="ExoStyledControls.Button.Minimal.Pause">
|
||||
<item name="android:src">@drawable/exo_styled_controls_pause</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_pause_description</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Minimal.Play">
|
||||
<item name="android:src">@drawable/exo_styled_controls_play</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_play_description</item>
|
||||
</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">
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_gravity">center_vertical</item>
|
||||
<item name="android:paddingLeft">4dp</item>
|
||||
<item name="android:paddingRight">4dp</item>
|
||||
<item name="android:textStyle">bold</item>
|
||||
<item name="android:textSize">14sp</item>
|
||||
<item name="android:gravity">center</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.TimeText.Position">
|
||||
<item name="android:textColor">@color/exo_white</item>
|
||||
<item name="android:text">@string/exo_controls_time_placeholder</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.TimeText.Interpunct">
|
||||
<item name="android:textColor">@color/exo_white_opacity_70</item>
|
||||
<item name="android:text">·</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.TimeText.Duration">
|
||||
<item name="android:textColor">@color/exo_white_opacity_70</item>
|
||||
<item name="android:text">@string/exo_controls_time_placeholder</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Bottom">
|
||||
<item name="android:gravity">center_horizontal</item>
|
||||
<item name="android:padding">@dimen/exo_icon_padding</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Bottom.Shuffle">
|
||||
<item name="android:src">@drawable/exo_styled_controls_shuffle_off</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_shuffle_off_description</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Bottom.RepeatToggle">
|
||||
<item name="android:src">@drawable/exo_styled_controls_repeat_off</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_repeat_off_description</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Bottom.VR">
|
||||
<item name="android:src">@drawable/exo_styled_controls_vr</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_vr_description</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Bottom.CC">
|
||||
<item name="android:src">@drawable/exo_styled_controls_subtitle_off</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_cc_is_off</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Bottom.FullScreen">
|
||||
<item name="android:src">@drawable/exo_styled_controls_fullscreen_enter</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_fullscreen_enter_description</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Bottom.OverflowShow">
|
||||
<item name="android:src">@drawable/exo_styled_controls_overflow_show</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_overflow_right_button_description</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Bottom.OverflowHide">
|
||||
<item name="android:src">@drawable/exo_styled_controls_overflow_hide</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_overflow_left_button_description</item>
|
||||
</style>
|
||||
|
||||
<style name="ExoStyledControls.Button.Bottom.Settings">
|
||||
<item name="android:src">@drawable/exo_styled_controls_settings</item>
|
||||
<item name="android:contentDescription">@string/exo_controls_settings_description</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
Loading…
x
Reference in New Issue
Block a user