SearchView for String list in Sketchware

To implement a SearchView for a simple ListView showing a String list in Sketchware, follow the steps given below.

1. Create a new project in Sketchware.

2. In VIEW area add a ListView listview1.

3. Switch On AppCompat and Design.

4. Create a String List list.

5. Create a more block extra.

6. In the more block extra, use an add source directly block and put codes to declare a SearchView searchview and an ArrayAdapter adapter. After that add the SearchView as an OptionsMenu item.
} searchview;
ArrayAdapter<String> adapter;
public boolean onCreateOptionsMenu( Menu menu) {
return true;

7. In onCreate event, add items to the String List list.
8. After adding items to the list use add source directly blocks and put following codes:
i. Define the ArrayAdapter and set it as adapter of ListView.
adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, list);

ii. Define SearchView and add it to Toolbar.
searchview = new;

iii. Set OnQueryTextListener for the SearchView.
public boolean onQueryTextSubmit(String query) {
return false;
public boolean onQueryTextChange(String newText) {
String text = newText;
return false;

9. Save and run the project. You will see the search icon on the Toolbar. You can click on it and search the ListView.


  1. Sir tell us how to make a medic alert app
    Or study alert app

  2. A person speak Within the much more prevent additional, make use of a good include supply straight prevent as well as place rules in order to announce the Search View search view as well as a good Array Adapter adapter. Next include the actual Search View being an Options Menu product. You may check it at

  3. Sir, PLEASE HELPP..
    how to search in LISTVIEW that uses CUSTOMVIEW and the data comes from FIREBASE?

  4. Plz say how to make a game in sketchware except word game

  5. Nice search view but how can I add a search view for a music player app ..I tried all but to no avail instead it showed search view adapted for string

  6. How to create AutoCompleteTextView in sketchware

  7. Error occur when I tried thesecodes

  8. How can I add it to linear1 instead of action bar!

  9. This comment has been removed by the author.

  10. How can this be done in AndroidX, since the Android libraries are no longer available.

  11. Hi please help me on how to get spesific data from firebase please make a tutorialwill


Post a Comment

Popular posts from this blog

Simple car racing android game in Sketchware

Enable Fullscreen for Youtube videos in WebView

Creating a Drawing View in Sketchware

How to enable upload from webview in Sketchware?

List of Calendar Format symbols valid in Sketchware