Commit 7dcaeec6 authored by nicolasroard's avatar nicolasroard Committed by Android Git Automerger
Browse files

am 8b3ce9b0: Merge "Fix crash when showing history" into gb-ub-photos-arches

* commit '8b3ce9b0':
  Fix crash when showing history
parents 45dfd43e 8b3ce9b0
......@@ -457,6 +457,9 @@ public class FilterShowActivity extends Activity implements OnItemClickListener,
int accessoryPanelWidth = viewPanel.getWidth();
int mainViewWidth = findViewById(R.id.mainView).getWidth();
int mainPanelWidth = mImageShow.getDisplayedImageBounds().width();
if (mainPanelWidth == 0) {
mainPanelWidth = mainViewWidth;
}
int leftOver = mainViewWidth - mainPanelWidth - accessoryPanelWidth;
if (leftOver < 0) {
return -accessoryPanelWidth;
......
......@@ -83,7 +83,7 @@ public class ImageShow extends View implements OnGestureListener,
private HistoryAdapter mHistoryAdapter = null;
private ImageStateAdapter mImageStateAdapter = null;
private Rect mImageBounds = null;
private Rect mImageBounds = new Rect();
private boolean mTouchShowOriginal = false;
private long mTouchShowOriginalDate = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment