Android开发学习笔记:Button事件实现方法的总结

来源:IT的点点滴滴 责任编辑:栏目编辑 发表时间:2013-07-01 08:44 点击:

下面介绍Button事件实现的两种方法

main.xml

  1. <?xml version="1.0" encoding="utf-8"?> 
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
  3.     android:orientation="vertical" 
  4.     android:layout_width="fill_parent" 
  5.     android:layout_height="fill_parent" 
  6.     > 
  7. <TextView    
  8.     android:layout_width="fill_parent"   
  9.     android:layout_height="wrap_content"   
  10.     android:text="@string/hello" 
  11.     /> 
  12. <Button   
  13.     android:id="@+id/myButton1" 
  14.     android:text=" 按钮1 " 
  15.     android:layout_width="wrap_content"   
  16.     android:layout_height="wrap_content"   
  17.     /> 
  18. <Button   
  19.     android:id="@+id/myButton2" 
  20.     android:text=" 按钮2 " 
  21.     android:layout_width="wrap_content"   
  22.     android:layout_height="wrap_content&

    相关新闻>>

      发表评论
      请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
      用户名: 验证码:点击我更换图片
      最新评论 更多>>

      推荐热点

      • Android 完全退出程序
      • 原创:Android应用开发-Andorid歌词秀,含源码
      • android 屏幕保护
      • Android手机软件汉化教程---第四课 dex文件汉化
      • 众多Android 开源项目推荐,给力工作给力学习
      • Android Audio代码分析4
      • Android得到已安装的应用程序信息!
      • Android开发者指南(29) —— USB Host and Accessory
      • Android成长的幕后推手:工程师鲁宾
      网站首页 - 友情链接 - 网站地图 - TAG标签 - RSS订阅 - 内容搜索
      Copyright © 2008-2015 计算机技术学习交流网. 版权所有

      豫ICP备11007008号-1