android-developers
[Arriba] [Todas las Listas]

[android-developers] Re: SurfaceHolder.Callback.surfaceCreated No siendo

To: Android Developers <android-developers@xxxxxxxxxxxxxxxx>
Subject: [android-developers] Re: SurfaceHolder.Callback.surfaceCreated No siendo provocado cuándo la superficie es re-creado
From: Thomas Fjellstrom <tfjellstrom@xxxxxxxxx>
Date: Wed, 30 Nov 2011 19:04:12 -0800 (PST)
Delivery-date: Wed, 30 Nov 2011 22:04:35 -0500
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:date:in-reply-to:references :user-agent:x-http-useragent:message-id:subject:from:to :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-google-group-id:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe :content-type:content-transfer-encoding; bh=r9tMhtsRLem8zYq89kpy0LO5hHH41mip/Ur9iLqhAis=; b=f5sEzFASKenQny16KMuutcQYyYkhzV5zWXAFtxVSO3DQsdwwB1va0G28jzSOcOWjWZ EuVMzoV6I6qmox9igaYoI9uczl5RxqaanUs+lOf7Uz/K8bK6ZhCEyPNiqxfQOw+VR+6v roRxp1vQlE52LAdylCy5a8qXttM4f1jfs3qSw=
Envelope-to: traductor@xxxxxxxxxxx
In-reply-to: <eebfcf5e-a112-4d1e-9111-21e09bdb1c4f@w3g2000vbw.googlegroups.com>
List-archive: <http://groups.google.com/group/android-developers?hl=en_US>
List-help: <http://groups.google.com/support/?hl=en_US>, <mailto:android-developers+help@googlegroups.com>
List-id: <android-developers.googlegroups.com>
List-post: <http://groups.google.com/group/android-developers/post?hl=en_US>, <mailto:android-developers@googlegroups.com>
List-subscribe: <http://groups.google.com/group/android-developers/subscribe?hl=en_US>, <mailto:android-developers+subscribe@googlegroups.com>
List-unsubscribe: <http://groups.google.com/group/android-developers/subscribe?hl=en_US>, <mailto:android-developers+unsubscribe@googlegroups.com>
Mailing-list: list android-developers@xxxxxxxxxxxxxxxx; contact android-developers+owners@xxxxxxxxxxxxxxxx
References: <986269.1167.1322430563293.JavaMail.geo-discussion-forums@vbbeq1> <eebfcf5e-a112-4d1e-9111-21e09bdb1c4f@w3g2000vbw.googlegroups.com>
Reply-to: android-developers@xxxxxxxxxxxxxxxx
Sender: android-developers@xxxxxxxxxxxxxxxx
User-agent: G2/1.0
En *Nov 29, 1:29 soy, *tobias <ecker...@xxxxxx> escribió:
> Tenido exactamente el mismo problema. Cuando parece, el asunto no es que
> el *callback no es disparado, pero que cuándo *Android crea un nuevo
> *SurfaceView, también crea un titular nuevo. Control si esto te ayuda:*http://grupos.*google.*com/Grupo/*android-*developers/*browse_hilo/*threa...

*Thanks Para la respuesta. Aquí qué actualmente hago cuando creando el nuevo
*SurfaceView:

la superficie = nueva *MySurface(*getApplicationContext());
*SurfaceHolder superficie = de titular.*getHolder();
Titular.*addCallback(Superficie);
titular.*setType(*SurfaceHolder.GPU_de TIPO_de la SUPERFICIE);
*setContentView(superficie);

Así que no parece estoy manteniendo el titular alrededor, al menos tiene que no a no ser que *somehow *Android está señalando al incorrecto un cuando
creando un nuevo *SurfaceView.

-- 
Recibiste este mensaje porque eres *subscribed al *Google
Grupos "*Android *Developers" grupo.
A correo a este grupo, envía *email a *android-developers@xxxxxxxxxxxxxxxx
A *unsubscribe de este grupo, envía *email a *android-*developers+unsubscribe@xxxxxxxxxxxxxxxx

Puesto que más opciones, visita este grupo en
*http://grupos.*google.*com/Grupo/*android-*developers?*hl=*en

On Nov 29, 1:29 am, tobias <ecker...@xxxxxx> wrote:
> Had exactly the same problem. As it looks like, the issue is not that
> the callback isn't fired, but that when Android creates a new
> SurfaceView, it also creates a new holder. Check if this helps you:http://groups.google.com/group/android-developers/browse_thread/threa...

Thanks for the reply. Here's what I currently do when creating the new
SurfaceView:

surface = new MySurface(getApplicationContext());
SurfaceHolder holder = surface.getHolder();
holder.addCallback(surface);
holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
setContentView(surface);

So it doesn't look like I'm keeping the holder around, at least it
shouldn't unless somehow Android is pointing to the wrong one when
creating a new SurfaceView.

-- 
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@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
android-developers+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

<Anterior por Tema] Tema Actual [Siguiente por Tema>