Hi,

Your code seems to have the layout_width attribute, and your xml file seems
to be correct because you said removing the TimePicker makes everything else
work.
But again, your code here is incomplete so I am not sure if its an error in
your code or in the API.
You may want to paste a more complete version of your code here, or you
might just try using the TimePickerDialog, as shown in ApiDemos>view>Date
Widgets>Dialog.

Thanks,
Megha

On Tue, Apr 1, 2008 at 3:32 AM, ivan <[EMAIL PROTECTED]> wrote:

>
> It is possible show a TimePicker view in a custom dialog? I have the
> below code and crash with the next error: "You must supply a
> layout_width attribute". The code which generate the error:
> XML
> [.....]
> <TimePicker android:id="@+id/timePicker"
>                android:layout_height="wrap_content"
>                android:layout_width="wrap_content"
>                android:showSetButton="true"/>
> [....]
>
> JAVA
> Dialog d = new Dialog(this);
> d.setContentView(R.layout.time);
> d.show();
>
> If I delete the TimePicker element from the layout, the activity runs
> correctly.
> Thanks
>
> PD: TimerPickerDialog is not valid for me ;)
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to