how to add search functionality in this code
<p>I need to add search functionality in this code by customer id,customer name,customer address,customer mobile no and customer email id,and after search the customer name is set in the edit text,plz help me to solve this problem.</p>

<pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".CustomerNameActivity" &gt;

&lt;TextView
    android:id="@+id/textView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="10dp"
    android:text="Enter Customer Name" /&gt;

&lt;EditText
    android:id="@+id/search"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/textView1"
    android:layout_marginTop="0dp"
    android:ems="10" /&gt;

&lt;ListView
    android:id="@android:id/list"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_below="@+id/button1"
    android:layout_marginTop="14dp" &gt;
&lt;/ListView&gt;

&lt;Button
    android:id="@+id/button1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignBaseline="@+id/search"
    android:layout_alignBottom="@+id/search"
    android:layout_alignParentRight="true"
    android:text="Button" /&gt;


&lt;/RelativeLayout&gt;





javacode
public class CustomerNameActivity extends ListActivity {
Button placeorder;
EditText searchcustomer;
private static String url = "url";
private static final String TAG_CUSTOMER = "Customer";
private static final String TAG_CUSTOMER_CODE = "CustomerCode";
private static final String TAG_CUSTOMER_NAME = "CustomerName";
private static final String TAG_CUSTOMER_ADDRESS = "CustomerAddress";
private static final String TAG_CUSTOMER_MOBILE = "CustomerMobile";
private static final String TAG_CUSTOMER_EMAIL = "CustomerEmailId";
JSONArray Customer = null;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_customer_name);
    placeorder =(Button)findViewById(R.id.button1);
    searchcustomer=(EditText)findViewById(R.id.search);
    searchcustomer.addTextChangedListener(new TextWatcher() {

        @Override
        public void onTextChanged(CharSequence s, int start, int before,   int count) {


        }

        @Override
        public void beforeTextChanged(CharSequence s, int start, int count,
                int after) {
            // TODO Auto-generated method stub

        }

        @Override
        public void afterTextChanged(Editable s) {
            // TODO Auto-generated method stub

        }
    });
    placeorder.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            searchcustomer = (EditText)findViewById(R.id.search);
            String customername=searchcustomer.getText().toString();
            Intent i=new   Intent(getApplicationContext(),PlaceYourOrderActivity.class);
            i.putExtra("name", customername);
            startActivity(i);

        }
    });

    ArrayList&lt;HashMap&lt;String, String&gt;&gt; CustomerList = new   `enter code here`ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
    JSONParser jParser = new JSONParser();
    JSONObject json = jParser.getJSONFromUrl(url);
    try {
        Customer = json.getJSONArray(TAG_CUSTOMER);
        for(int i = 0; i &lt; Customer.length(); i++){
            JSONObject c = Customer.getJSONObject(i);

            String code = c.getString(TAG_CUSTOMER_CODE);
            String name = c.getString(TAG_CUSTOMER_NAME);
            String address = c.getString(TAG_CUSTOMER_ADDRESS);
            String mobile = c.getString(TAG_CUSTOMER_MOBILE);
            String email = c.getString(TAG_CUSTOMER_EMAIL);
            HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
            map.put(TAG_CUSTOMER_CODE, code);
            map.put(TAG_CUSTOMER_NAME, name);
            map.put(TAG_CUSTOMER_ADDRESS, address);
            map.put(TAG_CUSTOMER_MOBILE, mobile);
            map.put(TAG_CUSTOMER_EMAIL, email);
            CustomerList.add(map);
        }

    } catch (JSONException e) {
        e.printStackTrace();
    }
    ListAdapter adapter = new SimpleAdapter(this, CustomerList,
            R.layout.list_item,
            new String[] { TAG_CUSTOMER_CODE, TAG_CUSTOMER_NAME, TAG_CUSTOMER_ADDRESS,TAG_CUSTOMER_MOBILE,TAG_CUSTOMER_EMAIL }, new int[] {
                    R.id.code, R.id.name, R.id.address,R.id.mobile,R.id.email });

    setListAdapter(adapter);
}




@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.activity_customer_name, menu);
    return true;
}

}



list_item.xml

?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"&gt;  
&lt;LinearLayout
    xmlns:android="http://schemas.android.``com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"&gt;
    &lt;!-- code Label --&gt;
    &lt;TextView
        android:id="@+id/code"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingTop="6dip"
        android:paddingBottom="2dip" /&gt;
    &lt;TextView
        android:id="@+id/name"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:textColor="#acacac"
        android:paddingBottom="2dip"/&gt;
    &lt;TextView
        android:id="@+id/address"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="2dip"/&gt;
    &lt;TextView
        android:id="@+id/mobile"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="2dip"/&gt;
    &lt;TextView
        android:id="@+id/email"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="2dip"/&gt;
    &lt;/LinearLayout&gt;
    &lt;/LinearLayout&gt;
</code></pre>
