码迷,mamicode.com
首页 > 移动开发 > 详细

3.App Resources-Resource Types/Layout Resource

时间:2014-11-03 15:58:29      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:android   style   blog   http   io   color   ar   for   sp   

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>

 

3.App Resources-Resource Types/Layout Resource

标签:android   style   blog   http   io   color   ar   for   sp   

原文地址:http://www.cnblogs.com/iMirror/p/4071156.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!