how do i make an app’s view invisible based on input?

For example you want to make textView_reply invinsible from beginning, but after replyHeader click you want to chang it’s visibility, so. Change your textView_reply in xml like:

`

<TextView
            android:id="@+id/textView_reply"
            android:visibility="gone"
            android:layout_width="wrap_content"
            android:layout_below="@+id/textView_header"
            android:layout_height="wrap_content"
            android:text="This is the reply" />

`

And when you need to make it visible – just call:

replyHeader = findViewById(R.id.textView_header);
    replyHeader.setVisibility(View.Visible)

it works in both visibility types

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top