1
我需要删除Activity onPause事件上的Google地图片段并将其添加回onResume事件。我怎样才能做到这一点 ?Android - 删除谷歌地图片段OnPause并加回onResume
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/mapContainer"
tools:context=".MainActivity" >
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"/>
</RelativeLayout>
需要它Android Performance Issue- TabHost - Timer - SetCurrentTab() - Google Maps Api V2
编辑:
其实我做到了。但仍有延迟问题。我怎样才能停止/关闭回栈的意图?
编辑:
另外我现在试图删除并重新添加片段请参阅本 - >https://stackoverflow.com/questions/16275349/android-add-supportfragment-and-get-it-back-from-its-tag-null
我有一个问题,你如何删除tabhost? – yams 2013-06-27 22:00:10
只需将其替换为活动,一个用于加载,另一个用于制表符。 – 2013-06-29 16:00:32
你是什么意思,你有一个例子。 – yams 2013-06-29 17:44:50