Unfortunately Myfirstproject Stopped Working Error In Java
I know this is a very simple question for you experts,but please forgive me.Im very new to this android platform. I tried to display a string in a textview when a button is clicked
Solution 1:
I have done some modifications in onCreate().here i am making a textview which you left.Do that and say is it working ?
@OverridepublicvoidonCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mybtn= newButton(this);
mybtn.setOnClickListener(this);
txtView=newTextView(this);
// printmyname();LinearLayout ll=newLinearLayOut(this);
ll.setOrientation(LinearLayout.VERTICAL);
ll.addView(mybtn);
ll.addView(txtView);
setContentView(ll);
// setContentView(R.layout.main);
}
HTH :)
Post a Comment for "Unfortunately Myfirstproject Stopped Working Error In Java"