-3

Hi i am trying to figure out the error but still i couldn't :(. Following is the link to get my activity layout xml.(i am sorry SO didn't allow me to write it here because of character limit :( )

link to code

The problem is when i set visibility of "main" layout to visible and all others to invisible (which is what i want to do) the buttons "bilateral" and "guassianblur" not appearing just black space for those buttons appears. other buttons appearing good. i tried changing the size parameters but still no luck. can anybody guide me through this? following is the way i set visibility

mainview.setVisibility(View.VISIBLE);
lightview.setVisibility(View.INVISIBLE);
colorview.setVisibility(View.INVISIBLE);
dilateview.setVisibility(View.INVISIBLE);
erodeview.setVisibility(View.INVISIBLE);
blurview.setVisibility(View.INVISIBLE);
medianview.setVisibility(View.INVISIBLE);
guassianfiltering.setVisibility(View.INVISIBLE);
bilateralfiltering.setVisibility(View.INVISIBLE);
d91
  • 83
  • 1
  • 8

3 Answers3

1

Try setting android:visibility="gone"instead of "invisible". See stackoverflow link

Community
  • 1
  • 1
Megha Maniar
  • 444
  • 5
  • 22
1

instead of Invisible use visibility GONE

mainview.setVisibility(View.VISIBLE);
lightview.setVisibility(View.GONE);
colorview.setVisibility(View.GONE);
dilateview.setVisibility(View.GONE);
erodeview.setVisibility(View.GONE);
blurview.setVisibility(View.GONE);
medianview.setVisibility(View.GONE);
guassianfiltering.setVisibility(View.GONE);
bilateralfiltering.setVisibility(View.GONE);
shahid17june
  • 1,441
  • 1
  • 10
  • 15
0

View.VISIBLE means that view should be visible to user and user can interact.

View.INVISIBLE means that view should not but visible to user so that they can't interact with view but view occupies the same space as in visible state.

And, View.GONE means that view should not be available to user as well as doesn't occupy any space in the screen, also doesn't affect other view.

Android Documentation

Ashish M
  • 763
  • 6
  • 13