Mathieu Plourde wrote: > 1. How do you programmatically generate key strokes? I found some > tutorials where it says to use IWindowManager, but that doesn't exist > anymore in 1.5. (And WindowManager doesn't provide any function to > generate key strokes)
For your own activity, you could try manually calling onKeyDown() and onKeyUp(), though I have not tried this. To try to control other applications, you cannot generate keystrokes, AFAIK, probably for security reasons. > 2. How do you programmatically select one item from a ListView? Is it > possible to do it with the index of the list item (it's position in > the list) If by "select" you mean "have it appear with the orange selection highlight", call setSelection() on the ListView. However, this will only work if the activity is not in touch mode -- in touch mode, there is no orange selection highlight except briefly when list items are clicked. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

