Android第一个程序 Hello World
16lz
2021-01-23
Create a New Android Project
From Eclipse, select File -> New -> Project
Make the changes below to our HelloWorld.java
package com.suky.example;import android.app.Activity;import android.os.Bundle;import android.widget.TextView;public class HelloWorld extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello World!"); setContentView(tv); }}
Run our applications: select Run -> Open Run Dialog
更多相关文章
- Android 判断程序是否在前台运行
- Android控制台中运行Java程序
- 程序员也是会浪漫的->打造浪漫的Android表白程序
- ANDROID – 使用特定的URL开启应用程序
- Android点击2次返回按钮退出应用程序
- Android自学笔记:应用程序组件
- Android应用程序(activity)启动过程(二)