腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
2
回答
当
onDestroy
()
调用
onDestroy
()时,如何
调用
onDestroy
()?
android
、
android-lifecycle
Intent(MainActivity.this, SubActivity.class)); } protected void
onDestroy
() { }MainActivity中的这个按钮可以启动SubActivity。(new Intent(SubActivity.this, MainActivity.class));} 在SubActivity中,按后退按钮,它不会
调用
SubA
浏览 4
提问于2020-01-30
得票数 1
回答已采纳
2
回答
OnDestroy
()多次
调用
android
我注意到片段的
onDestroy
()方法被多次
调用
--为什么会这样呢?我只想打一个电话。
浏览 6
提问于2013-12-05
得票数 1
回答已采纳
1
回答
stopSelf()没有
调用
onDestroy
()
android
、
service
} } public void
onDestroy
() { } 我正在学习Android中的Service。但是,当在循环中编写时,即使满足条件,也不会
调用
stopSelf()。并且在循环完成后服务被销毁。我在网上搜索,但找不到任何解决方案。
浏览 50
提问于2020-07-06
得票数 0
1
回答
立即
调用
服务
onDestroy
()
android
、
android-service
、
android-notifications
, mkeepAlivePendingIntent);有了这段代码,onDestory会立即被
调用
free 14466K/15272K, paused 28ms, total 28ms我已经研究了以下堆栈溢出问题,到目前为止还没有任何帮助
浏览 1
提问于2014-05-28
得票数 0
1
回答
从IntentService
调用
onDestroy
android
为此,我从IntentService中的
onDestroy
()方法启动MainActivity类,但服务没有启动。我已经在“宣言”上注册了。当我将代码放在
onDestroy
中的onStop()中时,服务就启动了。
onDestroy
in MainActivity:protected void
onDestroy
() { WifiManager
浏览 3
提问于2015-08-25
得票数 6
4
回答
调用
服务的
onDestroy
()
android
、
android-service
我想打电话 我已经在网上搜索了很多,很多答案都是编辑:我已经用这个代码
浏览 8
提问于2014-07-18
得票数 5
3
回答
被
调用
的
onDestroy
android
、
android-activity
、
background
、
ondestroy
我不知道
onDestroy
()的行为。我的问题是:不
调用
onDestroy
()而不杀死漏洞应用程序,是否有可能杀死某个活动?我的意思是,我会回到我的应用程序(除了启动程序
调用
的活动以外的其他活动),在没有
调用
onDestroy
()的情况下,一个活动就被杀死了吗?我有一个需要知道的是,如果我从背景回到一个活动,我的一些活动是不可能在没有
onDestroy
的情况下被杀死的。 谢谢!
浏览 3
提问于2013-07-28
得票数 1
回答已采纳
2
回答
onDestroy
从未
调用
过
android
、
ondestroy
我在MainActivity.java文件中添加了以下代码,但从未
调用
onDestroy
()。有什么办法让破坏事件发生吗?savedInstanceState); } protected void
onDestroy
() { }AndroidManifest.xml <?
浏览 1
提问于2016-05-04
得票数 0
回答已采纳
2
回答
Android:
调用
服务的super.
onDestroy
()在
onDestroy
()之外
android
、
handler
、
ondestroy
我已经实现了像这样的 public void
onDestroy
(){ fade_handler.post(fade_out);super.
onDestroy
(); 这里是fade_out Runnable public voidplayer.release(); //here sh
浏览 5
提问于2012-02-09
得票数 0
回答已采纳
2
回答
在
调用
startActivityForResult()时
调用
onDestroy
()
android
、
android-intent
我想检查是否启用了全球定位系统,但由于某些原因,不仅从
调用
活动
调用
onStop(),而且还
调用
onDestroy
,当我从设置返回时,我到达主屏幕,因为活动已被销毁。这是一个简单的
调用
: Intent intent = new Intent("android.settings.LOCATION_SOURCE_SETTINGS我也试着从PreferenceActivity
调用
Intent,但这个
调用</e
浏览 0
提问于2011-11-09
得票数 3
回答已采纳
1
回答
ActivityThread.java空指针异常
android
、
android-activity
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:754)@Override super.
onDestroy
(); clearHandlerCallbacks
浏览 1
提问于2018-04-20
得票数 2
1
回答
接收器中不存在
onDestroy
方法。替代方案是什么?
android
broadcasts并取消注册,如下所示 public void
onDestroy
() { } 但是我遇到了一些问题,当我注销接收器,但接收器没有
浏览 1
提问于2012-10-15
得票数 0
回答已采纳
2
回答
CountDownTimer不让我
调用
onDestroy
android
、
sdk
、
ondestroy
、
countdowntimer
我已经做了和简单的倒计时计时器应用程序,但当我试图使
onDestroy
取消倒计时计时器,我得到和错误。我的
onDestroy
代码块: public void
onDestroy
() super.
onDestroy
(); countdowntimer.cancel12-18 19:16:06.383: E/AndroidRuntime(25512): at com.android.SquirellMusic.SquirellMusicActivi
浏览 2
提问于2011-12-19
得票数 2
3
回答
调用
"finish()“不触发
onDestroy
java
、
android
、
android-intent
、
android-lifecycle
我输入活动C,但是控制台上没有写活动A和B被销毁,即使我在活动B中
调用
了方法finish()。编辑2为什么当finish()从onStop()
调用
时不
调用
onStop()方法?;当finish()方法退出onStop()时,通常会
调用
onDestroy
()。 这是正常的[按设计的]吗?
浏览 11
提问于2016-03-13
得票数 2
4
回答
Android NavigationView
onDestroy
未
调用
android
、
android-fragments
、
android-navigationview
、
event-bus
、
greenrobot-eventbus
视图层次结构在下面解释, 导航View> B 我怎么才能解决这个问题?
浏览 3
提问于2016-11-25
得票数 2
3
回答
无法破坏活动IllegalStateException
android
、
android-service
、
android-mediaplayer
、
illegalstateexception
、
ondestroy
我的主要活动有一个选项菜单,其中包含单个项目"exit“onOptionsItemSelected
调用
另一个方法(mp和MediaPlayer在服务中的实例)。private void exitPlayer() {
onDestroy
();
onDestroy
方法简单protected void
onDestroy
() { if (!
浏览 4
提问于2013-11-11
得票数 2
回答已采纳
1
回答
是什么导致以下代码中的内存泄漏或崩溃?
android
forceUpdateTextSize(); } } { } super.
onDestroy
浏览 3
提问于2013-08-15
得票数 0
回答已采纳
1
回答
调用
特定活动时
调用
的
onDestroy
()
android
、
android-activity
、
ondestroy
对于包含
onDestroy
方法删除的sharedPreferences方法(),我有问题。这种方法使我的欢迎屏幕只出现一次每次应用程序的打开。只有当按下出口按钮并正常工作时,我才叫它。但是,在我创建了一个名为Daftar_Isi或目录(英文)的新活动,包含列表视图之后,它可以很好地工作到目标活动,但它也
调用
了
onDestroy
方法,这会导致我的main.xml / main活动再次显示欢迎屏幕我认为列表视图活动中的列表
调用
了
onDestroy
方法。 我想设置活动,可以打开目标活动,而无需
浏览 2
提问于2016-02-25
得票数 0
回答已采纳
3
回答
onDestroy
()并不总是被
调用
android
、
activity-lifecycle
、
ondestroy
目前,我在
onDestroy
()方法中
调用
这个deleteTempFile()方法。但是,正如我在开发人员指南中发现的那样,它不能保证在应用被终止时会被
调用
。实现这一目标的正确方法应该是什么?请注意,当我们按下主页按钮,然后再次长按它来获得任务管理器并滑动应用程序来杀死它时,
onDestroy
不会被
调用
。
浏览 0
提问于2013-12-09
得票数 2
3
回答
为什么
调用
onDestroy
()方法?
android
、
timer
、
ondestroy
; super.
onDestroy
();i.putE
浏览 1
提问于2011-11-24
得票数 4
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
拘于小节的调用权限——函数调用权限漏洞
php 调用 docker 服务
gdb 如何调用函数?
如何调用标签模板
OpenAI函数调用实例
热门
标签
更多标签
活动推荐
运营活动
广告
关闭
领券