Chinaunix首页 | 论坛 | 博客
  • 博客访问: 280766
  • 博文数量: 28
  • 博客积分: 11
  • 博客等级: 民兵
  • 技术积分: 895
  • 用 户 组: 普通用户
  • 注册时间: 2012-11-19 19:50
个人简介

不畏浮云遮望眼,只缘身在最高层

文章分类

全部博文(28)

文章存档

2014年(1)

2013年(27)

分类: Android平台

2013-04-01 21:54:52

开始学习android,感觉挺有意思的

//activity_main.xml 代码

点击(此处)折叠或打开

  1. LinearLayout xmlns:android=""
  2.     xmlns:tools=""
  3.     android:layout_width="match_parent"
  4.     android:layout_height="match_parent"
  5.     android:orientation="vertical"
  6.     tools:context=".MainActivity" >


  7.     <TextView
  8.         android:layout_width="fill_parent"
  9.         android:layout_height="wrap_content"
  10.         android:text="@string/mobile" />
  11.     <EditText
  12.         android:layout_width="fill_parent"
  13.         android:layout_height="wrap_content"
  14.         android:id="@+id/mobile"
  15.         android:hint=""
  16.        />
  17.     <Button
  18.         android:id="@+id/button"
  19.         android:layout_width="wrap_content"
  20.         android:layout_height="wrap_content"
  21.         android:text="@string/button" />
  22.     
  23. </LinearLayout>


//strings.xml代码 
点击(此处)折叠或打开
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <resources>

  3.     <string name="app_name">电话拨号器</string>
  4.     <string name="mobile">请输入手机号码</string>
  5.     <string name="button">拨号</string>
  6.     <string name="action_settings">Settings</string>
  7.     

  8. </resources>
显示效果如下:













阅读(2302) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~