summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/app/CommonControllerOverlay.java
diff options
context:
space:
mode:
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;