diff options
author | 2013-05-15 11:25:56 -0700 | |
---|---|---|
committer | 2013-05-15 11:25:56 -0700 | |
commit | 03fe0cf4dd03028b84ef05f9a9519a51fb9977e6 (patch) | |
tree | 598fbbee8702937c30d7aeac619b0acaaa048a4d /java/src | |
parent | a10c80fe3997a58ec938e23987ea9cc3bfb35cf6 (diff) | |
parent | 3b8921646fb51b9bb91108cfc103a5feccbbbbe9 (diff) | |
download | latinime-03fe0cf4dd03028b84ef05f9a9519a51fb9977e6.tar.gz latinime-03fe0cf4dd03028b84ef05f9a9519a51fb9977e6.tar.xz latinime-03fe0cf4dd03028b84ef05f9a9519a51fb9977e6.zip |
am 3b892164: am 7b2114a4: Display still image when device can\'t play welcome video
* commit '3b8921646fb51b9bb91108cfc103a5feccbbbbe9':
Display still image when device can't play welcome video
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/setup/SetupActivity.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/setup/SetupActivity.java b/java/src/com/android/inputmethod/latin/setup/SetupActivity.java index 044180bd6..bf24b11eb 100644 --- a/java/src/com/android/inputmethod/latin/setup/SetupActivity.java +++ b/java/src/com/android/inputmethod/latin/setup/SetupActivity.java @@ -30,6 +30,7 @@ import android.util.Log; import android.view.View; import android.view.inputmethod.InputMethodInfo; import android.view.inputmethod.InputMethodManager; +import android.widget.ImageView; import android.widget.TextView; import android.widget.VideoView; @@ -201,11 +202,14 @@ public final class SetupActivity extends Activity implements View.OnClickListene mWelcomeVideoView.setBackgroundResource(0); } }); + final ImageView welcomeImageView = (ImageView)findViewById(R.id.setup_welcome_image); mWelcomeVideoView.setOnErrorListener(new MediaPlayer.OnErrorListener() { @Override public boolean onError(final MediaPlayer mp, final int what, final int extra) { Log.e(TAG, "Playing welcome video causes error: what=" + what + " extra=" + extra); mWelcomeVideoView.setVisibility(View.GONE); + welcomeImageView.setImageResource(R.raw.setup_welcome_image); + welcomeImageView.setVisibility(View.VISIBLE); return true; } }); |