Permalink
Browse files

Fix LayoutWeight problems.

  • Loading branch information...
1 parent 679f712 commit 2695a1fe192de8b8dae380eaf67089c036bcc7dd @cattaka committed Dec 24, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 LibCtkView/src/net/cattaka/android/ctkview/ResizableLinearLayout.java
@@ -115,6 +115,13 @@ public void addView(View child, int index, android.view.ViewGroup.LayoutParams p
}
super.addView(slider, index, sliderParams);
}
+ if (getOrientation() == LinearLayout.VERTICAL) {
+ params.width = LayoutParams.MATCH_PARENT;
+ params.height = 0;
+ } else {
+ params.width = 0;
+ params.height = LayoutParams.MATCH_PARENT;
+ }
super.addView(child, index, params);
}
}

0 comments on commit 2695a1f

Please sign in to comment.