I did the famous hello world tutorial
and then it printed "Hello Android" with no problems on the virtual device.
Now I want to print "Good Bye Android" also, in addition to, and below "Hello Android". Ho can I do it? I tried adding another line of tv.setText("Good Bye Android"); below the Hello Andorid line but this time it only displays Good bye Android. How can I make both displayed?
Code:
package com.mysite.helloworld;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class MysitehelloworldActivity 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);
}
}
and then it printed "Hello Android" with no problems on the virtual device.
Now I want to print "Good Bye Android" also, in addition to, and below "Hello Android". Ho can I do it? I tried adding another line of tv.setText("Good Bye Android"); below the Hello Andorid line but this time it only displays Good bye Android. How can I make both displayed?