title: searchview does not show any results
body: <p>I am trying to get a search results from a custom adapter which does not show any results. The list view is working, but when I search or type any word in the search view nothing happens. Could somebody help me doing the things.</p>
  
  <pre><code>    Mainactivity.java
  
      package com.studiored.muslimbabynames;
  
      import android.content.Intent;
      import android.support.v7.app.AppCompatActivity;
      import android.os.Bundle;
      import android.view.View;
      import android.widget.ImageView;
  
      public class MainActivity extends AppCompatActivity {
      ImageView boy, girl;
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_main);
  
              girl = findViewById(R.id.girlimage);
              boy = findViewById(R.id.boyimage);
  
  
              girl.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                  Intent i = new Intent(MainActivity.this, GirlName.class);
                  startActivity(i);
                  }
              });
              boy.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View v) {
                      Intent i = new Intent(MainActivity.this, BoyName.class);
                      startActivity(i);
                  }
              });
          }
      }
  
  
      BoyName.java
      package com.studiored.muslimbabynames;
  
      import android.support.v7.app.AppCompatActivity;
      import android.os.Bundle;
      import android.view.Menu;
      import android.view.MenuInflater;
      import android.view.MenuItem;
      import android.widget.ArrayAdapter;
      import android.widget.ListView;
      import android.widget.SearchView;
  
      import java.util.ArrayList;
  
      public class BoyName extends AppCompatActivity {
      ListView List_itemboy;
      NameAdapter adapter;
          @Override
          protected void onCreate(Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_boy_name);
  
              ArrayList&lt;NameListClass&gt; nameList = new ArrayList&lt;NameListClass&gt;();
  
              nameList.add(new NameListClass("Rayyan", "Door of a Paradise"));
              nameList.add(new NameListClass("Rafi", "Best Friend"));
              nameList.add(new NameListClass("Sadiq", "Sadiq"));
              nameList.add(new NameListClass("Rayyan", "Door of a Paradise"));
              nameList.add(new NameListClass("Rayyan", "Door of a Paradise"));
              nameList.add(new NameListClass("Rayyan", "Door of a Paradise"));
              nameList.add(new NameListClass("Rayyan", "Door of a Paradise"));
              nameList.add(new NameListClass("Rayyan", "Door of a Paradise"));
              nameList.add(new NameListClass("Rayyan", "Door of a Paradise"));
              nameList.add(new NameListClass("Rayyan", "Door of a Paradise"));
  
  
               adapter = new NameAdapter(this, nameList);
              List_itemboy = findViewById(R.id.list_itemboy);
              List_itemboy.setAdapter(adapter);
              List_itemboy.setTextFilterEnabled(true);
          }
          @Override
          public boolean onCreateOptionsMenu(Menu menu){
              MenuInflater inflater =getMenuInflater();
              inflater.inflate(R.menu.search_view,menu);
              MenuItem item = menu.findItem(R.id.search_name);
              SearchView searchView = (SearchView)item.getActionView();
              searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
                  @Override
                  public boolean onQueryTextSubmit(String query) {
                      return false;
                  }
  
                  @Override
                  public boolean onQueryTextChange(String newText) {
      adapter.getFilter().filter(newText);
  
                      return false;
                  }
              });
              return super.onCreateOptionsMenu(menu);
          }
  
      }
  </code></pre>
  
  <p>This is my custom Adapter file
          NameAdapter.java</p>
  
  <pre><code>    package com.studiored.muslimbabynames;
  
      import android.content.Context;
      import android.support.annotation.NonNull;
      import android.support.annotation.Nullable;
      import android.view.LayoutInflater;
      import android.view.View;
      import android.view.ViewGroup;
      import android.widget.ArrayAdapter;
      import android.widget.TextView;
  
      import org.w3c.dom.Text;
  
      import java.util.ArrayList;
  
      public class NameAdapter extends ArrayAdapter&lt;NameListClass&gt; {
  
          public NameAdapter(@NonNull Context context, ArrayList&lt;NameListClass&gt; nameList) {
              super(context, 0, nameList);
  
  
          }
          @NonNull
          @Override
          public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
              NameListClass name = getItem(position);
              if (convertView == null){
                  convertView = LayoutInflater.from(getContext()).inflate(R.layout.list_item_view,parent,false);
              }
              TextView Listname = convertView.findViewById(R.id.textView);
              Listname.setText(name.Name);
              TextView MeanigName = convertView.findViewById(R.id.textView2);
              MeanigName.setText(name.Meaning);
              return convertView;
          }
  
  
      }
  </code></pre>
  
  <p>This is the customclass
          NameListClass.java </p>
  
  <pre><code>    package com.studiored.muslimbabynames;
  
      import java.security.PublicKey;
  
      public class NameListClass {
          public String Name;
          public String Meaning;
  
          public NameListClass(String babyname, String babynamemeaning){
              Name = babyname;
              Meaning = babynamemeaning;
  
          }
      }
  
  
  xml file of Boy name activity
      BoyName.xml
  
      &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
          xmlns:app="http://schemas.android.com/apk/res-auto"
          xmlns:tools="http://schemas.android.com/tools"
          android:layout_width="match_parent"
          android:orientation="vertical"
          android:layout_height="match_parent"
          tools:context=".BoyName"&gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_marginTop="25dp"
              android:layout_marginBottom="10dp"
              android:gravity="center"
              android:layout_height="50dp"&gt;
              &lt;TextView
  
                  android:id="@+id/textView"
                  android:layout_marginLeft="10dp"
                  android:textSize="25sp"
                  android:layout_width="wrap_content"
                  android:textStyle="bold"
                  android:fontFamily="serif-monospace"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:gravity="center"
                  android:text="Name" /&gt;
  
              &lt;TextView
                  android:fontFamily="serif-monospace"
                  android:id="@+id/textView2"
  
                  android:textStyle="bold"
                  android:textSize="25sp"
                  android:layout_marginRight="10dp"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center"
                  android:layout_weight="1"
                  android:text="Meaning" /&gt;
  
          &lt;/LinearLayout&gt;
  
          &lt;ListView
              android:layout_width="match_parent"
              android:id="@+id/list_itemboy"
              android:layout_marginLeft="10dp"
              android:layout_marginRight="10dp"
              android:layout_height="wrap_content"/&gt;
      &lt;/LinearLayout&gt;
  
      list_view_item.xml
  
  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
      android:layout_marginTop="10dp"
      android:layout_height="wrap_content"
  
      &gt;
  
      &lt;TextView
  
          android:id="@+id/textView"
          android:layout_marginLeft="10dp"
          android:textSize="25sp"
          android:layout_width="0dp"
          android:fontFamily="serif-monospace"
          android:layout_marginBottom="20dp"
          android:layout_height="wrap_content"
          android:layout_weight="1"
          android:gravity="center"
          android:paddingRight="5dp"
          android:text="Name"
          /&gt;
  
      &lt;TextView
          android:fontFamily="serif-monospace"
          android:id="@+id/textView2"
  
          android:layout_marginBottom="20dp"
          android:textSize="20sp"
          android:layout_marginRight="10dp"
          android:layout_width="0dp"
          android:layout_height="wrap_content"
          android:gravity="center"
          android:layout_weight="2"
          android:paddingLeft="5dp"
          android:text="Meaning" /&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>