I’m wondering if there is a way to hide a field in Android.
I tried with setting the value in a TextEdit and then making the TextEdit invisible, but the result is that the value is invisible, but the control takes space.
In my case, I want to store an extra value in a row of a ListView.
Is there another solution besides using hidden fields?
Use View’s
public static final int GONEfield.In your case
textEdit.setVisibility(View.GONE), or in xmlandroid:visibility="gone"Setting the view to
INVISIBLEdoes not take layout into consideration, butGONEdoes.