Skip to content

Commit

Permalink
rev 1018 - fix for overlaid screen images on return from external app…
Browse files Browse the repository at this point in the history
… or hierarchy view
  • Loading branch information
mitchellsundt committed Oct 17, 2012
1 parent 1c590a4 commit faafc3f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.odk.collect.android"
android:versionCode="1017"
android:versionCode="1018"
android:versionName="1.2.1" >
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
Expand Down
17 changes: 14 additions & 3 deletions src/org/odk/collect/android/activities/FormEntryActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,15 @@ private void showPreviousView() {
* appropriately given the AnimationType. Also updates the progress bar.
*/
public void showView(View next, AnimationType from) {

// disable notifications...
if ( mInAnimation != null ) {
mInAnimation.setAnimationListener(null);
}
if ( mOutAnimation != null ) {
mOutAnimation.setAnimationListener(null);
}

// logging of the view being shown is already done, as this was handled by createView()
switch (from) {
case RIGHT:
Expand Down Expand Up @@ -1020,6 +1029,10 @@ public void showView(View next, AnimationType from) {
if (mStaleView != null) {
// start OutAnimation for transition...
mStaleView.startAnimation(mOutAnimation);
// and remove the old view (MUST occur after start of animation!!!)
mRelativeLayout.removeView(mStaleView);
} else {
mAnimationCompletionSet = 2;
}
// start InAnimation for transition...
mCurrentView.startAnimation(mInAnimation);
Expand Down Expand Up @@ -1624,10 +1637,8 @@ protected void onDestroy() {
private int mAnimationCompletionSet = 0;

private void afterAllAnimations() {
Log.i(t, "afterAllAnimations");
if ( mStaleView != null ) {
// and remove the old view (MUST occur after start of animation!!!)
mRelativeLayout.removeView(mStaleView);
if ( mStaleView instanceof ODKView ) {
// http://code.google.com/p/android/issues/detail?id=8488
((ODKView) mStaleView).recycleDrawables();
Expand Down

0 comments on commit faafc3f

Please sign in to comment.