大佬教程收集整理的这篇文章主要介绍了java – Mapview上的按钮,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
@Override
public void onCreate(final Bundle savedInstanceStatE) {
super.onCreate(savedInstanceStatE);
// Setup base map
final RelativeLayout rl = new RelativeLayout(this);
CloudmadeUtil.retrieveCloudmadeKey(getApplicationContext());
final MapView osmv = new MapView(this,256);
mymapController = osmv.getController();
rl.addView(osmv,new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT));
osmv.setBuilTinZoomControls(true);
osmv.setMultiTouchControls(true);
myLOCATIOnoverlay = new MyLOCATIOnOverlay(this,osmv);
//*sniP* setup of map,mapcontrollers,tiles etc...
osmv.getOverlays().add(tilesOverlay);
osmv.getOverlays().add(myLOCATIOnoverlay);
this.setContentView(rl);
}
@H_489_1@编辑:
ImageButton goto_LOCATIOn = new ImageButton(this);
goto_LOCATIOn.setOnClickListener(new OnClickListener()
{
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
showMyLOCATIOn();
}
});
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(40,40);
params.rightMargin = 10;
params.topMargin = 10;
rl.addView(goto_LOCATIOn,params);
@H_489_1@如果有人可以在一些关于自定义按钮的好教程/示例上提示我,并以编程方式添加UI元素,我将非常高兴.以上是大佬教程为你收集整理的java – Mapview上的按钮全部内容,希望文章能够帮你解决java – Mapview上的按钮所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。