User Tools

Site Tools


manual:advanced:customization:screens

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
manual:advanced:customization:screens [2015/09/03 15:20] mstupkamanual:advanced:customization:screens [2015/09/03 15:56] mstupka
Line 96: Line 96:
  
  
-  * **SlideView** (custom locus view) extends View+  * **SlideView** (custom Locus view) extends View
     * locus:action - attaches to which slide action ... for example locus:action="{orient_course}"     * locus:action - attaches to which slide action ... for example locus:action="{orient_course}"
     * locus:slideImage - reference to a drawable item used for slide     * locus:slideImage - reference to a drawable item used for slide
     * locus:slideStartPosition - position of image pixel that matches //slideStartValue// value.     * locus:slideStartPosition - position of image pixel that matches //slideStartValue// value.
-    * locus:slideStartValue - action value for //slideStartPosition// (in base units, so metres, second, ..) +    * locus:slideStartValue - action value for //slideStartPosition// (in base units metres, seconds, ..) 
-    * locus:slideEndPosition - position value of last image pixel. Also (//slideEndPosition// - //slideStartPosition//) define width of image+    * locus:slideEndPosition - position value of the last image pixel. Also (//slideEndPosition// - //slideStartPosition//) define width of image
     * locus:slideEndValue - action value for //slideEndPosition//     * locus:slideEndValue - action value for //slideEndPosition//
-    * locus:slideInfinite - if slide image should be repeated to cover whole parent view (true/false) [false]+    * locus:slideInfinite - if slide image is repeated to cover whole parent view (true/false) [false]
  
-<WRAP info> +<WRAP round info> 
-**Sample** - let's imagine this image of compass+**Sample** - let's imagine this image of compass
  
-{{:manual:advanced:customization:img_compass_slide.png?nolink|}}+{{ :manual:advanced:customization:img_compass_slide.png?nolink |}}
  
-To make it work in full screen widthyou need to define these parameters+To make it work in full screen width you need to define these parameters:
 <code> <code>
     android:layout_width="match_parent"     android:layout_width="match_parent"
Line 123: Line 123:
 </code> </code>
  
-By this definitionyou say that:+By this definition you say that:
  
-  * 1. if orientation angle will be 180°, first pixel (slideStartPosition) will be drawn really as first pixel. Because is defined whole range (from 0° - 360°and end value have position on the end (//locus:slideEndPosition="match_parent"//), image will be stretched over whole screen. Middle of image (**S**), will be in the middle, as we want! +  * 1. if orientation angle is 180°, the first pixel (slideStartPosition) will be drawn really as the first pixel. Because the defined whole range is from 0° - 360° and end value has position on the end (//locus:slideEndPosition="match_parent"//), image will be stretched over whole screen. Middle of image (**S**), will be in the middle, as we want! 
-  * 2. if orientation will be for example 90°, Locus firstly compute percent part of image that should be moved. It's computed by **(current value - slideStartValue) / (slideEndValue - slideStartValue)**, so in this case it's (90 - 180) / (-180 - 180) = **25%**!. This means that image will be moved by 25%+  * 2. if orientation is for example 90°, Locus Map firstly computes percent part of image that should be moved. It's computed by **(current value - slideStartValue) / (slideEndValue - slideStartValue)**, so in this case it's (90 - 180) / (-180 - 180) = **25%**!. This means that image will be moved by 25%
 </WRAP> </WRAP>
  
 ==== Global attributes ==== ==== Global attributes ====
  
-On all View can be applied these attributes+On all Views can be applied these attributes:
  
   * [[http://developer.android.com/reference/android/view/View.html#attr_android:id|android:id]]   * [[http://developer.android.com/reference/android/view/View.html#attr_android:id|android:id]]
Line 180: Line 180:
   * //{speed}// - GPS speed (0 if GPS off)   * //{speed}// - GPS speed (0 if GPS off)
   
-  * //{rec_dist}// - track recording - recorded sitance+  * //{rec_dist}// - track recording - recorded distance
   * //{rec_dist_down}// - track recording - downhill distance   * //{rec_dist_down}// - track recording - downhill distance
   * //{rec_dist_up}// - track recording - uphill distance   * //{rec_dist_up}// - track recording - uphill distance
manual/advanced/customization/screens.txt · Last modified: 2015/09/03 15:58 by mstupka