悄悄成長
          for navigation
                  RelativeLayout.LayoutParams relativeParams =
                   new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
                  relativeParams.addRule(RelativeLayout.CENTER_HORIZONTAL)
                      LinearLayout.LayoutParams lineParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,     LinearLayout.LayoutParams.WRAP_CONTENT);

                  LinearLayout line = new LinearLayout(this);
                  LinearLayout line1 = new LinearLayout(this);

                  line.addView(myTt0, lineParams);
                  line.addView(myTx0, lineParams);
                  line.addView(myTx1, lineParams);
                  
                  line1.addView(myTx, lineParams);
                  
                  relativeLayout.addView(line, relativeParams);    //Attention:if the two params are same, the larger layout will be cliped.
                  relativeLayout1.addView(line1, relativeParams);
           ////////////////////////////////////////////////////////////
                  So the relativeParams should use different ones attach to more than one layouts as below:

                  relativeLayout.addView(line, relativeParams);
                  relativeLayout1.addView(line1, relativeParams_c);
          posted on 2008-03-06 19:19 Duan Bo Hao 閱讀(347) 評論(0)  編輯  收藏

          只有注冊用戶登錄后才能發(fā)表評論。


          網站導航:
           
           
          主站蜘蛛池模板: 连江县| 三明市| 时尚| 康马县| 汝州市| 潮州市| 台南市| 化隆| 廊坊市| 安远县| 大同县| 闽侯县| 临安市| 奎屯市| 毕节市| 平邑县| 黄浦区| 文化| 墨玉县| 金阳县| 淮南市| 精河县| 安福县| 麻阳| 汤阴县| 拉萨市| 德惠市| 重庆市| 玛多县| 嵊泗县| 定陶县| 台南县| 饶河县| 韶关市| 个旧市| 甘孜县| 安泽县| 清苑县| 河津市| 库伦旗| 开鲁县|