Fwd: Filter for Custom ListView

by pawan nimje » Wed, 21 Apr 2010 18:14:48 GMT


Sponsored Links
 i,

I am having a custom listview [list with image and 2 textbox] and i
want to apply filter for it.

desc of cust listview:

1:Image i.e flag of country

2:1st textbox (name of country)

3:2nd textbox (name of continent)

so when i write " i " in a textbox [different from the ones mentioned
above] i want the list to get filtered according to country name.

My code details:

1:_________________________row.xml [each row of
list]__________________________

<?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="?android:attr/listPreferredItemHeight"
android:padding="6dip">
<ImageView
android:id="@+id/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="6dip"/>
<!-- android:src="@drawable/icon" />-->
<LinearLayout
android:orientation="vertical"
android:layout_width="0dip"
android:layout_weight="1"
android:layout_height="35dip">
<TextView
android:id="@+id/toptext"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:gravity="center_vertical"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:id="@+id/bottomtext"
android:singleLine="true"
android:ellipsize="marquee"
/>
</LinearLayout>
</LinearLayout>

2:__________________main.xml_____________________

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<EditText android:id="@+id/search_box"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="type to filter"
android:inputType="text"
android:maxLines="1"/>
<ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
<TextView
android:id="@+id/android:empty"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/main_no_items"/>
</LinearLayout>

3:_______________________softwarepassionview.java___________________________
package com.softberries.lve;

import java.util.ArrayList;

//import com.TryFilter.R;

import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.LayoutInflater;
import a



Other Threads

1. Uploading and downloadingdata to a directory on a server.

Hi, I was wondering if there is a simple way to upload and download
data to and from a directory in a server. If I have load and download
from a directory at http://server.com/filedir, How should I go about
sending the data to a server and giving it a name so that I could
download the same data later? I wrote a method before with java that
saves an arraylist to and from my own pc like this

String filename = "userlist.dat";
                String directory = "dat";

                FileOutputStream fos = null;
                ObjectOutputStream out = null;

                try {
                        fos = new 
FileOutputStream(directory+File.separator+filename);
                        out = new ObjectOutputStream(fos);
                        out.writeObject(userlist); /////The arrayList 
(userlist) I wanted
to save
                        out.close();
                        fos.close();
                }
                catch(IOException ex){
                        System.out.println("saving list error");
                }

I was wondering if there is a similar method as that.
--~--~---------~--~----~------------~-------~--~----~

2. Attention moderators: Fwd: Increase Your App Downloads on Android Market

Isn't there something in the groups terms of service that says "don't spam"?

Ah.. here we are. Section 4:
Google authorizes you to view [..] the Materials solely for your personal,
non-commercial use.
You may not sell [..] or otherwise use the Materials in any way for any
public or commercial purpose.

There is also a section on "may not: post [..] disruptive commercial
messages or adverti{*filter*}ts, or anything else prohibited by the Group owner."

 http://www.***.com/ 

(I was going to post this on -dev but.. hopefully the mods will see this on
-discuss. Obviously they got my addy from -dev.)

Its nice to know android has already attracted scammers. Hopefully nobody
will fall for this crap. (FWIW at first glance I thought it was from goog
since gmail doesn't display the 'from' info by default. It certainly reads
like an 'approved' ad..)

---------- Forwarded message ----------
From: Nancy Wu <na...@mogees.com>
Date: Thu, Mar 12, 2009 at 7:25 PM
Subject: Increase Your App Downloads on Android Market


 Hi Android Developer,



A great way to distinguish your Android app from the crowd and increase your
downloads is the newly launched Mogees Reward
Network< http://www.***.com/ ;
.



You join by integrating the basic version of our SDK (not payments
enabled).  Let your users know they earn Mogees Reward Points for
downloading your app and each day they use your app.  Points can be redeemed
for gifts like Amazon Gift Certificates or a Nintendo Wii.



Why join?



        More Usage.  Increase the downloads relative to your competition.

        No Costs.  This program is completely free to you and Android users
and there is no catch.

        Open Enrollment.  We are currently in a limited time open
enrollment so no application or approval to join.

        All On Us.  Basically, we pay Android users to download your app
and use it on a daily basis.



We are providing this as the starting step to our virtual currency platform
and are looking to lay the foundation for the network.  You can find out
more about the Mogees Reward Network at
 http://www.***.com/ 



Please let me know if you have any questions!



Warm regards,



~ Nancy

________________________________

*Nancy Wu  |  Mogees*

*Product Marketing Manager*

na...@mogees.com



Mogees | www.mogees.com





CONFIDENTIALITY NOTICE: This email and any attachments are for the exclusive
and confidential use of the intended recipient.  If you are not the intended
recipient, please do not read, distribute or take action in reliance upon
this message.  If you have received this in error, please notify us
immediately by return email and promptly delete this message and its
attachments from your computer system.

--~--~---------~--~----~------------~-------~--~----~

3. How to set the video display to the horizon or vertical of display panel in video playing

4. List of countries & carriers

5. Android Keystore V2

6. did someone implement a ScrollView with horizontal scroll support?

7. Problems with support from T-mobile/General Question