Question

I will like to develop an application in Android 4 that shows some gauges, text, images, etc. It will display information read from sensors connected to IOIO board (hardware): - temperature gauges (linear and angular) - horizontal horizon (10Dof IMu) - speed (vertical gauge) - altitud (vertical gauge) - etc...

Basically like a Garmin G1000 but the horizontal horizon will be displayed in a square (not all the screen). For example this image: Garmin G1000 image

The screen will contain text and graphics. Some graphic may change high frequently (horizontal horizon, speed, etc), but other no (temperatures, fuel qty, etc). I was wondering what is the best approach to do it: draw all the screen with canvas, or put text with Textview and graphics with transparent bitmaps, or other options. I will like if someone could say me what he think about the best approach to design it and to organize the visual components. Thanks in advance.

Était-ce utile?

La solution

With android, your design space is quit limited. So for something like that i would suggest nesting some layouts. You'd set one for the background and others for what ever function you wanna do. I also suggest planning what you wanna display and what layout is best optimized for the function.Eg:

  • Use a relative layout to set the landscape background
  • Use the Liner layout for the ruler functions on the sides
  • Use grid layouts for maps maybe
  • Use Split action tabs for the options at the bottom
  • Use menus for calibration settings
  • Use Relative layouts for all the funny gauges moving about and textboxes and stuff.

Then from there it's a matter of making everything work. Here are some links on layouts: Link 1 Link 2

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top