[Android Themes] felmaster:
Note: If you're viewing this thread in XDA app, the styles and collapsible blocks and any other fancy features will be shown incorrectly or won't be shown at all. Please use your browser to view this thread. The XDA app apparently doesn't work even with the (limited) formatting options offered by XDA forums.

At A Glance widget for KWGT is a widget inspired by Google's new At A Glance feature introduced in Pixel Launcher with the release of Pixel 2 and 2 XL. I tried to make the widget look as similar to Google's At A Glance as possible, and added a few options for customization.

If you have any ideas on how to improve the widget or want to report any unexpected issues with it, feel free to comment on this thread.

Screenshots

No event:

[IMG="No event"]https://i.imgur.com/nvKYh0C.png[/IMG]

Normal event:

[IMG="Normal event"]https://i.imgur.com/RZuBLWz.png[/IMG]

Normal event more than 30 minutes away from now & with location:

[IMG="Normal event more than 30 minutes away from now & with location"]https://i.imgur.com/QLJUVvl.png[/IMG]

Now playing info:

[IMG="Now playing info"]https://i.imgur.com/ygivi6j.png[/IMG]

Dark theme:

[IMG="Dark theme"]https://i.imgur.com/ExxsrR1.png[/IMG]

How to use it

In case you don't have it yet, install mod edit - link removed KWGT app from the Play Store.

Launch the KWGT app and go through initial setup (allow access to storage and location and so on). Then exit the app.

Install the At A Glance Widget for KWGT app from the Play Store.

Place a KWGT widget to your screen. I personally used the 4x2 one, and then resized it to 5x2.

Now tap the widget, it will open the KWGT app. Pick the At A Glance widget.

That should be it. Click the save icon in the toolbar, and go home. The widget should appear on your homescreen. For further customization, check the section below.

If the widget is displaying incorrectly in some way (weird size, empty event showing), check the FAQ & Troubleshooting section below.

Customizable features

I tried my best to make the widget look like Google's one at the Pixel Launcher. Some customization options and extra features are always a good thing, right? If the widget doesn't look like the Google's one or if you just want to change some aspects of it, be sure to check this section.

My goal was to make the customization as easy as possible. The widget look can be only changed by fiddling with "globals". KWGT has a limitation of 8 characters per variable, so although I tried to be as descriptive as possible when naming them, I don't think their meaning will be clear to you for all of them. Here's a list of available globals with description of what they do and why they're here.

Variable name Default value Description
---Dimensions category---
size 147.083 Size of the whole widget. Change this if you want
to make the widget smaller/bigger.

txtSize1 27 Size of text (and weather icon) in the top row of
the widget.

txtSize2 17 Size of text and icons in the middle and bottom
row of the widget.

---Colors category---
txtColor #FFFFFFFF Color of all texts and icons in the widget.

---Calendar category---
calendar On Whether the widget should display upcoming events.

eventMin 1440 How many minutes to the future can the widget see
upcoming events. Google's widget at Pixel Launcher
only displays events when they're 30 minutes or
less from now, which I honestly think is stupid.

maxEvNaL 23 Maximum length (maximum amount of characters) of
event name that will be displayed. If this amount
is exceeded, the event name will be cut off and
three dots will be added behind it.

evntTime On Whether the widget should display the upcoming
event start and end time.

---Weather category---
weather On Whether the widget should display weather.

weathIco On Whether the widget should display weather icon
(next to the temperature). The weather switch has
to be in On state for this option to have any
effect.

tempSpac Off Option to enable or disable a space between
temperature and temperature unit. Pixel Launcher's
widget has the space there, but it's
typographically incorrect. Example - with this
option Off: 5°C; with this option On: 5 °C.

---Location category---
location Off Whether the widget should display event location.

locCal Calendar for which you want to display event
location. If this is empty, location will be shown
for all enabled calendars (obviously only if the
location switch is turned on and if the event has
any location filled in). This option is useful if
you have multiple calendars and you want the
widget to display location for only one of them.

maxEvLoL 20 Maximum length (maximum amount of characters) of
event location that will be displayed. If this
amount is exceeded, the location text will be cut
and three dots will be added behind it.

---Shadow category---
shadow On Whether the text and icons should cast a shadow.
There is no way to make the weather icon cast a
shadow, so I added an option to turn shadows
completely off if it bugs anybody.

shaColor #FF000000 Color of shadow below text and icons.

shaBlur 25 Shadow blur value.

shaDir 0 Shadow direction.

shaDist 0 Distance of shadow from the text that casts it.

---Localization category---
txtIn in Localization option, you can translate this word
to your own language. See the 2nd screenshot for
reference (where the text will be shown and what
it represents).

txtNow now Localization option, you can translate this word
to your own language. The text will only be shown
for a minute at an event start.

txtHAbbr h Localization option, abbreviation of hour.
Translate the hour abbreviation to your own
language if you want.

txtMAbbr min Localization option, abbreviation of minute.
Translate the minute abbreviation to your own
language if you want.

---Font category---
font1 Product Sans Font used in the top row of the widget.
Regular

font2 Roboto Regular Font used in the middle and bottom rows.

---BETA: Music category---
music Off Whether the widget should display music info. This
feature requires you to grant KWGT access to read
notifications.

muInfLay Song artist Layout of music info (whether you want the widget
- Song title to display both song artist and title or just one
of those.

maxSoArL 16 Maximum length (amount of characters) of song
artist that will be displayed.

maxSoNaL 32 Maximum length (amount of characters) of song
title that will be displayed.

Oh, and make sure you go through all KWGT options and settings! Mainly set some calendars to show, choose your weather provider and change unit system to your liking.

Other features

Open Google App weather (see screenshot below if you don't know what it is) when tapping weather icon or temperature.

[IMG="Google App weather"]https://i.imgur.com/g9djrCd.png[/IMG]

Yes, it's possible to set it so that tapping the weather icon/temperature opens the weather screen. You need Tasker, though. If you have it, follow the following steps:

Launch Tasker (enable it), go to Tasks tab and create a new task. Call it "Launch Google Weather".

Click on a button for adding an action. Use the filter search field and search for "intent". Tap the Send Intent option.

Fill in the following fields (name of the field on the left), the text that you're going to fill in on the right.

Action android.intent.action.VIEW
Cat Default
Data dynact://velour/weather/ProxyActivity
Package com.google.android.googlequicksearchbox
Class com.google.android.apps.gsa.velour.DynamicActivityTrampoline
Target Activity

Go back and check if the task works (launch the task with the "Play" button at the bottom left corner of the screen. It should open the Google weather screen.

Maybe, just maybe it could work right away. If you named the Tasker task as I advised (Launch Google Weather), it might already be linked to the widget's tap actions. Try tapping the weather icon or temperature. If it works, we're done.

If not, we have to manually assign the tasks. Go to KWGT and edit our At A Glance widget.

At Items tab, click the first item (Date & weather (no event)).

Now click the third item (Weather container). Go to Touch tab and tap on the Single option.

Click Action and select Launch Shortcut option.

Click Shortcut and select Task Shortcut (it should have Tasker icon). Now pick our task for launching Google weather.

Go back to the "root" "folder" of the widget, and do the same with the last item (Upcoming event time (& location) & weather). There is also a Weather container for which you can assign the same shortcut.

Tapping current date opens Google calendar.

Obviously, you can reassign this to whatever you want.

Tapping event name or event time opens the event in Google calendar.

Known issues and FAQ

The widget displays an empty event (like the screenshot below).

[IMG="Bugged empty event"]https://i.imgur.com/Jp6MGaC.png[/IMG]

This can be simply fixed by force stopping KWGT app. It happens when you install the widget for the first time on some devices. After force stopping the KWGT app, open the widget in the app and save it. That's it, the bug is now forever fixed on your device. If you don't know how to force stop and app, check the video below.

[YOUTUBE]RmMDEabJxUg[/YOUTUBE]

The widget looks weird - text is too big/small and cut-off. The text size changes when tapping the widget.

This happens due to different screen resolutions, sizes and pixel densities - there are too many display configurations and it's not an easy task to make widget with KWGT to perfectly fit all displays out there. This is the reason why I introduced globals - specifically size (and for more precise controls you can fiddle with txtSize1 and txtSize2). If the widget text size is too big (small), decrease (increase) the mentioned variable values. I created and tested the widget on a 5.5'' screen with 1440x2560 resolution and DPI 523. If you have the same display configuration as me, the widget will most likely look fine on your device. If not, don't worry - changing values of the variables mentioned above will save the day.

Weather icons are different than the ones at Google's Pixel Launcher. - Fixed.

Google's icons are hard to come by. Give them to me and I'll change them to match Google's style. For now I'm using the icons available in KWGT which fit the overall theme the best. I'd like to use Google's icons, though. I like them more as well as you surely do.

The file sizes are fairly big from the 5th version.

That's due to me using high quality custom weather icons. From the 5th version on, the widget no longer relies on the weather icons built in to KWGT app itself. The new icons are perhaps way too big (each icon is 2000x2000), I will scale them down in a future release (expect it in v10) so that it doesn't eat that much space. The new weather icons resolution may be a bit of a overkill, but at least it won't ever be blurry. There is nothing worse than blurry low-res pictures on today's devices with crazy high resolutions.

Downloads

mod edit - link removed[IMG="At A Glance for KWGT at Google Play"]https://i.imgur.com/dCiiOZR.png[/IMG]

For various reasons I decided to move the app to mod edit - link removed Play Store instead of uploading it here. It's easier to deliver updates that way, and I spent countless hours figuring out all the calculations and formulas necessary for the widget to work correctly, so I don't want the widget to be abused.