DatePicker -- 2/30; 4/31 is quitely treated as a valid input

by Developer » Sat, 31 Jan 2009 13:15:29 GMT


Sponsored Links
 Why can't Datepicker dialog automatically figure out that there are no
30 and 31 in Feb? Should not this be considered as a bug in DatePicker
class?

The DatePicker dialog's 'set' button can be pushed without telling
user 'this is an invalid date' -- instead, it quietly convert 4/31 to
5/1; 2/30 to 3/2 after you push the button. I think an idea behavior
should be as following:
-- when you currently have "1 31 2009" and push the 'up' button on
'1' (month), you should get "2 28 2009" shown on the three elements

I thought to build a customized subclass, but a lot of the fields are
private and not accessible from subclass, anyone thought of the same
problem?
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. onDestroy() caused "application stopped unexpectedly"

I'm writing a GPS app and I found that the GPS is still turned on
after existing the application using HOME button. Therefore I added a
button and did the following:

        gpsExit.setOnClickListener(new Button.OnClickListener() {
                public void onClick(View v){
                onDestroy();
                }});

but everytime when I clicked the button, it popped out "force close"
message. BTW, if i change onDestroy() to finish(), the application
works fine so other parts should have no problem. How can I end the
application lifecycle successfully?

Thanks!

2. Positioning images on top of one another

Hello all,
I'm very new to android development, and I'm coming from a php/web
development background. For my first exercise, I'm trying to draw a
gauge face and a needle, and be able to rotate that needle to whatever
direction I want (not dynamically, just by changing the angle in code
and recompiling)
I'm running into a problem that is 2-fold:

1, If I build the layout programmatically using LinearLayout, I can
rotate the needle, but I cannot manage to get the needle to sit in the
proper position on top of the gauge, in fact, I can't seem to be able
to control the position of either image at all. I looked into using
AbsoluteLayout, but that is depricated.

2. If I use the xml layout, I can position the gauge and needle
exactly where I want them, but I cannot seem to access the needle
programmatically to rotate it. I have tried setting android:@+id and
using getById, but that doesn't do anything, although it doesn't throw
an error either.

Does anyone have any tips or references or examples on how to
accomplish this seemingly easy task?

Thanks,
Keith

--

3. How can I make a vew show up really, really fast?

4. Installing Android Plugin

5. How to access an item form ListView

6. Develop a application in Android 1.6 and run in 2.01

7. Blacklist?