欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

android include 使用

系統(tǒng) 1928 0


android include 使用
?

??

?

在main.xml中包含aaa.xml,bbb.xml

aaa.xml
          <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical" >
    <TextView
        android:id="@+id/tv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="a" />


</LinearLayout>
        
?
bbb.xml

            <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical" >
    <TextView
        android:id="@+id/tv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="a" />


</LinearLayout>

          
?

main.xml

                <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >


    <include
        android:id="@+id/a"
        layout="@layout/aaa" />


    <include
        android:id="@+id/b"
        layout="@layout/bbb" />


</LinearLayout>

              
?

效果圖


android include 使用
?

獲取組件
                    public class LayoutTestActivity extends Activity {
      private LinearLayout l1, l2;
      private TextView tv1, tv2;


      @Override
      public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);


            l1 = (LinearLayout) findViewById(R.id.a);
            tv1 = (TextView) l1.findViewById(R.id.tv);
            l2 = (LinearLayout) findViewById(R.id.b);
            tv2 = (TextView) l2.findViewById(R.id.tv);


            tv1.setText("aaaaaaaaaaaaaaaaaaaaaaaa");
            tv2.setText("bbbbbbbbbbbbbbbbbbbbbbbb");


      }
}

                  
?

效果圖

android include 使用


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 九热精品| 亚洲视频在线播放 | 国产午夜精品久久久 | 欧美三级欧美一级 | 国产成人免费全部网站 | 日本在线免费观看 | 91seseav | 国产婷婷精品av在线 | 日韩欧美在线一区二区三区 | 色综合久久久久综合99 | 五月婷婷丁香在线观看 | 天天综合欧美 | 日韩福利视频导航 | 日韩中文字幕在线播放 | 色综合天天娱乐综合网 | 在线播放国产精品 | 日韩午夜三级 | 黄色 在线播放 | 精品国产一区探花在线观看 | 色综色天天综合网 | 中文字幕日韩欧美一区二区三区 | 国产精品综合亚洲AV久久久小说 | 毛片av网| 久久青青草视频 | 久久综合图区亚洲综合图区 | 国产日韩欧美在线 | 国产精品资源在线观看网站 | 久久88香港三级 | 日韩久久精品 | 四虎影视最新网站在线播放 | 国产1区在线观看 | 青青久久久国产线免观 | 色交网站| 亚洲成在人线中文字幕 | 日韩成人在线电影 | 欧美久久久久 | 男女污网站 | 欧美日韩在线看 | 在线看免电影网站 | 波多野结衣高清在线播放 | 99re热精品视频 |