I want to have a datepicker that looks something like this
But i get something like this
Anyone that got a good example of a theme to use ?
For this you have to develop custom date picker. May be it would help you.
https://github.com/flavienlaurent/datetimepicker
Related
I'm trying to create a custom calendar in Android. I want to create somethning like this
custom calendar.
As you can see the design is slightly different than normal date picker for android. I tried to change it in xml, but like I found out, it isnt possible. So my question is - how to do that? Should I create custom class which extend from DatePicker? I was trying to find the solution by myself, but I found only answers to change color etc, but I want to also change design and font.
I will be very grateful for your help
I implemented date picker in my project from here: https://developer.android.com/guide/topics/ui/controls/pickers
The problem is, this date picker is in the format of regular calendar, and it takes a long time to choose faraway dates. In my app this kind of action is going to be performed all the time.
So, my question is, is there a possibility to change this calendar-like form to something faster? For example like in the picture below.
Picture of date picker i would like to make
check that library: https://github.com/florent37/SingleDateAndTimePicker
I've used it some time ago and it did almost exactly what you're looking for ;)
If it doesn't fit your needs, you can look for more 'iOS style date pickers' for Android, for example in this SO post:
ios like date/time picker for android platform
Edit:
It seems that this picker is Holo Light style and is achievable with this piece of code:
DatePickerDialog datepickerdialog = new DatePickerDialog(getActivity(),
AlertDialog.THEME_HOLO_LIGHT,this,year,month,day);
But you need to check that on your own because they might be deprecated or not working with other themes.
Did you check this for Material Design?
Here is its documentation and code.
The DatePicker widget in Android has an attribute called android:datePickerMode that has a calendar option and a spinner option.
You can use the spinner option to get the appearance of the DatePicker you are after.
I want to change the appearance of my spinner. Here's how it currently looks like
Here's how I want to look like -
Please suggest me how can I make this change?
You need to implement your own style for your spinner.
There is no another way to change somethings in it design.
How to do that, you can find as example there
I have an activity that uses Theme.Holo.Light containing EditText, RadioButtons and DatePicker. I want to use Theme.Holo.Light for entire activity, except DatePicker which I want to be Theme.Light style. How can I do this?
Have you tried something like
<DatePicker
...
style="#android:style/Widget.DatePicker"/>
?
Holo uses #android:style/Widget.Holo.DatePicker while #android:style/Widget.DatePicker is the one you need to use.
Links:
Style list
Style list's source code
Update:
It seems that DatePicker is built with 3 NumberPickers. My answer is correct, but it is incomplete. The best approach I found to solve your problem was to recreate ans make your own DatePicker (copypaste from source code) and give style to the DatePicker AND the 3 NumberPickers inside.
Link of the Layout on GitHub:
DatePicker Layout
I'm looking for an advanced Android color picker dialog. The standard color picker from the API Demos and examples from this post aren't quite acceptable to me. I'd like it to look like this: this image. Are there any open source color pickers that look like that?
UPDATE: My primary goal is to make the Color Picker easy to use: it'd be great if the user only needs to click once to pick any color, and all possible colors are represented. The Color Pickers from the examples I've mentioned require two clicks to pick a color and are too complicated for the average user.
This one looks pretty close to what you want, and is FOSS:
https://github.com/LarsWerkman/HoloColorPicker
how about this solution ?
look at the screenshot:
source code here .
Have you tried Android Color Picker?
If you need to show the RGB-Code of the currently selected color, just modify the dialog by adding an TextView and adding an update to it in the ColorChangeListener (or whatever it's called)
Or take a look at the color-picker dialog of CyanogenMod
Here a link to the source: CyanogenMod color-picker on GitHub