what type is the "this" in your question? If it's a View, then you can
simpy use this.. A View is a Context.

On Dec 17 2008, 3:40 am, "Dec." <030440...@163.com> wrote:
>   hi,guys~!
>   i've been playing around on g-phone test for a few days,But i'm
> really confused on how to get current screenshot,One way is to use
> getrootview()->getdrawingcache() method,providing that a View on the
> screen is already known ;But the statusbar is lost,What's more,if i
> launch an activity from an instrumentation class,i just couldn't get
> any View presently shown on the screen,so i tryed to make it the
> following way,but it also makes no sense:
> first new a View based on the target context:
>       View v=new View(this.getTargetContext());
> Then i tryed the focussearch() method and several others provided in
> the SDK,but i got nothing but the nonepointer exception,真TM郁闷。。
>
> So, Any idears ??
> Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to