Skip to content
Browse files

Merge "Mms: Add initialization the mLayoutType parameter."

  • Loading branch information...
2 parents 04dc066 + b2511fb commit 3d0efa0ca2df27a46ef49c3654873b030ebb5dd0 Tom Taylor committed with Gerrit Code Review Jan 2, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/com/android/mms/model/LayoutModel.java
View
5 src/com/android/mms/model/LayoutModel.java
@@ -110,6 +110,11 @@ private void validateLayouts() {
if (mTextRegion == null) {
createDefaultTextRegion();
}
+ // LayoutModel will re-construct when orientation changes, so we need to
+ // initialize mLayoutType here. Otherwise, the mLayoutType is alway default
+ // value (LAYOUT_BOTTOM_TEXT) after LayoutModel re-construct.
+ mLayoutType =
+ (mImageRegion.getTop() == 0) ? LAYOUT_BOTTOM_TEXT : LAYOUT_TOP_TEXT;
}
public RegionModel getRootLayout() {

0 comments on commit 3d0efa0

Please sign in to comment.
Something went wrong with that request. Please try again.