xugan 发表于 2013-1-15 02:39:15

Android平台上的Gphone 图像演示

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                            */
}
}
页: [1]
查看完整版本: Android平台上的Gphone 图像演示