I've got a example with a TextView and EditView where I do this successfully. See http://developer.android.com/reference/android/view/View.html#setVisibility(int)that is where View.VISIBLE is defined. Just noticed View.GONE. that could be helpful.
Define TextView and EditText: TextView adminLabel; EditText admin; Assign from Layout: adminLabel = (TextView)findViewById(R.id.AdminLabel); admin = (EditText)findViewById(R.id.Admin); Set to invisible: admin.setVisibility(View.INVISIBLE); adminLabel.setVisibility(View.INVISIBLE); Set to visible: admin.setVisibility(View.VISIBLE); adminLabel.setVisibility(View.VISIBLE); -- Carmen http://www.twitter.com/CarmenDelessio http://www.talkingandroid.com http://www.facebook.com/BFFPhoto http://www.twitter.com/DroidDrop On Fri, Sep 25, 2009 at 3:49 PM, Kingcrowley <kingcrow...@gmail.com> wrote: > > I was wondering how this works, > > I can set ImageViews VISIBLE or INVISIBLE in OnCreate, but i can't > seem to do it anywhere else properly? > using code like "imgView.setVisibility(ImageView.VISIBLE);" > any pointers/advice? > > Thanks, > > David > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---