Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix LayoutWeight problems.

  • Loading branch information...
commit 2695a1fe192de8b8dae380eaf67089c036bcc7dd 1 parent 679f712
Takao Sumitomo authored December 25, 2012
7  LibCtkView/src/net/cattaka/android/ctkview/ResizableLinearLayout.java
@@ -115,6 +115,13 @@ public void addView(View child, int index, android.view.ViewGroup.LayoutParams p
115 115
             }
116 116
             super.addView(slider, index, sliderParams);
117 117
         }
  118
+        if (getOrientation() == LinearLayout.VERTICAL) {
  119
+            params.width = LayoutParams.MATCH_PARENT;
  120
+            params.height = 0;
  121
+        } else {
  122
+            params.width = 0;
  123
+            params.height = LayoutParams.MATCH_PARENT;
  124
+        }
118 125
         super.addView(child, index, params);
119 126
     }
120 127
 }

0 notes on commit 2695a1f

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