last day (14 days later) » 

12:20 PM
0
Q: Datepicker divider color change according to application theme

kittu88I know this question has already been asked and even answered, but I was unable to figure out much from the solution provided. I was trying to follow this tutorial but I could not figure out exactly what I need to do. I have already downloaded the Android-DatePicker library and changed the image ...

 
Can you confirm the fully quantified class name of DatePickerDialog you're using?
 
@Vikram what do you exactly wanna know? the class name is mDateSetListener according to my activity. If you wanna change the way it is called you can do that.
 
No, I mean - are you using android.app.DatePickerDialog or net.simonvt.datepicker.DatePickerDialog? You can check this in the import statements.
 
@Vikram I have edited the source code to include the import statements as well, please check them.
 
You said that you changed the drawable in Android-DatePicker library. But you are not using the library here. If you were, the import statement would read import new.simonvt.datepicker.DatePickerDialog; instead of import android.app.DatePickerDialog;. What I am trying to say is - to get a customized divider, you need the library's implementation of DatePickerDialog, not the framework's.
 
12:20 PM
@Vikram The library has definition for a number picker and not a date picker, so I was a little confused. Secondly, I also do not understand what to do after adding the library to my project. It will be great if you tell me the steps to be done on my project including the library onwards how to create the datepicker.
@Vikram actually I am very confused about the implementation of the library in my project. If you want to edit the sample activity feel free to do so.
 
Hi
 
12:47 PM
Hello
Tell me what to do please
 
Can you try the edited sample code?
 
Letme check please
 
Sure
 
Please give me sometime. I am on my way home. I will check it as soon as I reach.
 
ok
 
1:25 PM
hey man I will try it out in a little while I am back home
thanks for your patience
my home pc is showing error in the library
as well as the sample project along with the library
 
strange..
what error is it showing?
 
error: Error: No resource found that matches the given name: attr 'numberPickerStyle'
for this line in the library<item name="numberPickerStyle">@style/NPWidget.Holo.Light.NumberPicker</item>
in themes.xm
themes.xml
 
i'll check, one second
This means that you haven't imported the library
that's where this attribute is defined
what ide are you using?
 
1:42 PM
eclipse
I can import the library only when
its error is resolved
its not showing
 
Do you have the dependencies? Dependencies:
CalendarView: https://github.com/SimonVT/android-calendarview
NumberPicker: https://github.com/SimonVT/android-numberpicker
 
yeah
I do
 
I am not sure how to help you with this. You need 3 libraries - DatePicker, CalendarView and NumberPicker - which you say you already have..
Can you right click on the sample-project, and choose properties?
 
you just tell me how to modify my activity
I could not even understand the class
you poted in your answer
posted
 
Okay
right click on your project, choose properties.. choose android on the left pane.. tell me what libraries are listed in the right pane..
 
1:58 PM
none
 
is there a add button?
 
yeah
 
click it.. what options does that give?
 
and that is not showing the lib
coz
lib has errors
 
okay
I switched to Android Studio some time back
I will start Eclipse and try to see what's going on..
 
1:59 PM
it was fine in office ide
 
Bear with me..
 
sure dude!
 
2:21 PM
hey man any updats
??
 
2:47 PM
Sorry, I got held up on a call
@kittu88 Are you still here?
 
yup
tell me
 
What is your app's minSdkVersion & targetSdkVersion?
 
minimum was 14
max 20
 
Okay, change these for all 3 libraries in their manifests
Then right click on datepicker library and choose properties > android on the left > isLibrary should be selected
Below that, add numberpicker and calendarview library if they are not already there..
 
My ide is crashing here
dunno why
guess it will be best
if tried out at work
 
3:01 PM
okay.. leave me a message then.. if I am around, i'll try to help
 
 
1 hour later…
4:16 PM
ok man
 

last day (14 days later) »