[英]How to programmatically pause an activity?
如何以編程方式暫停活動? 我有一個通過 Intent 創建活動的 TabHost:
Intent intent; // Reusable Intent for each tab
// Create an Intent to launch an Activity for the tab (to be reused)
intent = new Intent().setClass(this, ARActivity.class);
intent.putExtras(b);
// Initialize a TabSpec for each tab and add it to the TabHost
spec = tabHost.newTabSpec("trending").setIndicator("Trending",res.getDrawable(R.drawable.icon)).setContent(intent);
tabHost.addTab(spec);
我希望能夠在我的選項卡更改時暫停活動。 如何務實地暫停活動?
如果不在視圖中,活動將始終暫停。 在這里閱讀http://developer.android.com/guide/topics/fundamentals.html#actlife
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.