AscySoft Active Member Licensed User Longtime User Mar 21, 2017 #101 I know that, but because in my case (the stripped version above) this was part of a bigger project with Design Support lib already checked and used, then Jack Cole said: #AdditionalJar: com.android.support:design Click to expand... is not needed any more. Last edited: Mar 21, 2017
I know that, but because in my case (the stripped version above) this was part of a bigger project with Design Support lib already checked and used, then Jack Cole said: #AdditionalJar: com.android.support:design Click to expand... is not needed any more.
a2dcore New Member Licensed User Jun 16, 2017 #103 Good day to all, How to use SelectableDays()() As Calendar ? Thanks in advance.
a2dcore New Member Licensed User Jun 16, 2017 #104 I've got this java code working: Code: public Calendar[] getValidDays(Long nbDate, Long neDate, String[] lsHoli) { Date begDate = new Date(nbDate); Date endDate = new Date(neDate); Calendar begCal = Calendar.getInstance(); Calendar endCal = Calendar.getInstance(); begCal.setTime(begDate); endCal.setTime(endDate); LinkedList<Calendar> daysList= new LinkedList<Calendar>(); Calendar[] daysArray; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String dtStr = null; List<String> dayHoli = Arrays.asList(lsHoli); while ( begCal.getTimeInMillis() <= endCal.getTimeInMillis()) { if (begCal.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY) { dtStr = sdf.format(begCal.getTime()); if (!dayHoli.contains(dtStr)) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(begCal.getTimeInMillis()); daysList.add(c); } } begCal.setTimeInMillis(begCal.getTimeInMillis() + (24*60*60*1000)); } daysArray = new Calendar[daysList.size()]; for (int i = 0; i < daysArray.length ; i++) { daysArray[i] = daysList.get(i); } return daysArray; } Usage: Code: dpDate.SelectableDays = nativeMe.RunMethod("getValidDays", Array(minDate, maxDate, lstHolidays))
I've got this java code working: Code: public Calendar[] getValidDays(Long nbDate, Long neDate, String[] lsHoli) { Date begDate = new Date(nbDate); Date endDate = new Date(neDate); Calendar begCal = Calendar.getInstance(); Calendar endCal = Calendar.getInstance(); begCal.setTime(begDate); endCal.setTime(endDate); LinkedList<Calendar> daysList= new LinkedList<Calendar>(); Calendar[] daysArray; SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String dtStr = null; List<String> dayHoli = Arrays.asList(lsHoli); while ( begCal.getTimeInMillis() <= endCal.getTimeInMillis()) { if (begCal.get(Calendar.DAY_OF_WEEK) != Calendar.SUNDAY) { dtStr = sdf.format(begCal.getTime()); if (!dayHoli.contains(dtStr)) { Calendar c = Calendar.getInstance(); c.setTimeInMillis(begCal.getTimeInMillis()); daysList.add(c); } } begCal.setTimeInMillis(begCal.getTimeInMillis() + (24*60*60*1000)); } daysArray = new Calendar[daysList.size()]; for (int i = 0; i < daysArray.length ; i++) { daysArray[i] = daysList.get(i); } return daysArray; } Usage: Code: dpDate.SelectableDays = nativeMe.RunMethod("getValidDays", Array(minDate, maxDate, lstHolidays))
M Marc De Loose Member Licensed User Longtime User Jul 2, 2017 #105 I get this when trying to build your example: Code: Generating R file. Error C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:10: error: No resource identifier found for attribute 'layout_scrollFlags' in package 'b4a.example' C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:16: error: No resource identifier found for attribute 'layout_behavior' in package 'b4a.example' C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:16: error: Error: No resource found that matches the given name (at 'layout_behavior' with value '@string/appbar_scrolling_view_behavior'). Adter adding the line: #AdditionalJar: com.android.support:design I only get this error: Code: B4A version: 7.01 Parsing code. (0.00s) Compiling code. (0.04s) Compiling layouts code. (0.00s) Organizing libraries. (0.00s) Generating R file. Error invalid resource directory name: C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res3\res/values-b+sr+Latn I am using v1.7 of the library and tied JAR 23 and 26. I am lost Last edited: Jul 2, 2017
I get this when trying to build your example: Code: Generating R file. Error C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:10: error: No resource identifier found for attribute 'layout_scrollFlags' in package 'b4a.example' C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:16: error: No resource identifier found for attribute 'layout_behavior' in package 'b4a.example' C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:16: error: Error: No resource found that matches the given name (at 'layout_behavior' with value '@string/appbar_scrolling_view_behavior'). Adter adding the line: #AdditionalJar: com.android.support:design I only get this error: Code: B4A version: 7.01 Parsing code. (0.00s) Compiling code. (0.04s) Compiling layouts code. (0.00s) Organizing libraries. (0.00s) Generating R file. Error invalid resource directory name: C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res3\res/values-b+sr+Latn I am using v1.7 of the library and tied JAR 23 and 26. I am lost
bl4ck4nt Member Licensed User Longtime User Aug 7, 2017 #106 Marc De Loose said: I get this when trying to build your example: Code: Generating R file. Error C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:10: error: No resource identifier found for attribute 'layout_scrollFlags' in package 'b4a.example' C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:16: error: No resource identifier found for attribute 'layout_behavior' in package 'b4a.example' C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:16: error: Error: No resource found that matches the given name (at 'layout_behavior' with value '@string/appbar_scrolling_view_behavior'). Adter adding the line: #AdditionalJar: com.android.support:design I only get this error: Code: B4A version: 7.01 Parsing code. (0.00s) Compiling code. (0.04s) Compiling layouts code. (0.00s) Organizing libraries. (0.00s) Generating R file. Error invalid resource directory name: C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res3\res/values-b+sr+Latn I am using v1.7 of the library and tied JAR 23 and 26. I am lost Click to expand... Try add this Code: #AdditionalJar: com.android.support:design
Marc De Loose said: I get this when trying to build your example: Code: Generating R file. Error C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:10: error: No resource identifier found for attribute 'layout_scrollFlags' in package 'b4a.example' C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:16: error: No resource identifier found for attribute 'layout_behavior' in package 'b4a.example' C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res1\res\layout\mdtp_date_time_picker_dialog.xml:16: error: Error: No resource found that matches the given name (at 'layout_behavior' with value '@string/appbar_scrolling_view_behavior'). Adter adding the line: #AdditionalJar: com.android.support:design I only get this error: Code: B4A version: 7.01 Parsing code. (0.00s) Compiling code. (0.04s) Compiling layouts code. (0.00s) Organizing libraries. (0.00s) Generating R file. Error invalid resource directory name: C:\Users\Marc\Documents\0_ELECTRONICS 2017\2017 Android development\MaterialDateTimePicker\Objects\bin\extra\res3\res/values-b+sr+Latn I am using v1.7 of the library and tied JAR 23 and 26. I am lost Click to expand... Try add this Code: #AdditionalJar: com.android.support:design
P Pencil3 Member Licensed User Longtime User Aug 30, 2017 #107 Is it possible to set the MinDate to 01-01-2017 but have today's date selected when the dialog is selected? For example when using the below when the dialog is selected the date of Jan 01 2017 is selected, I would like today's date to be selected and still be able to select a date back until 01-01-2017. Code: cal.Initialize("mm-dd-yyyy",cal.US,"01-01-2017")
Is it possible to set the MinDate to 01-01-2017 but have today's date selected when the dialog is selected? For example when using the below when the dialog is selected the date of Jan 01 2017 is selected, I would like today's date to be selected and still be able to select a date back until 01-01-2017. Code: cal.Initialize("mm-dd-yyyy",cal.US,"01-01-2017")
DonManfred Expert Licensed User Longtime User Aug 30, 2017 #108 Initialize with today and set cal.mindate to Jan 01 2017
P Pencil3 Member Licensed User Longtime User Aug 31, 2017 #109 When using cal.MinDate I receive unknown member: mindate error. DonManfred said: Initialize with today and set cal.mindate to Jan 01 2017 Click to expand...
When using cal.MinDate I receive unknown member: mindate error. DonManfred said: Initialize with today and set cal.mindate to Jan 01 2017 Click to expand...
DonManfred Expert Licensed User Longtime User Aug 31, 2017 #110 This is my code from the example. It is using V1.7 and it does not raise an unknown member error. Code: Activity.LoadLayout("Layout1") time.Initialize("Time",13,0,True) date.Initialize("Date",2017,8,31) Log(DateTime.DeviceDefaultTimeFormat) Dim cal As Calendar cal.Initialize("dd.mm.yyyy",cal.GERMAN,"1.1.2017") date.MinDate = cal
This is my code from the example. It is using V1.7 and it does not raise an unknown member error. Code: Activity.LoadLayout("Layout1") time.Initialize("Time",13,0,True) date.Initialize("Date",2017,8,31) Log(DateTime.DeviceDefaultTimeFormat) Dim cal As Calendar cal.Initialize("dd.mm.yyyy",cal.GERMAN,"1.1.2017") date.MinDate = cal
P Pencil3 Member Licensed User Longtime User Aug 31, 2017 #111 In your example you use date.MinDate, you said to try cal.MinDate and that is when I receive unknown member: mindate error. For my date.Initialize I am already using it for a DateTime.Now or I would use it per your example. All I would like to do is when selecting the picker is have today's date selected and still be able to select a previous date to today's date. If I use: Code: Dim cal As Calendar cal.Initialize("mm-dd-yyyy",cal.US,"") date.MinDate = cal Today's date is selected, but I can not choose a date prior to today's date. DonManfred said: This is my code from the example. It is using V1.7 and it does not raise an unknown member error. Code: Activity.LoadLayout("Layout1") time.Initialize("Time",13,0,True) date.Initialize("Date",2017,8,31) Log(DateTime.DeviceDefaultTimeFormat) Dim cal As Calendar cal.Initialize("dd.mm.yyyy",cal.GERMAN,"1.1.2017") date.MinDate = cal Click to expand...
In your example you use date.MinDate, you said to try cal.MinDate and that is when I receive unknown member: mindate error. For my date.Initialize I am already using it for a DateTime.Now or I would use it per your example. All I would like to do is when selecting the picker is have today's date selected and still be able to select a previous date to today's date. If I use: Code: Dim cal As Calendar cal.Initialize("mm-dd-yyyy",cal.US,"") date.MinDate = cal Today's date is selected, but I can not choose a date prior to today's date. DonManfred said: This is my code from the example. It is using V1.7 and it does not raise an unknown member error. Code: Activity.LoadLayout("Layout1") time.Initialize("Time",13,0,True) date.Initialize("Date",2017,8,31) Log(DateTime.DeviceDefaultTimeFormat) Dim cal As Calendar cal.Initialize("dd.mm.yyyy",cal.GERMAN,"1.1.2017") date.MinDate = cal Click to expand...
mcqueccu Expert Licensed User Longtime User Sep 2, 2017 #112 Dear DonManfred, When i choose 2017 Sep 02 from MaterialDateTimePicker its showing 2017.08.02 which is wrong.Which must show 2017.09.01 in the label. should i do anything else to get the correct date? Best Regards,
Dear DonManfred, When i choose 2017 Sep 02 from MaterialDateTimePicker its showing 2017.08.02 which is wrong.Which must show 2017.09.01 in the label. should i do anything else to get the correct date? Best Regards,
DonManfred Expert Licensed User Longtime User Sep 2, 2017 #113 i think you must asume month -1 or so. Something like that i have in mind... 0-11 are the returning months....
i think you must asume month -1 or so. Something like that i have in mind... 0-11 are the returning months....
mcqueccu Expert Licensed User Longtime User Sep 3, 2017 #114 DonManfred said: i think you must asume month -1 or so. Something like that i have in mind... 0-11 are the returning months.... Click to expand... I have used (Month +1) So that it returns a (library return month +1) .Got lil confused looking at the library Example. Thank you for this great library.It could be easy if it returns Range 1- 12 though. Best Regards...
DonManfred said: i think you must asume month -1 or so. Something like that i have in mind... 0-11 are the returning months.... Click to expand... I have used (Month +1) So that it returns a (library return month +1) .Got lil confused looking at the library Example. Thank you for this great library.It could be easy if it returns Range 1- 12 though. Best Regards...
DonManfred Expert Licensed User Longtime User Sep 3, 2017 #115 mcqueccu said: It could be easy if it returns Range 1- 12 though. Click to expand... yes, if i have the source... I do not have the source anymore; i lost all my sources a few minths ago. Don´t expect to get any new version.
mcqueccu said: It could be easy if it returns Range 1- 12 though. Click to expand... yes, if i have the source... I do not have the source anymore; i lost all my sources a few minths ago. Don´t expect to get any new version.
mcqueccu Expert Licensed User Longtime User Sep 3, 2017 #116 DonManfred said: yes, if i have the source... I do not have the source anymore; i lost all my sources a few minths ago. Don´t expect to get any new version. Click to expand... Sorry to hear about that.Worst cases we face Its big thing that it was wrapped n worked properly as expected we can use it. Small Request Dear Don i m learning wrapping library too and wrapped some of the library u have did here in forum for practicing it going well,But couldn't wrap the library with these types of dialog.It could be very helpful if you could share some part of it so we could learn too. Best Regards...
DonManfred said: yes, if i have the source... I do not have the source anymore; i lost all my sources a few minths ago. Don´t expect to get any new version. Click to expand... Sorry to hear about that.Worst cases we face Its big thing that it was wrapped n worked properly as expected we can use it. Small Request Dear Don i m learning wrapping library too and wrapped some of the library u have did here in forum for practicing it going well,But couldn't wrap the library with these types of dialog.It could be very helpful if you could share some part of it so we could learn too. Best Regards...
DonManfred Expert Licensed User Longtime User Sep 3, 2017 #117 mcqueccu said: It could be very helpful if you could share some part of it Click to expand... Share code which i do not have anymore? HOW?????
mcqueccu said: It could be very helpful if you could share some part of it Click to expand... Share code which i do not have anymore? HOW?????
mcqueccu Expert Licensed User Longtime User Sep 3, 2017 #118 DonManfred said: Share code which i do not have anymore? HOW????? Click to expand... Not that lost code Don. Requesting latest wraps similar to those projects.
DonManfred said: Share code which i do not have anymore? HOW????? Click to expand... Not that lost code Don. Requesting latest wraps similar to those projects.
T trueboss323 Active Member Licensed User Longtime User Sep 13, 2017 #119 I am unfortunately still having that No Resource Found error. I'm using your latest library (1.7) and B4A version 7.30 , I've tried changing the SDK to 25, 24,23,21 but it didn't help
I am unfortunately still having that No Resource Found error. I'm using your latest library (1.7) and B4A version 7.30 , I've tried changing the SDK to 25, 24,23,21 but it didn't help
DonManfred Expert Licensed User Longtime User Sep 14, 2017 #120 mcqueccu said: Requesting latest wraps similar to those projects. Click to expand... I have not any library similar to this. This library is one of around 50 libs i tried to wrap two years ago. ALL unsuccessfully exept this one. and all the sources are lost. I´ve put it on my TODO list to rewrite the lib some day
mcqueccu said: Requesting latest wraps similar to those projects. Click to expand... I have not any library similar to this. This library is one of around 50 libs i tried to wrap two years ago. ALL unsuccessfully exept this one. and all the sources are lost. I´ve put it on my TODO list to rewrite the lib some day