Creating Custom Layouts
8 Creating Custom Layouts
Custom layouts are created by specifying the layout string manually. The
layout string is a sequence of numbers separated with semicolon (;) and
containing five numbers for each view that you want to appear in the
layout.
The first number in each group of five specifies the module type:
•
0 – List view
•
1 – Map view
•
2 – Polar view
•
3 – Single Satellite view
•
4 – Upcoming Passes view
The remaining four numbers in the group
of five specify the coordinates of the view
in an invisible grid. The size of the grid is
dynamic in the sense that it is determined
at runtime according to the coordinates in
the layout string.
The coordinate system in the layout grid
has its origin (0,0) in the upper left
corner, see figure 8.1. The coordinates for
a view are specified using a LEFT,
RIGHT, TOP, BOTTOM sequence.
Thus, if we want to place a map view in
the upper 2/3 part of the grid on figure 8.1 the complete 5-digit sequence
would be:
1;0;3;0;2
This is interpreted as
“Place a map view in the grid with top-left coordinate
at (0,0) and bottom-right coordinate at (3,2)”
.
Similarly, to put list view in the lower 1/3 part of the grid, the sequence
would be:
0;0;2;2;3
The complete sequence would end up being:
67