summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/CommonControllerOverlay.java
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-10-17 23:40:33 -0700
committerSteve Kondik <steve@cyngn.com>2015-10-17 23:40:33 -0700
commitbcbf7c98a521b9ee4a7d03e00dcfc469c9b3a398 (patch)
tree85d07b2095695fe79235ab16e627f8b22c7bfd8d /src/com/android/gallery3d/app/CommonControllerOverlay.java
parenta3fcd50080c0546ebd5f0caf932eef02fabdd7ad (diff)
parent8de528917bf03cca93ac2a3dd19b7a5719d1a26e (diff)
downloadandroid_packages_apps_Gallery2-bcbf7c98a521b9ee4a7d03e00dcfc469c9b3a398.tar.gz
android_packages_apps_Gallery2-bcbf7c98a521b9ee4a7d03e00dcfc469c9b3a398.tar.bz2
android_packages_apps_Gallery2-bcbf7c98a521b9ee4a7d03e00dcfc469c9b3a398.zip
Merge branch 'cm-12.1' of git://github.com/CyanogenMod/android_packages_apps_Gallery2 into cm-13.0
Change-Id: Ib8caa024d2e6feca332e3645038f226fd5a910a2
Diffstat (limited to 'src/com/android/gallery3d/app/CommonControllerOverlay.java')
-rw-r--r--src/com/android/gallery3d/app/CommonControllerOverlay.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/com/android/gallery3d/app/CommonControllerOverlay.java b/src/com/android/gallery3d/app/CommonControllerOverlay.java
index 9adb4e7a8..7a553e906 100644
--- a/src/com/android/gallery3d/app/CommonControllerOverlay.java
+++ b/src/com/android/gallery3d/app/CommonControllerOverlay.java
@@ -47,10 +47,13 @@ public abstract class CommonControllerOverlay extends FrameLayout implements
PAUSED,
ENDED,
ERROR,
- LOADING
+ LOADING,
+ BUFFERING,
+ RETRY_CONNECTING,
+ RETRY_CONNECTING_ERROR
}
- private static final float ERROR_MESSAGE_RELATIVE_PADDING = 1.0f / 6;
+ protected static final float ERROR_MESSAGE_RELATIVE_PADDING = 1.0f / 6;
protected Listener mListener;
@@ -96,13 +99,9 @@ public abstract class CommonControllerOverlay extends FrameLayout implements
ProgressBar spinner = new ProgressBar(context);
spinner.setIndeterminate(true);
mLoadingView.addView(spinner, wrapContent);
- TextView loadingText = createOverlayTextView(context);
- loadingText.setText(R.string.loading_video);
- mLoadingView.addView(loadingText, wrapContent);
addView(mLoadingView, wrapContent);
mPlayPauseReplayView = new ImageView(context);
- mPlayPauseReplayView.setImageResource(R.drawable.ic_vidcontrol_play);
mPlayPauseReplayView.setContentDescription(
context.getResources().getString(R.string.accessibility_play_video));
mPlayPauseReplayView.setBackgroundResource(R.drawable.bg_vidcontrol);
@@ -119,7 +118,6 @@ public abstract class CommonControllerOverlay extends FrameLayout implements
new RelativeLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
setLayoutParams(params);
- hide();
}
abstract protected void createTimeBar(Context context);
@@ -252,7 +250,7 @@ public abstract class CommonControllerOverlay extends FrameLayout implements
// | Navigation Bar | insets.bottom
// +-----------------+/
// Please see View.fitSystemWindows() for more details.
- private final Rect mWindowInsets = new Rect();
+ protected final Rect mWindowInsets = new Rect();
@Override
protected boolean fitSystemWindows(Rect insets) {
@@ -290,7 +288,7 @@ public abstract class CommonControllerOverlay extends FrameLayout implements
}
}
- private void layoutCenteredView(View view, int l, int t, int r, int b) {
+ protected void layoutCenteredView(View view, int l, int t, int r, int b) {
int cw = view.getMeasuredWidth();
int ch = view.getMeasuredHeight();
int cl = (r - l - cw) / 2;