android-developers
[Arriba] [Todas las Listas]

Re: [android-developers] ProgressBar.setMax() Excepción en Diálogo; no

To: android-developers@xxxxxxxxxxxxxxxx
Subject: Re: [android-developers] ProgressBar.setMax() Excepción en Diálogo; no entiende por qué está pasando
From: Anuj Goyal <anuj.goyal@xxxxxxxxx>
Date: Mon, 31 Oct 2011 11:51:04 -0700
Delivery-date: Mon, 31 Oct 2011 14:51:28 -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 :content-transfer-encoding; bh=uJu0xDnaOqs00b1k7e+gPjsfhyhbr7MAV4B5FrckbWo=; b=6V2W9acZJjP+3Hbjvuw6/6z8rR9KR83CzRPs3VbpK3txRVV6JLoGPMXVZ7SwI3Twbr G2nNUtAE8xK/KInT6RLwaNqL1vJ0nQwv2DHIcS+J/mcsTU5gWCaK6McwRzJR++0ESyIO aWrWpc9B3aPGMpM/SCCMOphmRUdwGfdibtAD8=
Envelope-to: traductor@xxxxxxxxxxx
In-reply-to: <CAG63nmnHOXxzqCUq3iYMMF0gQwsDvWsBD0sf4-NPii3Cx6Wmhw@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: <15123388.494.1319781911474.JavaMail.geo-discussion-forums@prib32> <CAG63nmnHOXxzqCUq3iYMMF0gQwsDvWsBD0sf4-NPii3Cx6Wmhw@mail.gmail.com>
Reply-to: android-developers@xxxxxxxxxxxxxxxx
Sender: android-developers@xxxxxxxxxxxxxxxx
Todd,
*pb no es *nil. Cuándo lo corro #por el depurador él *setMax() causa
el *unknown excepción.
Cuándo consigo tiempo intentaré venir arriba de con un pequeño fácilmente *reproducible
caso de prueba que yo *zip arriba y correo en el *newsgroup.
-*Anuj

En *Thu, *Oct 27, 2011 en 11:15 PM, Todd *Grigsby <*tgrigsby777@*xxxxxxxxx> escribió:
> Es *pb *nil?  Si tan, podrías querer hacer seguro un control con aquel ID existe
> encima que *layout...
>
> En *Oct 27, 2011 11:05 PM, "*Anuj *Goyal" <anuj.goyal@xxxxxxxxx> escribió:
>>
>> estoy intentando para utilizar un *ProgressBar en un Diálogo pero cuándo intento utilizar
>> *setMax() mi *app accidentes con un *unhandled Excepción. Cuando depurando la Excepción
>> no tiene ninguna información en él.
>> *WinXP, *Android 2.2, nivel de API 8
>>
>> *mQuestionDialog = Diálogo nuevo(este);
>> *mQuestionDialog.*setContentView(*R.*layout.*wronganswer);
>> *mQuestionDialog.*setCancelable(Falso);
>>
>> //trabajos
>> *tv = (*TextView)*mQuestionDialog.*findViewById(*R.*id.Porcentajeincorrecto);
>> *tv.*setText("25%");
>> *ProgressBar *pb = (*ProgressBar) *findViewById(*R.*id.*progressbar_Incorrecto);
>> *setProgressBarVisibility(cierto);
>>
>> //no trabaja
>> *TextView *tv = (*TextView)*mQuestionDialog.*findViewById(*R.*id.Porcentajeincorrecto);
>> *tv.*setText("25%");
>> *ProgressBar *pb = (*ProgressBar) *findViewById(*R.*id.*progressbar_Incorrecto);
>> *pb.*setMax(100);  // Excepción de causas
>> *pb.*setProgress(25);
>> *setProgressBarVisibility(cierto);
>>
>> --
>> 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

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

Todd,
pb is not nil. When I run it through the debugger it setMax() causes
the unknown exception.
When I get time I will try to come up with a small easily reproducible
test case that I zip up and post on the newsgroup.
-Anuj

On Thu, Oct 27, 2011 at 11:15 PM, Todd Grigsby <tgrigsby777@xxxxxxxxx> wrote:
> Is pb nil?  If so, you might want to make sure a control with that ID exists
> on that layout...
>
> On Oct 27, 2011 11:05 PM, "Anuj Goyal" <anuj.goyal@xxxxxxxxx> wrote:
>>
>> I am attempting to use a ProgressBar in a Dialog but when I try to use
>> setMax() my app crashes with an unhandled Exception. When debugging the
>> Exception has no information in it.
>> WinXP, Android 2.2, API level 8
>>
>> mQuestionDialog = new Dialog(this);
>> mQuestionDialog.setContentView(R.layout.wronganswer);
>> mQuestionDialog.setCancelable(false);
>>
>> //works
>> tv = (TextView)mQuestionDialog.findViewById(R.id.wrong_percent);
>> tv.setText("25%");
>> ProgressBar pb = (ProgressBar) findViewById(R.id.progressbar_wrong);
>> setProgressBarVisibility(true);
>>
>> //doesn't work
>> TextView tv = (TextView)mQuestionDialog.findViewById(R.id.wrong_percent);
>> tv.setText("25%");
>> ProgressBar pb = (ProgressBar) findViewById(R.id.progressbar_wrong);
>> pb.setMax(100);  // causes Exception
>> pb.setProgress(25);
>> setProgressBarVisibility(true);
>>
>> --
>> 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

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