moagrius / TileView

TileView is a subclass of android.view.ViewGroup that asynchronously displays, pans and zooms tile-based images. Plugins are available for features like markers, hotspots, and path drawing.
MIT License
1.46k stars 337 forks source link

add my custom View to the TileView, so that it does not scale? #462

Closed Ox10cx closed 6 years ago

Ox10cx commented 6 years ago

image

How do I get this robot icon not to move without the zoom of the TileView?

RelativeLayout relativeLayout = new RelativeLayout( this ); ImageView logo = new ImageView( this ); logo.setImageResource( R.drawable.logo ); RelativeLayout.LayoutParams logoLayoutParams = new RelativeLayout.LayoutParams( LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT ); logoLayoutParams.addRule( RelativeLayout.CENTER_IN_PARENT ); relativeLayout.addView( logo, logoLayoutParams ); tileView.addView( relativeLayout );

Can you help me ?

moagrius commented 6 years ago

so you want it to scale, but not move? otherwise there are examples in the README for adding both scaling and non-scaling Views...

moagrius commented 6 years ago

this gentle person has provided an example of scaling markers just now: https://github.com/moagrius/TileView/issues/409#issuecomment-360587147