您的位置:首页 > 移动开发 > Android开发

Android-基本XML

2015-06-01 17:05 459 查看
Android-基本XML
一 xml文件基本介绍

layout中的类的基类为View

例如一个Button类的定义,其他的类似

<Button

        1 添加一个id,在R类中自动生成id(R类中的id) id在整个项目唯一

        android:id="@+id/button1"

      

        2 布局宽度

        android:layout_width="wrap_content"

        3 布局高度

        android:layout_height="wrap_content"

        4 布局的三种格式

        fill_conten        填满

        match_content 匹配

        wrap_content   正常

        5 文本信息

        android:text="Button" />
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: