I have just an ImageButton and TextView. I just want to write some text in TextView when i clicked the ImageButton. Here is my code.
final TextView txt = (TextView) findViewById(R.id.textView1);
ImageButton btn = (ImageButton) findViewById(R.id.imageButton1);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
txt.setText("abc");
}
});
In this case, this code is working as i want.
But when i want to use it within "tabhost" , it is not working.
Can anyone help me ?