out of memory
------------------------------------------------------------------------------------------------------------------------------
mapView.
setBuiltInZoomControls
(
true
);
ZoomButtonsController
zoomctrl
=
mapView
.
getZoomButtonsController
();
zoomctrl
.
setAutoDismissed
(
false
);
//自动隐藏关闭
zoomctrl
.
setVisible
(
true
);
zoomctrl
.
setOnZoomListener
(
new
ZoomButtonsController
.
OnZoomListener
()
{
public
void
onZoom
(
boolean
zoomIn
)
{
// TODO Auto-generated method stub
try
{
Log
.
i
(
TAG
,
"OnZoomListener"
);
System
.
gc
();
if
(
zoomIn
)
{
mc
.
zoomIn
();
}
else
{
mc
.
zoomOut
();
}
System
.
gc
();
}
catch
(
OutOfMemoryError
e
)
{
e
.
printStackTrace
();
Log
.
e
(
TAG
,
e
.
toString
());
Toast
.
makeText
(
GoogleMap
.
this
,
e
.
toString
(),
Toast
.
LENGTH_LONG
);
}
catch
(
Exception
e
)
{
Log
.
w
(
TAG
,
e
.
toString
());
Toast
.
makeText
(
GoogleMap
.
this
,
e
.
toString
(),
Toast
.
LENGTH_LONG
);
}
}
public
void
onVisibilityChanged
(
boolean
visible
)
{
// TODO Auto-generated method stub
}
});
private
boolean
myDoubleTouch
(
float
x
,
float
y
,
MapView
mapView
)
{
Log
.
i
(
mParent
.
TAG
,
"myDoubleTouch: "
+
x
+
","
+
y
);
try
{
mapView
.
getController
().
zoomInFixing
((
int
)
x
,
(
int
)
y
);
}
catch
(
OutOfMemoryError
e
)
{
System
.
gc
();
e
.
printStackTrace
();
Log
.
e
(
mParent
.
TAG
,
e
.
toString
());
Toast
.
makeText
(
m_mapview
.
getContext
(),
e
.
toString
(),
Toast
.
LENGTH_LONG
);
}
catch
(
Exception
e
)
{
Log
.
w
(
mParent
.
TAG
,
e
.
toString
());
Toast
.
makeText
(
m_mapview
.
getContext
(),
e
.
toString
(),
Toast
.
LENGTH_LONG
);
}
return
true
;
}
来自 : http://wang-peng1.iteye.com/blog/668166
分享到:
相关推荐
解决Out of memory问题,玩游戏的童鞋遇到的问题,希望能帮到那些遇到此类问题的童鞋
tomcat out of memory,近来web经常out of memory down机,查找的一些资料
Out of memory-cannot load design mode
java OutOfMemory的一个解决方法
Out of memory,insufficient memory to continue.
最近在跑程序,然后Pycharm就跳出out of memory 的错误提示,可能是由于读取的数据太多导致的,Pycharm有一个默认内存的最大容量上线,跳出提示的是1024M,也就是分配给Pycharm的内内存不够啦! 一、说明: pycharm...
一次奇怪的Out of Memory 分析(附图)
NULL 博文链接:https://keren021.iteye.com/blog/1163165
NULL 博文链接:https://boyseegirl.iteye.com/blog/1729527
tomcat out of memory solution
android bitmap outofMemory 用来解决android中常见的bitmap outOfMemory
Out of memory (Needed 16777224 bytes)的错误解决 看看手册: [url]http://dev.mysql.com/doc/refman/5.1/en/memory-storage-engine.html[/url] 开始我更改了query_cache_size的值。 好像也不行。 之后 增大query_...
今天发现网站有点慢,发现mysql日志中提示mysqld-nt: Out of memory (Needed 1677720 bytes),经排查是由于最近调整了mysql的一些参数导致,以为内存大就不怕了,32位系统真心内容利用率很低,据说不超过4G,我们的...
最近公司将内部使用的代码由svn迁到了git上,所以也必须学者使用Git命令。 虽说git的模式和svn区别很大,但想必也不是什么难事。...fatal: Out of memory, malloc failed (tried to allocate 1941159936 b
今天小编就为大家分享一篇解决Python运行文件出现out of memory框的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
out of memory是什么意思.docx
Android完美解决GridView异步加载图片和加载大量图片时出现Out Of Memory问题