关于引入布局的那些事(笔记)

来源:互联网 发布:snapchat注册检查网络 编辑:程序博客网 时间:2024/05/19 11:38

根元素可以加入背景属性

  1. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  2.     android:layout_width="match_parent"  
  3.     android:layout_height="wrap_content"  
  4.     android:background="@drawable/title_bg" > 


只需要在其他布局中

  1. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"  
  2.     android:layout_width="match_parent"  
  3.     android:layout_height="match_parent" >  
  4.   
  5.     <include layout="@layout/title"/>  
  6.   
  7. </LinearLayout>



0 0
原创粉丝点击