1 package com.android.tests.basicProjectWithJava; 2 3 import com.android.tests.basicJavaProject.Foo; 4 5 import android.app.Activity; 6 import android.os.Bundle; 7 import android.widget.TextView; 8 9 public class Main extends Activity { 10 /** Called when the activity is first created. */ 11 @Override onCreate(Bundle savedInstanceState)12 public void onCreate(Bundle savedInstanceState) { 13 super.onCreate(savedInstanceState); 14 setContentView(R.layout.main); 15 16 Foo foo = new Foo(); 17 18 TextView tv = (TextView) findViewById(R.id.text); 19 tv.setText("basicProjectWithJava\nvalue from java project:" + foo.getRandomFoo()); 20 } 21 }