[android-developers] Is there a way to backup and restore a Cursor?

2009-07-21 Thread Johnny Lee
Hello all, I'm always get stuck when I want to do some testing with my Classes which are working against the default providers. For example, one method of my class meant to get all audio from MediaStore.Audio.Media.EXTERNAL_CONTENT_URI. That's ok for implementation, but when I want to test i

[android-developers] TouchUtils.tapView doesn't work.

2009-05-26 Thread Johnny Lee
Hi, When I'm using the TouchUtils.tapView in my instrumentation tests, it doesn't work. Here is the code snip: """ final TextView popupText = new TextView(mActivity); popupText.setText("Popup Text"); popupText.setBackgroundColor(0xffff); popupText.setFocusableI

[android-developers] Re: Can't intercept the OnTouch event of PopupWindow

2009-05-26 Thread Johnny Lee
""" public void setTouchInterceptor (View.OnTouchListener l) Set a callback for all touch events being dispatched to the popup window. """ Regards, Johnny On Tue, May 26, 2009 at 3:21 PM, Johnny Lee wrote: > Hi all, > > I want to intercept the OnTouch event in

[android-developers] Can't intercept the OnTouch event of PopupWindow

2009-05-26 Thread Johnny Lee
Hi all, I want to intercept the OnTouch event in a PopupWindow, but it failes everytime. Here is the code snip: public class Demo extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

[android-developers] How to get the resource ID from android.content.res.Resources.Theme

2009-05-19 Thread Johnny Lee
Hi, I'm wondering whether there is a way to get the resource ID of an Theme object? I tried the following: mContextWrapper.setTheme(com.android.internal.R.style.Theme); Theme theme = mContextWrapper.getTheme(); Log.d("ContextWrapperTest", "Resource ID: " + com.android.int