Using 2 Surface Views in same activity

by iblues » Wed, 15 Apr 2009 18:52:21 GMT


Sponsored Links
 Hi,

I am creating an application where I have 2 Surface Views (1 each in
top and bottom half of the screen) along with a button. One of the
Surface will be displaying a camera preview.

The purpose of the action is to swap the preview between each frame.

The problem I am facing is only one SurfaceView's surfaceCreated()
callback is being called. So when I try to set the other SurfaceView
for the camera preview, I get error as it is still not yet created.

My question is when will a surface be actually created? And how can I
accomplish this UI without using Intents?

Regards,
iblues
--~--~---------~--~----~------------~-------~--~----~



Using 2 Surface Views in same activity

by Dave Sparks » Thu, 16 Apr 2009 04:45:36 GMT


 I'm pretty sure that this will not work. There is a limit of one video/
camera SurfaceView active at a time.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Using 2 Surface Views in same activity

by Girish » Fri, 17 Apr 2009 15:29:06 GMT


 Hi Dave and others,

Any other alternative for acheiving this you can suggest ?

Regards





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Alert on menu select

Hi all,

I'm trying to display pop-up alert when user clicks on menu option that has
not been implemented yet (this is "try it" app so please do not tell me that
I should hide or disable the opt). The dialog gets built fine but on
dlg.show() I get the following exception
android.view.WindowManager$BadTokenException: Unable to add window -- token
null is not for an application

Here's calling code from Activity#onOptionsItemSelected

case R.id.report_menu_3days:
            ReportUtils.alert(getBaseContext(),
R.string.err_not_implemented);
            return super.onOptionsItemSelected(item);

And here's ReportUtils#alert method

    public static void alert(Context context, int messageId) {
        Builder bldr = new
AlertDialog.Builder(context).setTitle(messageId).setCancelable(true);
        OnClickListener listnr = new OnClickListener() {
            public void onClick(DialogInterface dialog, int which) {
                dialog.dismiss();
            }
        };
        bldr.setPositiveButton("OK", listnr);
        bldr.show();
    }

I suspect that I'm getting this since by the time bldr#show() is called I'm
still within a menu UI but how do I do it otherwise?

Bob

--~--~---------~--~----~------------~-------~--~----~

2. kSOAP2 with SDK1.0

I'm having a helluva time trying to get ksoap2 working with Android.

All the samples I see (including the modified .jar with
AndroidHttpTransport in it) fail because of the relocation of
org/apache/commons/httpclient/SimplehttpconnectionManager.

Can someone provide me with a tutorial, sample, anything that will show
me how to at least get the library working correctly?

It seems like a major oversight for Google to not include some way of
parsing WS correctly!

--~--~---------~--~----~------------~-------~--~----~

3. Debugging applications with Google MAP api on an actual device

4. AW: Cannot delete rows from sqlite database

5. regarding Googlenav and xmpp packages

6. How to get ICCID ?

7. problem when using gcc-4.3.2