I want to display a ListView
with item results from a SearchView
request like this:
I don't want to use ActionbarSherlock and I can not find any tutorial.
Use Custom Suggestions in the menu xml for the ActionBar
<?xml version="1.0" encoding="utf-8"?>
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/app_label"
android:hint="@string/search_hint"
android:searchSuggestAuthority="com.example.MyCustomSuggestionProvider">
</searchable>
or create the autocompletetextview in the layout and add the Layout Inflator and set the setCustom
ActionBar actionBar = getActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
actionBar.setDisplayShowCustomEnabled(true);
LayoutInflater inflator = (LayoutInflater) this
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View v = inflator.inflate(R.layout.yourlayout, null);
actionBar.setCustomView(v);