When i display a Datepicker in most api versions of android the month is displayed like this:
But in api level 10 the month is displayed like this:
So i want to know if there is a way to force the month to be displayed with only 3 letters and remove the backslash
A quick study of every method for DatePicker has revealed that there is no way to do it through code. I suspect that if the size of it is chosen correctly, the 3 letters might still appear, but I don't have the time to do a trial/error on that hypothesis.
Related
I want to display a DatePicker, that contains only a calendar, but i get this kind of bug:
Screen with error
I found some people had this kind of problem too, but have somebody found a solution for this?
It occurs on Api > 21, most of resolutions.
Found out that this can be easily reproduced after we set the Setting->Display->Display Size to Large. And then go to a month that needs to show 6 rows. The Google Calendar app have the same problem.
So it should be a bug in the DatePicker. The only easy solution is to change the datepicker to the spinner style.
I need to select more than once date from a CalenderView of android. Can any one help me to do the same.
Example!
Let's look attached image. If we consider the calender in image as CalenderView of android I need to select all date raging from 16th to 20th.
As far as I know the CalendarView only supports selecting single dates.
I would suggest calling it twice to get the start and end dates (for the end date, you could call setMinDate() beforehand to make sure it's greater than the start date).
I am sure,I think my question is something different in android.I goggled 100s of sites i saw the date picker in android, all are same type, no one give the different date picker.
My Task is to design custom date picker. Please find this below screen shot.
https://docs.google.com/file/d/0B_c-SDSO63obZzVreHpmdnZBYzg/edit?usp=sharing
For that I goggled, I didn't find any solution. I think, For android solutions this is the best site.
coming to my date picker it is totally dialog box. In that red symbol,name,close mark,submit i can do it. But i want that sun,man,tue,web In red color and on the top month and year. In below dates with green color picker. so Please tell me how can I do that task.
All advices are accepted.
Thanks&Regards
Shankar
Clite
I can only suggest how I would have gone for such a calendar. By the UI it is clear that it has to come as a pop-up or to better say a dialog. Now you have to google the opensource calendars if any or just using the calendar API provided by java you can get the calendar for a month year etc. and move it across previous month by normal java function calls.
Now that you have got the data to populate in your calendar. You have to design a custom layout xml create ~30-40 boxes or a grid with dynamic textviews or a webview with <table>, <tr>, <td> the choice is completely yours.
AFAIK
If you can't find anything opensource then I would suggest you should do these things by the suggested approach.
I've tried to look for an answer to this, but no one seems to have asked it; and I find that strange, and makes me a little worried.
I've added the DatePicker widget to a layout. The screen I'm seeing it on is large enough for the calendar to show up to the right of it. The calendar's title is, for example, "July 2013". If I use the spinner to change the year, the calendar adjusts itself to the appropriate year.... but the label doesn't change. So, you could be looking at July of 2020, but the label would still read "July 2013". The only time that label/title/whatever seems to update is if you manually drag through the calendar, or change the month via the month spinner.
I've done virtually nothing so far besides adding it to the layout, so I'm not sure what I could be doing wrong, but this seems like a big enough bug (if it's NOT just me) that I should have been able to find SOMETHING else out about it.
Any help would be appreciated.
I had the same issue with the widget. It seems like the year on the label doesn't update unless you changed the year AND the month. There's probably some code in the widget's design that doesn't refresh the text of the label unless the month is changed, so if you change the year without the month, the label never refreshes (despite the rest of the widget being updated).
This seems to be a pretty glaring bug with the widget, so I'm a little surprised they haven't fixed it, unless we're missing something obvious here?
I actually got around the issue with my own code. I just needed the calender view, not the spinners, but the issue remains with the label if you only update the widget's year without the month. I basically just forced a +1 month increment regardless of if the situation called for it, refreshed the widget, then immediately decremented the month and refreshed the widget again. This way, your month remains the what it should have been, and the label refreshes the year if that was changed.
I'm creating an app which will have a countdown timer.
I would like to choose the time by TimePicker (after clicking a button).
I would like to have only a few choices. It is 15,30,45 minutes.
Unfortunately TimePicker is not exactly what I wanted.
Is there any possibility to edit TimePicker, to show only a custom set of values?
Thanks in advance!
Rather than showing a TimePicker for choosing 15, 30 or 45 minutes, you should use a Spinner
If you don't know how to use a spinner tell me in the comment!
It is possible to do that using reflection. I am not sure if it is a right thing to do though.
Here's an example of how it could be done. Line 60 replaces the 24-hour spinner with 12 Japanese symbols in android earlier than 3.0. Lines 74-76 do the same for 3.0+.
It might be better to create your own dialog with spinners, but for my code I wanted to mimic the native TimePicker.