六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 76|回复: 0

Android平台上的Gphone 图像演示

[复制链接]

升级  50%

5

主题

5

主题

5

主题

童生

Rank: 1

积分
25
 楼主| 发表于 2013-1-15 02:39:15 | 显示全部楼层 |阅读模式
package android_programmers_guide.HelloWorldImage;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ImageView;
public class HelloWorldImage extends Activity {
    /** Called when the activity is first created. */
                                                                    
  @Override
  public void onCreate(Bundle icicle) {
      super.onCreate(icicle);
      /**Hello World Image JFD*/
      /**BEGIN                    */
      /**Create the ImageView */
      ImageView HelloWorldImageView = new ImageView(this);
      /**Set the ImageView to helloworld.png */
      HelloWorldImageView.setImageResource(S.drawable.hello);
      /**Set the ContentView to the ImageView */
      setContentView(HelloWorldImageView);
      /**END                            */
  }
}
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表