Package com.aurelienpierre.sioul
Class HomeCardToday
java.lang.Object
com.aurelienpierre.sioul.HomeCardToday
Sioul's full card on the home screen (HomeCard draws it; docs/android.md,
"The card on the home screen"), from what Rust wrote (crates/sioul-app/src/
homecard.rs). Today first: the date, the weather now and the next four hours
on its row (the farthest left out first when they do not fit, never
wrapped), the next morning, afternoon, evening and night, the next seven days, and
Open-Meteo's credit. Then what the Porch has for you: a dose due, a code you
asked for and its warning, reminders, the calls declined, two events at
once. Then Now: what now is for, do-not-disturb, the next step, where you
stopped. The mail and the agenda are on their own cards.
As the card shrinks, its parts are left out, the least needed first, today
kept longest: where you stopped, the step, two events at once, the calls,
the reminders, do-not-disturb, the code, the dose, then the seven days and
the parts of the day; the date, the weather now and what now is for stay.
Lines.of is the pure part (org.json alone), checked on a computer's JVM
(android/jvm-checks/CardCheck.java); views draws it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final classA cell of the weather: an hour, a part of the day, a day.private static final classWhat fits in the card's height, the most needed first; and what its width allows.(package private) static final classWhat the full card says now, and when that changes next: the pure part. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final float[]The space above each line (dp), as the layout has it.(package private) static final intThe text lines, each a view of the layout.(package private) static final intThree reminders and two calls at most: the card is no list.(package private) static final intThe text lines, each a view of the layout.(package private) static final intThe text lines, each a view of the layout.(package private) static final intThe text lines, each a view of the layout.private static final int[][]private static final int(package private) static final intThe text lines, each a view of the layout.(package private) static final intThe text lines, each a view of the layout.private static final int[]private static final intAn hour's cell, at its narrowest (the layout's minWidth), in dp.private static final int[][](package private) static final intThe next hours beside the weather now, four at most (weather.rs, CARD_HOURS).private static final String[]The weather's icons, as weather.rs names them (Breeze's), and their drawings (tools/make-weather-drawables.py).private static final int[]private static final intprivate static final intprivate static final int[](package private) static final intThe text lines, each a view of the layout.(package private) static final intThe text lines, each a view of the layout.private static final int[][]private static final intprivate static final int[]Kept while the card shrinks, the lowest first: today (the date, the weather now or the line said instead, what now is for) always; then the dose, a "not set up yet", the code, do-not-disturb, the reminders, the calls, two events at once, the step, where you stopped.(package private) static final intThe text lines, each a view of the layout.(package private) static final intThree reminders and two calls at most: the card is no list.private static final float[]Each line's text size (sp) and its most lines, as the layout has them.(package private) static final intThe text lines, each a view of the layout.(package private) static final intThe text lines, each a view of the layout.(package private) static final intThe text lines, each a view of the layout.private static final int[](package private) static final intThe text lines, each a view of the layout.(package private) static final intThe text lines, each a view of the layout. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcell(RemoteViews views, int[] ids, HomeCardToday.Cell cell, boolean day) A cell's views (label, icon, temperature, [low,] rain) said, and its words for screen readers.(package private) static intA weather icon's drawing, by weather.rs's name; one it does not know, "none available".private static StringSome words for screen readers, the empty ones left out: "Rain, 16°, 98 %".(package private) static RemoteViewsviews(Context context, HomeCardToday.Lines lines, Bundle options) The full card at its size: each part kept while it fits, the most needed first (RANKS), and its taps (HomeCard.opener(android.content.Context, java.lang.String), through HomeCardOpener); the rest opens Sioul as its icon does.(package private) static JSONObjectThe item `now` falls in, among items each {from, until}; none.
-
Field Details
-
DATE
The text lines, each a view of the layout.- See Also:
-
WEATHER_LINE
The text lines, each a view of the layout.- See Also:
-
CREDIT
The text lines, each a view of the layout.- See Also:
-
DOSE
The text lines, each a view of the layout.- See Also:
-
CODE
The text lines, each a view of the layout.- See Also:
-
WARNING
The text lines, each a view of the layout.- See Also:
-
REMINDER
The text lines, each a view of the layout.- See Also:
-
CALL
The text lines, each a view of the layout.- See Also:
-
OVERLAP
The text lines, each a view of the layout.- See Also:
-
NOTE
The text lines, each a view of the layout.- See Also:
-
STATUS
The text lines, each a view of the layout.- See Also:
-
DND
The text lines, each a view of the layout.- See Also:
-
STEP
The text lines, each a view of the layout.- See Also:
-
STOPPED
The text lines, each a view of the layout.- See Also:
-
REMINDERS
Three reminders and two calls at most: the card is no list.- See Also:
-
CALLS
Three reminders and two calls at most: the card is no list.- See Also:
-
LINES
- See Also:
-
VIEWS
-
SIZES
Each line's text size (sp) and its most lines, as the layout has them. -
MOST
-
ABOVE
The space above each line (dp), as the layout has it. -
RANKS
Kept while the card shrinks, the lowest first: today (the date, the weather now or the line said instead, what now is for) always; then the dose, a "not set up yet", the code, do-not-disturb, the reminders, the calls, two events at once, the step, where you stopped. The parts of the day and the seven days come before the dose (ranks 1 and 2). -
PARTS_RANK
- See Also:
-
DAYS_RANK
- See Also:
-
LAST_RANK
- See Also:
-
HOURS_SHOWN
The next hours beside the weather now, four at most (weather.rs, CARD_HOURS).- See Also:
-
HOUR_CELLS
-
HOURS
-
HOUR_DP
An hour's cell, at its narrowest (the layout's minWidth), in dp.- See Also:
-
PARTS
-
DAYS
-
ICON_NAMES
The weather's icons, as weather.rs names them (Breeze's), and their drawings (tools/make-weather-drawables.py). -
ICONS
-
-
Constructor Details
-
HomeCardToday
private HomeCardToday()
-
-
Method Details
-
within
The item `now` falls in, among items each {from, until}; none. -
icon
A weather icon's drawing, by weather.rs's name; one it does not know, "none available". -
views
The full card at its size: each part kept while it fits, the most needed first (RANKS), and its taps (HomeCard.opener(android.content.Context, java.lang.String), through HomeCardOpener); the rest opens Sioul as its icon does. -
cell
A cell's views (label, icon, temperature, [low,] rain) said, and its words for screen readers. -
join
Some words for screen readers, the empty ones left out: "Rain, 16°, 98 %".
-