zoukankan      html  css  js  c++  java
  • merge标签

    merge:可以让其他的布局直接引用,一般和inClude配套使用。

    inClude:加载一个其他的布局进来。

    Demo: merge

     1 <?xml version="1.0" encoding="utf-8"?>
     2 <merge xmlns:android="http://schemas.android.com/apk/res/android"
     3     android:layout_width="match_parent"
     4     android:layout_height="match_parent" >
     5     
     6     <View 
     7         android:layout_width="match_parent"
     8         android:layout_height="1dip"
     9         android:background="#656665"
    10         />
    11 
    12 </merge>

    添加merge布局

     1 <?xml version="1.0" encoding="utf-8"?>
     2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     3     android:layout_width="match_parent"
     4     android:layout_height="match_parent"
     5     android:orientation="vertical" >
     6 
     7     <TextView
     8         style="@style/text_title_style"
     9         android:text="@string/lost_protected_setting_text_01" />
    10 
    11     <View style="@style/view_divide_line_style" />
    12 
    13     <RelativeLayout
    14         android:layout_width="match_parent"
    15         android:layout_height="wrap_content" >
    16 
    17         <TextView
    18             android:layout_width="wrap_content"
    19             android:layout_height="wrap_content"
    20             android:text="@string/lost_protected_setting_text_02"
    21             android:textColor="#025086"
    22             android:textSize="18sp" />
    23 
    24         <TextView
    25             android:id="@+id/tv_lost_protected_setting_safe_number"
    26             android:layout_width="wrap_content"
    27             android:layout_height="wrap_content"
    28             android:layout_alignParentRight="true"
    29             android:textColor="#025086"
    30             android:textSize="18sp" />
    31         
    32     </RelativeLayout>
    33 
    34     <include layout="@layout/line"/>
    35 </LinearLayout>
  • 相关阅读:
    c语言-何为编程?
    c语言-注释
    【转】使用DirectUI技术实现QQ界面
    c语言-error C2440: “static_cast”: 无法从“UINT (__thiscall CHyperLink::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)”
    系统分析师【转】
    c语言-经验之谈
    开源托管站点大全
    c语言-扑克牌小魔术
    c语言-猜数字游戏
    世界语简介
  • 原文地址:https://www.cnblogs.com/androidez/p/2913064.html
Copyright © 2011-2022 走看看