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++ 视频和教程下载站点
    SQL超时解决方法
    初学者必备:C++经典入门详细教程
    人生致命的八个经典问题
    字长与字节
    typedef用法(三)
    遍历搜索注册表
    数据库连接字符串大全 之 SQL服务器篇
    十五个步骤收获学习的习惯
    谈基于.net平台windows开发中的模式窗体.NET教程,.NET Framework
  • 原文地址:https://www.cnblogs.com/androidez/p/2913064.html
Copyright © 2011-2022 走看看