Dear All,
I want to get the current focus view in my Service.
And to check if the view is a EditText and append some texts in it
(for all EditTexts, not only in my application).

I found some methods to do this, like Activity.getCurrentFocus() and
Windows.getCurrentFocus().
But these methods are used in a Activity.

If I want to use these, I have to get the current focus activity.
I tried to use WindowManager to get current task.
It only got the current Activity's class name in this way. not
Activity Object.
                List<RunningAppProcessInfo> rList =
activityManager.getRunningAppProcesses();
                RunningTaskInfo rt = rtList.get(0);
                rt.topActivity.getClassName(); // the class name of the current
Activity

How can I use these methods to get the current focus View in a
Service? Or is there another way to
do?

Thanks!

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

Reply via email to