arthurbenemann/droidplanner — pull request #359 by bob01 (2013-10-27 09:41:07+00:00)
Title: Vehicle Profiles: Per vehicle type xml configuration for MissionDialog UI and more

Extension to parameter metadata support.
Goal was to customize mission dialogs by vehicle type (ArduCopter, ArduPlane, ArduRover, etc) without littering the code with conditional statements.
```
final VehicleProfile profile = VehicleProfile.load(context, vehicleType);
if(profile != null)
profile.applyMissionDialogProfile(view, getResource());
```
The code above was added to the DialogMission super class and applies the vehicles ViewProfiles to the DialogMission's view. A ViewProfile changes the properties of the view it identifies to do the following...
- hide UI not relevant to selected vehicle type
- hide UI for features not currently supported by vehicle type
- set ranges, increments etc to values best suited by vehicle type to make sliders easier to set
- view
- replace the descriptive text with vehicle relevant text
- advanced users can supply their own profiles with personalized settings for all of the above by placing .xml in the 'DroidPlanner\VehicleProfiles' directory. Files placed in this directory will override the stock resources.

ViewProfiles may be globally scoped (apply to all dialogs) or dialog scoped (apply to identified dialog only).
See sample ArduCopter.xml below.

Settings etc.:
- user selectable VehicleType - Settings -> Advanced -> Vehicle Type for selecting vehicle type when disconnected (replaces parameter metadata setting). Default: ArduCopter
- auto-selection of VehicleType when connected to vehicle
- parameter metadata type (for ParameterMetaData.xml) contained in VehicleProfile
- will add vehicle specific attributes like default speed (for mission time calculation) etc

Sample VehicleProfiles/ArduCopter.xml
```

```

Vehicle specific UI with ArduCopter selected ( ArduPlane and Rover will appear unchanged, their profiles are empty )
![screenshot_2013-10-27-04-46-51](https://f.cloud.github.com/assets/4014433/1415227/8f70867a-3eea-11e3-87b3-084e7b3505b7.png)

![screenshot_2013-10-27-04-47-08](https://f.cloud.github.com/assets/4014433/1415228/9d38a8be-3eea-11e3-96f7-a80755141c4e.png)

![screenshot_2013-10-27-03-59-57](https://f.cloud.github.com/assets/4014433/1415230/a84b04e0-3eea-11e3-8965-653037dfa8fa.png)