Nonsense. This group is very helpful. If you have a uber beginner's
question, ask it at Stack Overflow (www.stackoverflow.com), over there
Google has an official "android" tag and the general idea is beginner
questions go there and more advanced questions go here. Not to say
this ListView question is a beginner's question at all, I don't
believe it is.

Sunil, Regarding your question: are you making sure the ListView you
want a drawing cache of is the currently visible one before you call
getDrawingCache().. Cycle through each of your ListView's displaying
them for a quick second to get its drawing cache.. I have no idea if
this will work, I've never done anything of this sort. You may also be
having issues because your View elements aren't actually drawn until
after your Activity code completes... I ran into a similar problem
trying to calculate the width and height of a View I had just
displayed on screen programatically. The solution is to run a separate
thread to get this info--you add your thread to the Handler's message
list and it will be run after the current thread (your UI thread) is
completed.

Here's a simple example of how to start your thread and add it to the
list:

Runnable myRunnable = new TheNameOfYourRunnableThread();
new Handler().post(myRunnable);

Then to declare your TheNameOfYourRunnableThread() Runnable:

class TheNameOfYourRunnableThread implements Runnable {
        // This method is called when the thread runs
        public void run() {
                // Code to getDrawingCache()
        }
}


Hope this helps. As TreKing points out, I'm sorry but I don't have the
time to review your code.

-Nick



On Apr 6, 5:44 pm, DonFrench <dcfre...@gmail.com> wrote:
> And the truth is that even then the odds are that no one will answer
> you.  I recently posted a very simple and clear one-sentence question
> that I know a high percentage of the people on this list knew the
> answer to.  Maybe it was too easy, I don't know.  I did eventually
> find the answer myself (I had been looking in the wrong classes
> earlier) but I was disappointed that not a single person bothered to
> post an answer to my question.  Trying to figure out how to get an
> answer from this group is a puzzle in itself.  But TreKing is right
> that you were definitely not on the right track with your approach.
>
> On Apr 6, 10:59 am, "~ TreKing" <treking...@gmail.com> wrote:
>
>
>
> > On Mon, Apr 5, 2010 at 11:52 PM, javame_android
> > <su...@softwebsolutions.com>wrote:
>
> > > Is there anyone who can let me know whats the issue with the code above?
>
> > Sorry, but realistically, no one is going to take time out of their life and
> > their own project to dig through your code that has no context, make sense
> > of it, debug it, and tell you what's wrong it. Why should they?
>
> > If you post back with a SPECIFIC problem (not "what's wrong with this giant
> > blob of code") you will probably find people more willing to help.
>
> > Good luck.
>
> > --------------------------------------------------------------------------- 
> > ----------------------
> > TreKing - Chicago transit tracking app for Android-powered 
> > deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to