Layout manual edit guide
Добавлено: 16 апр 2012, 10:13
Here is a short layout of how visual screens could be modified (this is not yet supported from UI)
Files *.layout
These describe all the available sections (screens) and their sensors. You can define your sections in file user.layout
This sample defines 3x3 section (rows and cols parameters are used to define number of columns and rows, and their relative width in percents).
Each item - is a separate sensor. Sensor IDs could be found in
in doc/hobdSensors.html or in "All Sensors" screen.
Making hobdrive to display current date/time
1. To replace some non-working sensor with the current Time, you have to edit default-landscape.layout file, and replace
<item id="AirTemp" period='10000'/>
with
<item id="DateTime" custom-units="timesec" units="none"/>
You may configure custom time formats: add attribute
custom-units="datetime"
to the item.
Other values are "date", "time", "timesec", "seconds".
Possible actions
"ChangeLiterCost" - Dialog with fuel price
"FuelCalibration" - Fuel Tank calibration dialog
"SensorInformation" - Sensor information and details dialog
"NewFueling" - New fueling dialog
"NewMaintenance" - New maintenance record dialog
"Minimize" - Minimize
"Shutdown" - Shutdown app
"VehicleSettings" - Vehicle settings dialog
"PortSettings" - Connection settings dialog
"ExtraSettings" - System settings dialog
"EditSensorsLayout" - NOP
"CorrectionInformation" - NOOP
"go(General)" - Switch to screen with specified name
"run(winamp trololo.mp3)" - Run the specific application, on android - run the intent.
Beside "onclick" attribute it is possible to use "ondoubleclick" and "onhold".
Files *.layout
These describe all the available sections (screens) and their sensors. You can define your sections in file user.layout
- Код: Выделить всё
<section name="General" fixed="true">
<grid rows="25,,30" cols="30,,30">
<item id="FuelLevel"/>
<item id="FuelEconomy_trip" size='large'/>
<item id="BatteryVoltage" size='medium' period='5000'/>
This sample defines 3x3 section (rows and cols parameters are used to define number of columns and rows, and their relative width in percents).
Each item - is a separate sensor. Sensor IDs could be found in
in doc/hobdSensors.html or in "All Sensors" screen.
Making hobdrive to display current date/time
1. To replace some non-working sensor with the current Time, you have to edit default-landscape.layout file, and replace
<item id="AirTemp" period='10000'/>
with
<item id="DateTime" custom-units="timesec" units="none"/>
You may configure custom time formats: add attribute
custom-units="datetime"
to the item.
Other values are "date", "time", "timesec", "seconds".
Possible actions
"ChangeLiterCost" - Dialog with fuel price
"FuelCalibration" - Fuel Tank calibration dialog
"SensorInformation" - Sensor information and details dialog
"NewFueling" - New fueling dialog
"NewMaintenance" - New maintenance record dialog
"Minimize" - Minimize
"Shutdown" - Shutdown app
"VehicleSettings" - Vehicle settings dialog
"PortSettings" - Connection settings dialog
"ExtraSettings" - System settings dialog
"EditSensorsLayout" - NOP
"CorrectionInformation" - NOOP
"go(General)" - Switch to screen with specified name
"run(winamp trololo.mp3)" - Run the specific application, on android - run the intent.
Beside "onclick" attribute it is possible to use "ondoubleclick" and "onhold".