android-developers
[Arriba] [Todas las Listas]

Re: [android-developers] Ayuda con FindViewById

To: android-developers@xxxxxxxxxxxxxxxx
Subject: Re: [android-developers] Ayuda con FindViewById
From: Mark Phillips <mark@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 31 Oct 2011 10:30:09 -0700
Delivery-date: Mon, 31 Oct 2011 13:30:43 -0400
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:in-reply-to:references:date :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; bh=Kgzocw2NZOTMc1GZk1JE4PYrIQSlHuCb3tb9MRjfBqc=; b=Riy0QxreyjwocZP9vbC8xvix2PJgM2g8uDePU1zev9HowvUYjVgYtje/dcTZ3eFxST amrln2D+A81CpLizvOQaXCi/D/owRifcmESBJcnw3cRFfOxoNhB+gRGmaEznPe0j0N1t 8Ty21VLYh/0N/xVNgvvCD8l9eY1qk48dNvi0w=
Envelope-to: traductor@xxxxxxxxxxx
In-reply-to: <CALLdnhOf=N1S-2zQtA_EESgzAW3iyLymsHJTAUizBXx203cwyw@mail.gmail.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: <CAEqej2N1uasnSMv061YHh+vCu6C8uM7ANxiXq-chq6pTv6V_iA@mail.gmail.com> <CALLdnhOAs9US_NPPM4LH2-v9U-c17AuomTbrYd8m5jj-f_BtEA@mail.gmail.com> <CAEqej2PWvV4D2aeWnxonxjrydKHGwBiYDWOEMQkD0OXjq-pc6g@mail.gmail.com> <CALLdnhOf=N1S-2zQtA_EESgzAW3iyLymsHJTAUizBXx203cwyw@mail.gmail.com>
Reply-to: android-developers@xxxxxxxxxxxxxxxx
Sender: android-developers@xxxxxxxxxxxxxxxx
Mi *apologies para no siendo claro. Yo un muy nuevo a *android desarrollo -
esto es mi segunda semana de *experimenting/lectura.

Supongo hay un "patrón" para acceder una vista_1 de vista_2, donde
vista_1 no es un niño de vista_2. Quizás soy mal.

Pensaba que en el constructor de vista_2, hay este objeto
de Contexto. Miraba en el *api y no veo cualquier cosa obvio, pero es allí
una manera #por aquel objeto para conseguir un mango en la actividad así que puedo llamar
actividad.*findViewById() En vista_2 para conseguir en vista_1?

O, es el patrón para crear un *getter en la actividad, el cual llama
*findViewById() para vista_1, y entonces *somehow vista_2 llamadas que *getter.
Otra vez, no seguro cómo para conseguir un mango a la actividad en vista_2.

*Thanks,

Marca

En *Mon, *Oct 31, 2011 en 9:28 AM, Mark *Murphy <mmurphy@xxxxxxxxxxxxxxx>escribió:

> En *Mon, *Oct 31, 2011 en 11:55 AM, Mark *Phillips
> <mark@xxxxxxxxxxxxxxxxxxxxx> escribió:
> > Cómo  lo consigo de mi actividad?
>
> Llamada *findViewById() en la actividad.
>
> --
> Mark *Murphy (un *Commons Guy)
> *http://*commonsware.*com | *http://*github.*com/*commonsguy
> *http://*commonsware.*com/*blog | *http://*twitter.*com/*commonsguy
>
> _*Android Programación *Tutorials_ Versión 4.0 Disponible!
>
> --
> 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
>

-- 
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
My apologies for not being clear. I an very new to android development -
this is my second week of experimenting/reading.

I assume there is a "pattern" for accessing a view_1 from view_2, where
view_1 is not a child of view_2. Perhaps I am wrong.

I was thinking that in the constructor of view_2, there is this Context
object. I looked at the api and I don't see anything obvious, but is there
a way through that object to get a handle on the activity so I can call
activity.findViewById() in view_2 to get at view_1?

Or, is the pattern to create a getter in the activity, which calls
findViewById() for view_1, and then somehow view_2 calls that getter.
Again, not sure how to get a handle to the activity in view_2.

Thanks,

Mark

On Mon, Oct 31, 2011 at 9:28 AM, Mark Murphy <mmurphy@xxxxxxxxxxxxxxx>wrote:

> On Mon, Oct 31, 2011 at 11:55 AM, Mark Phillips
> <mark@xxxxxxxxxxxxxxxxxxxxx> wrote:
> > How do I get it from my activity?
>
> Call findViewById() on the activity.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 4.0 Available!
>
> --
> 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
>

-- 
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>