Customizing the Android contact list?

by Mike » Wed, 25 Jun 2008 15:51:54 GMT


Sponsored Links
 Hi!

I'm a beginner on the Android platform, but I don't think this is a
really beginner-type question, so here goes...

I'm wondering if it's possible to modify the appearance of the
standard Android contact list (preferably programmatically). I'm
looking at interesting little projects to help me get some experience
on the platform, one suggestion was a simple app that allows you to
set a country for your contacts, and adds a flag for that country to
the contact list. Then, using GPS, it identifies the country you're in
as you travel, and highlights the flags for contacts in the same
country, telling you who you can easily get in touch with. A silly
little app really, but perhaps marginally useful to frequent
travelers?

So, questions - is it possible to add a flag component to Android's
contact list? If so, can it be animated by my flag app? If not, is
there any way around it, other than implementing an entire alternative
contact list within my app?

Here's a screenshot of the idea:  http://host.fenz.net/acl.png 

Comments + thoughts welcome (apart from 'this is a dumb idea' - I
already know that!)

Thanks - Mike.

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



Other Threads

1. HttpPost abort not returning immediately when called from separate thread

I've still been trying to find a solution to this, but I'm still
stuck. I've tried the following:

1. using SingleClientConnManager.
2. calling Thread.interrupt() before the HttpPost.abort() call.
3. setting HttpPost instance variable to null.
4. Shutting down the connection manager for both
SingleClientConnManager and ThreadSafeClientConnManager.

After calling abort, the httpClient execute() call seems to take an
random length of time to return and sometimes goes up to the socket
timeout.

I've looked at the following post, but it did not work for me.
http://devtcg.blogspot.com/2008/07/interruptible-io-example-using.html

The difference is I am doing a post to a server that does not return a
response immediately, but holds for a period. I want to call abort
during that period to close the connection immediately.

I saw the following comment in the above blog's sample code:

/* CAVEAT: HttpClient 3.x encapsulates the platform's connect()
                         * call in such a way that prevents interruption.  This 
has been
                         * corrected in HttpClient 4 alpha 4, however Android 
distributes
                         * an older version which does not work as expected.  
My sources at
                         * Google have clarified that the final 1.0 release 
will include
                         * the newest version so this should hopefully be a 
non-issue for
                         * production.
                         *
                         * For a discussion of this problem see the following 
thread
                         * concerning HttpClient 3.x:
                         *
                         * 
http://mail-archives.apache.org/mod_mbox/hc-httpclient-users/200506.mbox/%3c20050615164118.ga4...@uml24.umlhosting.ch%3e
                         */

So is this a bug that should be reported to the Android team? Or is
there something else I can do?

Thanks!




-- 

2. startActivityForResult and setResult problems



I would not use onPause() for your setResult()/finish() call. First, I
think that is too late for the setResult() logic. Second, onPause() will
also be invoked at other times (e.g., when the user takes a phone call).

If you want to set the result when the use presses the BACK button, then
set the result when the user presses the BACK button, by implementing
onBackPressed() in newer versions of Android or onKeyDown() in older
versions of Android.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Consulting: http://commonsware.com/consulting

-- 

3. Targetted updates

4. screenOrientation question

5. CALL_PHONE permission

6. StartActivity(ForResult) at the creation of Main activity

7. (WTA) Bluetooth Spica 1.5 status Paired but not connect