tags:

views:

90

answers:

1

Hi guys,

I'm wondering if there is a way to hide some field in Android. I tried with setting the value in a textedit and then make it invisible, but the result is that the value is invisible, but the control takes space. In my case, I want to store some extra value in a row of a ListView, instead of using hidden fields, is there another solution? Thank you in advance guys, bye!

+3  A: 

Use View's public static final int GONE field.

In your case textEdit.setVisibility(View.GONE), or in xml android:visibility="gone"

Setting the view to INVISIBLE does not take layout into consideration, but GONE does.

McStretch
Great, that's exactly what I was looking for. Thank you!