Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8070621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:26:40+00:00 2026-06-05T13:26:40+00:00

I build a coustom listview, wich filled with data from SQLite. Now I want

  • 0

I build a coustom listview, wich filled with data from SQLite.
Now I want for my listview a search box like this: https://lh5.googleusercontent.com/-0H2RUBsLIYQ/Th1lqLCn5iI/AAAAAAAAALg/QZe8a5-PYu0/custom_listview_search2.png>

This is my activity:

package de.bodprod.rettinfo;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleAdapter;

public class AntidotList extends Activity{
    ArrayList<HashMap<String, String>> antidotList;

    String[] sqliteIds;

    public static String TAG_ID = "id";
    public static String TAG_TOX = "tox";
    public static String TAG_ANTIDOT = "antidot";

    ListView lv;
    int textlength=0;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.antidotlist_layout);

        antidotList = new ArrayList<HashMap<String, String>>();
        lv = (ListView) findViewById(R.id.antidotlistlayout);

        lv.setOnItemClickListener(new OnItemClickListener() {
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {

            }
        });        
        new loadStoreAntidots().execute();
    }

    class loadStoreAntidots extends AsyncTask<String, String, String> {
        @Override
        protected String doInBackground(String... args) {
            // updating UI from Background Thread
            runOnUiThread(new Runnable() {
                public void run() {
                    DatabaseHandler db = new DatabaseHandler(getApplicationContext());
                    List<AntidotsClass> antidots = db.getAllAntidots();
                    sqliteIds = new String[antidots.size()];

                    for (int i = 0; i < antidots.size(); i++) {

                        AntidotsClass s = antidots.get(i);

                        // creating new HashMap
                        HashMap<String, String> map = new HashMap<String, String>();

                        // adding each child node to HashMap key => value
                        map.put(TAG_ID, s.getId().toString());
                        map.put(TAG_TOX, s.getTox());
                        map.put(TAG_ANTIDOT, s.getAntidot());

                        // adding HashList to ArrayList
                        antidotList.add(map);

                        // add sqlite id to array
                        // used when deleting a website from sqlite
                        sqliteIds[i] = s.getId().toString();
                    }
                    ListAdapter adapter = new SimpleAdapter(
                        AntidotList.this,
                        antidotList, R.layout.antidotlistitem_layout,
                        new String[] { TAG_ID, TAG_TOX, TAG_ANTIDOT },
                        new int[] { R.id.sqlite_id, R.id.tox_layout, R.id.antidot_layout }
                    );
                    lv.setAdapter(adapter);
                }
            });
            return null;
        }
    }
}

This is my layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    style="@style/mainView" 
    android:orientation="vertical" >
    <EditText android:id="@+id/EditText01"
        android:layout_height="wrap_content"
        android:layout_width="fill_parent"
        android:hint="Suchen">                               
    </EditText>    
    <ListView
        android:id="@+id/antidotlistlayout"
        style="@style/mainView" 
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" >
    </ListView>           
</LinearLayout>  

I don’t know how to build in the search funktion.

Hope you can help me

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T13:26:42+00:00Added an answer on June 5, 2026 at 1:26 pm

    go through the following links

    Link1

    Link2

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this route that let me build custom url for users like /thisismyname,
I build custom gallery for photos only. I taking photos from sdcard with this
I want to build custom controls in ASP.NET MVC 3. I want to create
I would like to build custom tab menu on top of the screen, similar
When you are monitoring the TFS build from Visual Studio (2008 or 2005), you
I'm trying to build Custom Membership Provider. I would like to capture additional information
We'd like to build a custom type - or simply add custom columns to
I have a ListView which is populated from a string-array resource. I'm trying to
I am learning programming abstract data types. Trying to build custom hash table based
i want to build a custom event with jQuery that is not set to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.