コード例 #1
0
ファイル: TileView.java プロジェクト: peterLaurence/TileView
 /**
  * Add a callout to the the TileView. The callout can be any View. No LayoutParams are required;
  * the View will be laid out using WRAP_CONTENT for both width and height, and positioned
  * according to the x and y values supplied. Callout views will always be positioned at the top of
  * the view tree (at the highest z-index), and will always be removed during any touch event that
  * is not consumed by the callout View.
  *
  * @param view View instance to be added to the TileView.
  * @param x Relative x position the View instance should be positioned at.
  * @param y Relative y position the View instance should be positioned at.
  * @param anchorX The x-axis position of a callout view will be offset by a number equal to the
  *     width of the callout view multiplied by this value.
  * @param anchorY The y-axis position of a callout view will be offset by a number equal to the
  *     height of the callout view multiplied by this value.
  * @return The View instance added to the TileView.
  */
 public View addCallout(View view, double x, double y, Float anchorX, Float anchorY) {
   return mCalloutLayout.addMarker(
       view,
       mCoordinateTranslater.translateX(x),
       mCoordinateTranslater.translateY(y),
       anchorX,
       anchorY);
 }
コード例 #2
0
ファイル: TileView.java プロジェクト: peterLaurence/TileView
 /**
  * Moves an existing marker to another position.
  *
  * @param view The marker View to be repositioned.
  * @param x Relative x position the View instance should be positioned at.
  * @param y Relative y position the View instance should be positioned at.
  */
 public void moveMarker(View view, double x, double y) {
   mMarkerLayout.moveMarker(
       view, mCoordinateTranslater.translateX(x), mCoordinateTranslater.translateY(y));
 }