I have created my first application for android “Hello android”. With using Eclipse, ADT and android sdk. First time using all 3. I have below code.
package helloandroid.test;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class TestActivity 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, Android");
setContentView(tv);
}
}
When i run this a blank mobile screen apperas (also 3-4 command prompts opens), that black screen after a while starts looking like typical android mobile screen. Mobile screen works fine but i do not see “Hello, Android” writen any where. What could be the reason. Even i am putting debuggers but control does not come there.
I got it. I had to go on “Menu” in mobile screen then on “custon code” where i see my application.