I have a textview that should get visible if a particular condition is satisfied. The other views are functioning properly on satisfaction of the condition but the text view is not getting visible.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFF">
 <RelativeLayout
    android:id="@+id/nav_header_container"
    android:layout_width="match_parent"
    android:layout_height="50dp"
    android:layout_alignParentTop="true"
    android:background="#000">
   <TextView
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:text="Hi "
       android:textStyle="bold"
       android:layout_centerVertical="true"
       android:textColor="#FFF"
       android:paddingLeft="5dp"
       android:id="@+id/hi"/>
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textColor="#FFF"
        android:id="@+id/name"
        android:textStyle="bold"
        android:layout_centerVertical="true"
        android:text="!"
        android:layout_toRightOf="@+id/hi"/>
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true"
        android:textStyle="italic"
        android:textColor="#FFF"
        android:id="@+id/edit"
        android:paddingRight="5dp"
        android:layout_alignParentRight="true"/>
</RelativeLayout>
<android.support.v7.widget.RecyclerView
    android:id="@+id/drawerList"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/nav_header_container"
    android:layout_marginTop="15dp"
    />
<TextView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:id="@+id/hello"
    android:text="Hello"
    android:textColor="#000"
    android:layout_below="@+id/drawerList"
    android:layout_marginTop="15dp"
    android:paddingLeft="5dp"
    android:textStyle="italic"/>
   </RelativeLayout>
Text view with id=hello is not showing up.
This is the code that I am using-
   if(fname!="!")
    {
        edit.setText("EDIT");
        hello.setVisibility(View.VISIBLE);
    }
    else
    {
        edit.setText("What's going on?");
        hello.setVisibility(View.GONE);
    }
 
     
     
    