gpt4 book ai didi

java - Android - Activity 生命周期 - 父类(super class)

转载 作者:行者123 更新时间:2023-11-29 09:02:23 24 4
gpt4 key购买 nike

<分区>

@Override
protected void onStop() {
super.onStop(); // Always call the superclass method first

// Save the note's current draft, because the activity is stopping
// and we want to be sure the current note progress isn't lost.
ContentValues values = new ContentValues();
values.put(NotePad.Notes.COLUMN_NAME_NOTE, getCurrentNoteText());
values.put(NotePad.Notes.COLUMN_NAME_TITLE, getCurrentNoteTitle());

getContentResolver().update(
mUri, // The URI for the note to update.
values, // The map of column names and new values to apply to them.
null, // No SELECT criteria are used.
null // No WHERE columns are used.
);
}

这是一个activity生命周期的代码。我不明白在这里使用 super.onStop() 的目的是什么?父类(super class)方法是什么意思?

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com