Search code examples
androidtextviewcheckedtextview

i want to set visibility for the text view


Hello In my android application i want to set visibility for the text view . I am having 3 text-views and 3 check-boxes in application. i want to set visibility of text-views by checking check-boxes, i am using "setVisibility()". it is working also but problem is when i dont check check-box for text-view1 at that time it shows blank and keeps space for text-view one and then it shows text-view2 & 3. I don't want to show this blank space for text-view1. I want to show the text-view from top which i select from check-boxes.. is there any way to do this ?? Thank you.


Solution

  • You might be using View.INVISIBLE. However, you need to use use View.GONE in order to remove that space.

    yourEditText.setVisibility(View.GONE);