[android-developers] How to remove left & right blank area of Gallery widget?

2009-07-15 Thread Oceanedge
I want to use android.widget.Gallery as an horizontal image scroll view. But the default behavior of Gallery widget display blank area in left & right side even if the width sum of items in it exceed its width. How can I disable this behavior, so that there is no extra blank area in Gallery? Ma

[android-developers] How to let soft keyboard cover on the activity view without pan & resize?

2009-07-03 Thread Oceanedge
Hi, I have an activity that shows an AlertDialog. The AlertDialog contains a EditText. So when the soft keyboard is shown for the EditText in the dialog. The background activity content view don't have to be resized or paned. I wonder how to implement this behavior? Because I found, the first

[android-developers] IllegalArgumentException occur: parameter must be a descendant of this view in ViewGroup.java:2454

2009-07-02 Thread Oceanedge
Hi, I am using Android SDK 1.5. I am developing an activity with multiple content views. It will call setContentView() with different viewgroup instance for different functionality. It contains a text input dialog popped up by an option menu item. I didn't specify anything for IME in mainfest.xml

[android-developers] What is the valid file name in Android & how to check it?

2009-06-01 Thread Oceanedge
Hi, I am developing an application that allow users to input a file name in Sava As dialog. I wonder what kind of characters can I allow users to input. Does Android support multi-launguage file name? What is the max length of file name string? How should I check if user's input is valid to be

[android-developers] Re: How to let Android create my activity within the process which the launcher activity lies in?

2009-05-27 Thread Oceanedge
any other activities within my application share the instance with this static field. Currently it works fine. But I don't know whether it's OK as design in Android. Please give your comments. Thanks! On May 27, 10:29 am, Dianne Hackborn wrote: > On Tue, May 26, 2009 at 7:11 PM,

[android-developers] Re: How to let Android create my activity within the process which the launcher activity lies in?

2009-05-26 Thread Oceanedge
n withAndroid, but if you > need to use two instances of your "singleton," then the problem is > that you are using a singleton in the first place. > > > > On Tue, May 26, 2009 at 12:58 AM, Oceanedge wrote: > > > Thanks, but I think singleton is a general patte

[android-developers] Re: How to let Android create my activity within the process which the launcher activity lies in?

2009-05-26 Thread Oceanedge
t; > Instead of creating two processes (which is really heavy and requires > a lot more memory), why don't you stop using a singleton? > > > > On Mon, May 25, 2009 at 9:06 PM, Oceanedge wrote: > > > I'm developing a photo editor application. It will launched

[android-developers] Re: How to let Android create my activity within the process which the launcher activity lies in?

2009-05-26 Thread Oceanedge
he singleton? > > On May 26, 5:06 am, Oceanedge wrote: > > > I'm developing a photo editor application. It will launched by > > android.intent.action.EDIT intent. I made two application to emit that > > intent. I found that two instance of my photo editor activity is > &

[android-developers] How to let Android create my activity within the process which the launcher activity lies in?

2009-05-25 Thread Oceanedge
I'm developing a photo editor application. It will launched by android.intent.action.EDIT intent. I made two application to emit that intent. I found that two instance of my photo editor activity is created within the same process which is named as my activity. But there is a singleton class used

[android-developers] How to implement JNI which calls a time consuming native method

2009-05-09 Thread Oceanedge
I need to implement a JNI which render image with 3-party native function. This function call is time consuming, it cost about 1s to return. I found during that time, even if I call the JNI within another Java thread, the whole Dalvik VM is blocked. UI is frozen. I guess that's because Dalvik doe

[android-developers] Re: dispatchTouchEvent works differently when finger hold on touch screen in G1 & emulator

2009-04-01 Thread Oceanedge
... >       ... but always call this at the end: >       return mGD.onTouchEvent(event); >    } > >    // Called by the GestureDetector mGD. >    public void onLongPress(MotionEvent event) { >       // do your stuff here. >    } > > } > > On Mar 30, 9:51 pm, Oceane

[android-developers] Re: dispatchTouchEvent works differently when finger hold on touch screen in G1 & emulator

2009-03-30 Thread Oceanedge
Thank you very much! But my current usecase is not to detect motion, but hold. I have a PhotoView which display an icon. It needs to respond to click and hold event. If user click on it, it will scroll other widget content in one step. If user touch & hold on it, it will scroll the widget content

[android-developers] dispatchTouchEvent works differently when finger hold on touch screen in G1 & emulator

2009-03-29 Thread Oceanedge
Hi, All I found event handler: dispatchTouchEvent(MotionEvent) works differently between G1 & emulator when finger is holding on touch screen. I have a class inherited from RelativeLayout and override public boolean dispatchTouchEvent(MotionEvent event) method. After I touch & hold on the touch

[android-developers] Is there a Color Picker widget in Android?

2009-03-19 Thread Oceanedge
Hi, Is there a Color Picker widget which developer can call in Android? Thanks! --~--~-~--~~~---~--~~ 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@googl