HelloWorld
来源:互联网 发布:mastercam9.1软件下载 编辑:程序博客网 时间:2024/05/17 22:37
package com.example.helloword;import android.os.Bundle;import android.app.Activity;import android.view.Menu;import android.view.View;import android.widget.TextView;public class HelloWordActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //使用hellworld.xml 文件定义的界面布局 setContentView(R.layout.hello_word); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.hello_word, menu); return true; } public void clickHandler(View source){ //获取UI界面中ID为R.id.show的文本框 TextView tv=(TextView)findViewById(R.id.show); //改变文本框的内容 tv.setText("Hello Android-"+new java.util.Date()); } }
0 0
- helloworld
- HelloWorld
- helloworld
- helloworld
- HelloWorld
- HelloWorld
- HelloWorld
- HelloWorld
- HelloWorld
- HelloWorld
- helloWorld!
- helloworld!
- HelloWorld
- HelloWorld
- HelloWorld
- HelloWorld
- HelloWorld
- helloworld
- centos wget 命令安装
- MyEclipse导入非本机项目jdk版本不同异常
- 【剑指offer】面试题18:树的子结构
- Ural - 1753 Bookshelf
- S3C6410驱动I80接口LCM
- HelloWorld
- [数据库]MySQL Hash索引和B-Tree索引的区别
- hibernate session缓存机制
- Ubuntu 14.04 x64 安装 Android SDK
- web socket
- SpringDI
- 代码简洁之道——注释
- 制作简易计算器封装类
- 多年后