zoukankan      html  css  js  c++  java
  • 3.App Resources-Resource Types/Layout Resource

    1. Layout Resources

      A layout resource defines the architecture for the UI in an Activity or a component of a UI.

    2. Syntax

      

    <?xml version="1.0" encoding="utf-8"?>
    <ViewGroup  //A container for other View elements
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@[+][package:]id/resource_name"
        android:layout_height=["dimension" | "fill_parent" | "wrap_content"]
        android:layout_width=["dimension" | "fill_parent" | "wrap_content"]
        [ViewGroup-specific attributes] >
    <View //An individual UI component, generally referred to as a "widget". android:id="@[+][package:]id/resource_name" android:layout_height=["dimension" | "fill_parent" | "wrap_content"] android:layout_width=["dimension" | "fill_parent" | "wrap_content"] [View-specific attributes] > <requestFocus/>//Any element representing a View object can include this empty element, which gives its parent initial focus on the screen. You can have only one of these elements per file. </View>
    <ViewGroup > <View /> </ViewGroup>
    <include layout="@layout/layout_resource"/>
    </ViewGroup>
  • 相关阅读:
    JSONP跨域的原理解析( 一种脚本注入行为)
    用Navicat_SSH 连接数据库服务器
    ng-repeat && ng-options的故事
    The different between ng-grid & ui-grid
    Web工作原理
    js操作cookies方法
    人生苦短,我用Python(目录)
    哈希算法
    数据结构
    算法入门
  • 原文地址:https://www.cnblogs.com/iMirror/p/4071156.html
Copyright © 2011-2022 走看看