Changed the onclicklistener for the search button to be set in java code instead of xml in layout.