Android开发网

首页|Android开发环境|Android开发教程|Android开发视频|Android游戏开发|Android开发实例|Android开发书籍|鸡啄米博客

Android ApiDemo示例解读系列之八:App->Activity->Hello world

       我们在前面介绍过Hello world示例,这里的Hello world 的Layout定义稍有不同:

XML/HTML代码
  1. <TextView xmlns:android=”http://schemas.android.com/apk/res/android”  
  2. android:id=”@+id/text”  
  3. android:layout_width=”match_parent”  
  4. android:layout_height=”match_parent”  
  5. android:gravity=”center_vertical|center_horizontal”  
  6. android:text=”@string/hello_world”/>  

       ApiDemo 示例中的将Hello world 显示的屏幕中间。gravity 类似于其它平台上的alignment(对齐)。

Android ApiDemo示例解读系列之八:App->Activity->Hello world

 

Tags:Activity | 2013/5/14 | 发表评论

相关文章: