Created fields in which data are displayed, erased default text from them,

and they are not visible, but here is a field whose background: drawable / back.xml is not hidden. How to hide it?

alt text

    1 answer 1

    What about the visibility property? View has 3 visibility states:

    1. View.VISIBLE - visible
    2. View.INVISIBLE - invisible, but still takes up space
    3. View.GONE - invisible, and does not take place.

    You can programmatically set it like this:

    TextView text = (TextView)findViewById(R.id.textView); text.setVisibility(View.GONE); 
    • Well TextView serves as a template, if I make it inVISIBLE, then all elements will also be invisible. - Man
    • in the picture you have a ListView ? and better show the layout of this screen. - tim_taller
    • So make inVISIBLE items that need to be hidden. What is the problem? - Vladyslav Matviienko