Sunday, January 1, 2012

android : visible invisible textView by click in button

1- get the reference for the textView
      open /res/layout/main.xml and add in the textView
android:id="@+id/haikuTextView"
        in button method
public void buttonName (View view) {
TextView textView=(TextView) findViewById(R.id.haikuTextView);//1
 textView.setVisibility(View.VISIBLE); //2
}
1 - click create field in R.id

No comments:

Post a Comment