FORUMS
Remove All Ads from XDA

Google Pixel 2 - Basic Date/Weather AND Working Calendar Widget

689 posts
Thanks Meter: 301
 
By SwoRNLeaDejZ, Senior Member on 10th October 2017, 04:50 AM
Post Reply Email Thread
Below you will find links to both of the widgets they showed off during the launch event last week. First is a basic date/weather widget, and the second is a FULLY working calendar widget. Behaves exactly like the calendar widget on the Pixel 2. If the appointment is today, it shows time until appointment in hours, if less than an hour, it switches to minutes, and if it is tomorrow or later it displays in days. During the time of the next appointment it displays (Now) and on the minute the appointment starts, it displays (Due Now). See video below for example.

http://www.youtube.com/watch?v=lFL6PIK-gwQ

Simple date widget: https://drive.google.com/file/d/0Byf...w?usp=drivesdk
Calendar Widget: https://drive.google.com/file/d/0Byf...w?usp=drivesdk


*NOTE: when the links open in Google Drive, it will more than likely say "file type not supported". Click the three dots in the upper right corner and select "download". File type is unsupported for preview, not to download.*


If you use these, and post screenshots PLEASE CREDIT ME. I made them from scratch and the second one wasn't easy.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_2017-10-08-11-06-55.jpg
Views:	11638
Size:	262.4 KB
ID:	4298106   Click image for larger version

Name:	Screenshot_2017-10-08-11-06-24.jpg
Views:	11568
Size:	264.9 KB
ID:	4298107  
The Following 14 Users Say Thank You to SwoRNLeaDejZ For This Useful Post: [ View ] Gift SwoRNLeaDejZ Ad-Free
 
 
12th October 2017, 02:29 PM |#2  
Junior Member
Thanks Meter: 3
 
More
Nice! How did you create it? I personally made both in one widget using Zooper. If an event is closer than 6 hours, show the calendar widget. If the upcoming is more than 6 hours away, show the date + weather. But the code doesn't work flawlessly yet when switching from one widget to another.
12th October 2017, 04:49 PM |#3  
SwoRNLeaDejZ's Avatar
OP Senior Member
Flag Taunton
Thanks Meter: 301
 
More
Quote:
Originally Posted by troymackenbach

Nice! How did you create it? I personally made both in one widget using Zooper. If an event is closer than 6 hours, show the calendar widget. If the upcoming is more than 6 hours away, show the date + weather. But the code doesn't work flawlessly yet when switching from one widget to another.

If you download the widget, you can check it out. It is basically a LONG ass formula that analyzes the calendar event, looking at start date, and event time, and current time, and determines whether or not the event starts today or in the future. If it is today, but not yet within an hour of the event (again, formula arguments in Zooper) if displays the time in hours until the event start time. If the same day, and the current hour is 1 hour from the start time of the event, it displays in minutes. If the event date is greater than the current date, then it displays Tomorrow if it is one day away, and then 2 days, 3 days, etc. The formula is ridiculously long, and I had to use multiple and statements (&&) to account for every possible scenario. Also, since you can not do text strings and math together in Zooper (it will display the math as a text string (e.g. if you put (24-5) Minutes, it will display (24-5) Minutes instead of 19 Minutes)) I had to do multiple, redundant && arguments to account for the math that needed to be done, and the text that I needed to display alongside the math. It was a pain trying to get it to work, but once I did, I felt very accomplished
13th October 2017, 05:11 AM |#4  
Junior Member
Thanks Meter: 0
 
More
I am using it, and is really great. Thanks for your excellent work. I only have one problem. If an appointment is not in exact hours, and for example is at 12:30, it starts countdown to 12 o'clock, and not to 12:30. Maybe I am just encountering this because of my country's different calendar layout. (DD/MM/YYYY). Anyway, it is no big problem, and again, thank you for your work
13th October 2017, 10:14 AM |#5  
Junior Member
Thanks Meter: 3
 
More
Quote:
Originally Posted by SwoRNLeaDejZ

If you download the widget, you can check it out. It is basically a LONG ass formula that analyzes the calendar event, looking at start date, and event time, and current time, and determines whether or not the event starts today or in the future. If it is today, but not yet within an hour of the event (again, formula arguments in Zooper) if displays the time in hours until the event start time. If the same day, and the current hour is 1 hour from the start time of the event, it displays in minutes. If the event date is greater than the current date, then it displays Tomorrow if it is one day away, and then 2 days, 3 days, etc. The formula is ridiculously long, and I had to use multiple and statements (&&) to account for every possible scenario. Also, since you can not do text strings and math together in Zooper (it will display the math as a text string (e.g. if you put (24-5) Minutes, it will display (24-5) Minutes instead of 19 Minutes)) I had to do multiple, redundant && arguments to account for the math that needed to be done, and the text that I needed to display alongside the math. It was a pain trying to get it to work, but once I did, I felt very accomplished

Yh I downloaded and tried it, works great man I just personally removed the capital letters from the Tomorrow and Today and Now and changed (Now) to now. Besides that, like a charm man
14th October 2017, 01:15 AM |#6  
SwoRNLeaDejZ's Avatar
OP Senior Member
Flag Taunton
Thanks Meter: 301
 
More
Quote:
Originally Posted by Hammerakos

I am using it, and is really great. Thanks for your excellent work. I only have one problem. If an appointment is not in exact hours, and for example is at 12:30, it starts countdown to 12 o'clock, and not to 12:30. Maybe I am just encountering this because of my country's different calendar layout. (DD/MM/YYYY). Anyway, it is no big problem, and again, thank you for your work

Oh my God dude, you just found a bug in the conditional formula that I hadn't accounted for..

I fixed it, and updated the link in the OP. I had one missing conditional to recognize and act right for certain appointments that occurred at 30 minutes intervals. I fixed it though, so it should work perfectly now. Please redownload and replace the older version of you're already using the widget.

Really appreciate you pointing that out because I probably would not have noticed it!
16th October 2017, 02:09 AM |#7  
Member
Flag Guadalajara
Thanks Meter: 16
 
More
Excellent widget i'm using it right now with action launcher and it's amazing, although i wonder if there is a way to push the weather and make it take you to the google current location weather, the one with the frog. I tried messing the configuration of the widget in zooper but it's kind of buggy, i couldn't figure a way to make it take me to that weather page, the closest thing was to make it take me to the google app.
17th October 2017, 11:35 PM |#8  
SwoRNLeaDejZ's Avatar
OP Senior Member
Flag Taunton
Thanks Meter: 301
 
More
Quote:
Originally Posted by Arturo777

Excellent widget i'm using it right now with action launcher and it's amazing, although i wonder if there is a way to push the weather and make it take you to the google current location weather, the one with the frog. I tried messing the configuration of the widget in zooper but it's kind of buggy, i couldn't figure a way to make it take me to that weather page, the closest thing was to make it take me to the google app.

Good idea, I'll see if I can figure something out.

Widget fixed again. Had to correct another bug. Please redownload if you downloaded already.
19th October 2017, 12:40 PM |#9  
Member
Thanks Meter: 7
 
More
Can someone do a quick tutorial on how to create this widget ?

---------- Post added at 12:40 PM ---------- Previous post was at 12:23 PM ----------

Got it working just have ?? For weather.
20th October 2017, 05:44 PM |#10  
Member
Thanks Meter: 1
 
More
First, thank you for making this widget! Great job!

I noticed a bug in it when the time till the next meeting is more than an hour but less than 2 hours, it simply says "minutes" without a number in front of it. I've included a screenshot for reference. https://photos.app.goo.gl/Aq7Je57V6a4jLl3x1

Also, if you have a really long event title, what worked for me was adding [tr=35] before #C0TITLE# and [/tr] after #C0TITLE# to limit the character length on the first line. So, that it looks like this [tr=35]#C0TITLE#[/tr]

---------- Post added at 12:42 PM ---------- Previous post was at 12:40 PM ----------

Quote:
Originally Posted by Arturo777

Excellent widget i'm using it right now with action launcher and it's amazing, although i wonder if there is a way to push the weather and make it take you to the google current location weather, the one with the frog. I tried messing the configuration of the widget in zooper but it's kind of buggy, i couldn't figure a way to make it take me to that weather page, the closest thing was to make it take me to the google app.

you can do this with tasker. by creating a task in tasker for google weather, this allows you to link the module in the zooper widget to it.
21st October 2017, 03:11 AM |#11  
Junior Member
Thanks Meter: 0
 
More
really good
thx, really nice work. the only think that isnt working is the weather part for me.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes