本文整理汇总了Java中com.qozix.tileview.TileView类的典型用法代码示例。如果您正苦于以下问题:Java TileView类的具体用法?Java TileView怎么用?Java TileView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TileView类属于com.qozix.tileview包,在下文中一共展示了TileView类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onMarkerTap
import com.qozix.tileview.TileView; //导入依赖的package包/类
@Override
public void onMarkerTap( View view, int x, int y ) {
// get reference to the TileView
TileView tileView = getTileView();
// we saved the coordinate in the marker's tag
double[] position = (double[]) view.getTag();
// lets center the screen to that coordinate
tileView.slideToAndCenter( position[0], position[1] );
// create a simple callout
SampleCallout callout = new SampleCallout( view.getContext() );
// add it to the view tree at the same position and offset as the marker that invoked it
tileView.addCallout( callout, position[0], position[1], -0.5f, -1.0f );
// a little sugar
callout.transitionIn();
// stub out some text
callout.setTitle( "MAP CALLOUT" );
callout.setSubtitle( "Info window at coordinate:\n" + position[1] + ", " + position[0] );
}
开发者ID:moagrius,项目名称:TileView,代码行数:19,代码来源:RealMapTileViewActivity.java
示例2: onCreate
import com.qozix.tileview.TileView; //导入依赖的package包/类
@Override
public void onCreate( Bundle savedInstanceState ) {
super.onCreate( savedInstanceState );
tileView = new TileView( this );
/**
* Set an id. This is necessary to enable the save state mechanism of Android.
* It is retrieved from a resource value, but it can also be generated with
* {@code View.generateViewId()}.
*/
tileView.setId( R.id.tileview_id );
tileView.setSaveEnabled( true );
// use our own custom bitmap provider to access Android internal storage
tileView.setBitmapProvider( new BitmapProviderInternalStorage() );
setContentView( tileView );
}
开发者ID:firefly2442,项目名称:ArmaConnect,代码行数:19,代码来源:TileViewActivity.java
示例3: frameTo
import com.qozix.tileview.TileView; //导入依赖的package包/类
public void frameTo(final int x, final int y) {
final TileView tile = getTileView();
tile.post(new Runnable() {
@Override
public void run() {
tile.slideToAndCenterWithScale(
(0 - imageBounds.left * (int) MAX_SCALE) + (x * (int) MAX_SCALE),
(0 - imageBounds.top * (int) MAX_SCALE) + (y * (int) MAX_SCALE),
MAX_SCALE);
}
});
}
开发者ID:bvblogic,项目名称:Mediator_Android,代码行数:13,代码来源:MapFragment.java
示例4: init
import com.qozix.tileview.TileView; //导入依赖的package包/类
/**
* This must be called when the {@link MapViewFragment} is ready to update its UI.
* <p>
* The caller is responsible for removing this {@link MapLoader.MapRouteUpdateListener} from the
* {@link MapLoader}, after this object is no longer used.
*/
public void init(Map map, TileView tileView) {
mMap = map;
setTileView((TileViewExtended) tileView);
MapLoader.getInstance().setMapRouteUpdateListener(this);
if (mMap.areRoutesDefined()) {
drawRoutes();
} else {
MapLoader.getInstance().getRoutesForMap(mMap);
}
}
开发者ID:peterLaurence,项目名称:TrekAdvisor,代码行数:18,代码来源:RouteLayer.java
示例5: setTileViewBounds
import com.qozix.tileview.TileView; //导入依赖的package包/类
private void setTileViewBounds(TileView tileView, Map map) {
Map.MapBounds mapBounds = map.getMapBounds();
if (mapBounds != null) {
tileView.defineBounds(mapBounds.X0,
mapBounds.Y0,
mapBounds.X1,
mapBounds.Y1);
} else {
tileView.defineBounds(0, 0, 1, 1);
}
}
开发者ID:peterLaurence,项目名称:TrekAdvisor,代码行数:12,代码来源:MapViewFragment.java
示例6: setTileView
import com.qozix.tileview.TileView; //导入依赖的package包/类
private void setTileView(final TileView tileView) {
mTileView = tileView;
mTileView.setMarkerTapListener(new MarkerLayout.MarkerTapListener() {
@Override
public void onMarkerTap(View view, int x, int y) {
if (view instanceof MovableMarker) {
MovableMarker movableMarker = (MovableMarker) view;
/* Prepare the callout */
MarkerCallout markerCallout = new MarkerCallout(mContext);
markerCallout.setMoveAction(new MorphMarkerRunnable(movableMarker, markerCallout,
mTileView, mContext, mMap));
markerCallout.setEditAction(new EditMarkerRunnable(movableMarker, MarkerLayer.this,
markerCallout, mTileView, mRequestManageMarkerListener));
markerCallout.setDeleteAction(new DeleteMarkerRunnable(mParentView, movableMarker, markerCallout,
tileView, mMap));
MarkerGson.Marker marker = movableMarker.getMarker();
markerCallout.setTitle(marker.name);
markerCallout.setSubTitle(marker.lat, marker.lon);
mTileView.addCallout(markerCallout, movableMarker.getRelativeX(), movableMarker.getRelativeY(), -0.5f, -1.2f);
markerCallout.transitionIn();
}
}
});
}
开发者ID:peterLaurence,项目名称:TrekAdvisor,代码行数:28,代码来源:MarkerLayer.java
示例7: init
import com.qozix.tileview.TileView; //导入依赖的package包/类
/**
* Triggers the fetch of the map's markers and their drawing on the {@link TileView}. If this is
* the first time this method is called for this map, the markers aren't defined and the
* {@link MapLoader} will get them in an asynctask. Otherwise, we can draw them immediately.
* <p>
* This must be called when the {@link MapViewFragment} is ready to update its UI.
* <p>
* The caller is responsible for removing this {@link MapLoader.MapMarkerUpdateListener} from
* the {@link MapLoader}, after this object is no longer used.
*/
public void init(Map map, TileView tileView) {
mMap = map;
setTileView(tileView);
MapLoader.getInstance().setMapMarkerUpdateListener(this);
if (mMap.areMarkersDefined()) {
drawMarkers();
} else {
MapLoader.getInstance().getMarkersForMap(mMap);
}
}
开发者ID:peterLaurence,项目名称:TrekAdvisor,代码行数:22,代码来源:MarkerLayer.java
示例8: MovableMarkerClickCallback
import com.qozix.tileview.TileView; //导入依赖的package包/类
MovableMarkerClickCallback(MovableMarker movableMarker, MarkerGrab markerGrab,
TileView tileView, Map map) {
mMovableMarkerWeakReference = new WeakReference<>(movableMarker);
mMarkerGrabWeakReference = new WeakReference<>(markerGrab);
mTileView = tileView;
mMap = map;
}
开发者ID:peterLaurence,项目名称:TrekAdvisor,代码行数:8,代码来源:MarkerLayer.java
示例9: MorphMarkerRunnable
import com.qozix.tileview.TileView; //导入依赖的package包/类
MorphMarkerRunnable(MovableMarker movableMarker, MarkerCallout markerCallout, TileView tileView,
Context context, Map map) {
mMovableMarkerWeakReference = new WeakReference<>(movableMarker);
mMarkerCalloutWeakReference = new WeakReference<>(markerCallout);
mTileView = tileView;
mContext = context;
mMap = map;
}
开发者ID:peterLaurence,项目名称:TrekAdvisor,代码行数:9,代码来源:MarkerLayer.java
示例10: EditMarkerRunnable
import com.qozix.tileview.TileView; //导入依赖的package包/类
EditMarkerRunnable(MovableMarker movableMarker, MarkerLayer markerLayer,
MarkerCallout markerCallout, TileView tileView,
MapViewFragment.RequestManageMarkerListener listener) {
mMovableMarkerWeakReference = new WeakReference<>(movableMarker);
mMarkerLayerWeakReference = new WeakReference<>(markerLayer);
mMarkerCalloutWeakReference = new WeakReference<>(markerCallout);
mTileView = tileView;
mListenerWeakRef = new WeakReference<>(listener);
}
开发者ID:peterLaurence,项目名称:TrekAdvisor,代码行数:10,代码来源:MarkerLayer.java
示例11: DeleteMarkerRunnable
import com.qozix.tileview.TileView; //导入依赖的package包/类
DeleteMarkerRunnable(View parentView, MovableMarker movableMarker, MarkerCallout markerCallout,
TileView tileView, Map map) {
mParentView = parentView;
mMovableMarkerWeakReference = new WeakReference<>(movableMarker);
mMarkerCalloutWeakReference = new WeakReference<>(markerCallout);
mTileView = tileView;
mMap = map;
}
开发者ID:peterLaurence,项目名称:TrekAdvisor,代码行数:9,代码来源:MarkerLayer.java
示例12: MarkerTouchMoveListener
import com.qozix.tileview.TileView; //导入依赖的package包/类
public MarkerTouchMoveListener(TileView tileView, MarkerMoveCallback markerMoveCallback,
MarkerClickCallback markerClickCallback) {
mTileView = tileView;
mGestureDetector = new GestureDetector(tileView.getContext(), this);
mMarkerMoveCallback = markerMoveCallback;
mMarkerClickCallback = markerClickCallback;
CoordinateTranslater coordinateTranslater = tileView.getCoordinateTranslater();
mLeftBound = coordinateTranslater.getLeft();
mRightBound = coordinateTranslater.getRight();
mTopBound = coordinateTranslater.getTop();
mBottomBound = coordinateTranslater.getBottom();
}
开发者ID:peterLaurence,项目名称:TrekAdvisor,代码行数:14,代码来源:MarkerTouchMoveListener.java
示例13: moveCalibrationMarker
import com.qozix.tileview.TileView; //导入依赖的package包/类
/**
* Before telling the {@link TileView} to move a marker, we save its relative coordinates so we
* can use them later on calibration save.
*/
private static void moveCalibrationMarker(TileView tileView, View view, double x, double y) {
CalibrationMarker calibrationMarker = (CalibrationMarker) view;
calibrationMarker.setRelativeX(x);
calibrationMarker.setRelativeY(y);
tileView.moveMarker(view, x, y);
}
开发者ID:peterLaurence,项目名称:TrekAdvisor,代码行数:11,代码来源:MapCalibrationFragment.java
示例14: placeMarker
import com.qozix.tileview.TileView; //导入依赖的package包/类
private void placeMarker(TileView tileView, Context context, int resId, double x, double y) {
Log.wtf("", "adding " + x + " " + y);
ImageView imageView = new ImageView(context);
imageView.setImageResource(resId);
double scale = tileView.getScale();
this.view = tileView.addMarker(imageView, x/scale, y/scale);
}
开发者ID:katanagari7c1,项目名称:EE23_FastAndroid,代码行数:8,代码来源:Marker.java
示例15: onCreate
import com.qozix.tileview.TileView; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tileView = (TileView)findViewById(R.id.tile_view);
tooltipLayout = (ToolTipRelativeLayout)findViewById(R.id.tooltip_layout);
initializeTileView();
setupFAB();
}
开发者ID:katanagari7c1,项目名称:EE23_FastAndroid,代码行数:13,代码来源:Main.java
示例16: onCreate
import com.qozix.tileview.TileView; //导入依赖的package包/类
@Override
public void onCreate( Bundle savedInstanceState ) {
super.onCreate( savedInstanceState );
// multiple references
TileView tileView = getTileView();
// let the image explode
tileView.setScaleLimits( 0, 2 );
// size of original image at 100% mScale
tileView.setSize( 2835, 4289 );
// detail levels
tileView.addDetailLevel( 1.000f, "tiles/painting/1000/%d_%d.jpg");
tileView.addDetailLevel( 0.500f, "tiles/painting/500/%d_%d.jpg");
tileView.addDetailLevel( 0.250f, "tiles/painting/250/%d_%d.jpg");
tileView.addDetailLevel( 0.125f, "tiles/painting/125/%d_%d.jpg");
// set mScale to 0, but keep scaleToFit true, so it'll be as small as possible but still match the container
tileView.setScale( 0 );
// let's use 0-1 positioning...
tileView.defineBounds( 0, 0, 1, 1 );
// frame to center
frameTo( 0.5, 0.5 );
// render while panning
tileView.setShouldRenderWhilePanning( true );
// disallow going back to minimum scale while double-taping at maximum scale (for demo purpose)
tileView.setShouldLoopScale( false );
}
开发者ID:moagrius,项目名称:TileView,代码行数:36,代码来源:LargeImageTileViewActivity.java
示例17: onCreate
import com.qozix.tileview.TileView; //导入依赖的package包/类
@Override
public void onCreate( Bundle savedInstanceState ) {
super.onCreate( savedInstanceState );
// multiple references
TileView tileView = getTileView();
// size of original image at 100% mScale
tileView.setSize( 4015, 4057 );
// we're running from assets, should be fairly fast decodes, go ahead and render asap
tileView.setShouldRenderWhilePanning( true );
// detail levels
tileView.addDetailLevel( 1.000f, "tiles/fantasy/1000/%d_%d.jpg");
tileView.addDetailLevel( 0.500f, "tiles/fantasy/500/%d_%d.jpg");
tileView.addDetailLevel( 0.250f, "tiles/fantasy/250/%d_%d.jpg");
tileView.addDetailLevel( 0.125f, "tiles/fantasy/125/%d_%d.jpg" );
// allow scaling past original size
tileView.setScaleLimits( 0, 2 );
// lets center all markers both horizontally and vertically
tileView.setMarkerAnchorPoints( -0.5f, -0.5f );
// individual markers
placeMarker( R.drawable.fantasy_elves, 1616, 1353 );
placeMarker( R.drawable.fantasy_humans, 2311, 2637 );
placeMarker( R.drawable.fantasy_dwarves, 2104, 701 );
placeMarker( R.drawable.fantasy_rohan, 2108, 1832 );
placeMarker( R.drawable.fantasy_troll, 3267, 1896 );
// frame the troll
frameTo( 3267, 1896 );
}
开发者ID:moagrius,项目名称:TileView,代码行数:38,代码来源:FictionalMapTileViewActivity.java
示例18: onCreate
import com.qozix.tileview.TileView; //导入依赖的package包/类
@Override
public void onCreate( Bundle savedInstanceState ) {
super.onCreate( savedInstanceState );
tileView = new TileView( this );
/**
* Set an id. This is necessary to enable the save state mechanism of Android.
* It is retrieved from a resource value, but it can also be generated with
* {@code View.generateViewId()}.
*/
tileView.setId( R.id.tileview_id );
tileView.setSaveEnabled( true );
setContentView( tileView );
}
开发者ID:moagrius,项目名称:TileView,代码行数:16,代码来源:TileViewActivity.java
示例19: getTileView
import com.qozix.tileview.TileView; //导入依赖的package包/类
@Override
public TileView getTileView() {
return tileView;
}
开发者ID:bvblogic,项目名称:Mediator_Android,代码行数:5,代码来源:PlanFragment.java
示例20: iniUI
import com.qozix.tileview.TileView; //导入依赖的package包/类
private void iniUI(View root) {
tileView = (TileView) root.findViewById(R.id.map);
rvStandsList = (CenteringRecyclerView) root.findViewById(R.id.rv_stands_list);
}
开发者ID:bvblogic,项目名称:Mediator_Android,代码行数:5,代码来源:PlanFragment.java
注:本文中的com.qozix.tileview.TileView类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论