自动化零件商城(www.rssme.com)专业PLC,变频器,直线模组,触摸屏,控制器,传感器等自动化商品网上购物商城,为广大中小工业企业提供优质、低价格和种类齐全的自动化零件。
文章目录

前言

ActivityThread.java是有Activity的生命周期方法。

以前写的,重新摘录于此

正文

androidp\frameworks\base\core\java\android\app\ActivityThread.java

performResumeActivity

/**
 * Resume the activity.
 * @param token Target activity token.
 * @param finalStateRequest Flag indicating if this is part of final state resolution for a
 *                          transaction.
 * @param reason Reason for performing the action.
 *
 * @return The {@link ActivityClientRecord} that was resumed, {@code null} otherwise.
 */
@VisibleForTesting
public ActivityClientRecord performResumeActivity(IBinder token, boolean finalStateRequest,
        String reason) {
         
         //这里表示Activity进入前台了,可以写属性或广播给需要的
         
}

performPauseActivity

/**
 * Pause the activity.
 * @return Saved instance state for pre-Honeycomb apps if it was saved, {@code null} otherwise.
 */
private Bundle performPauseActivity(ActivityClientRecord r, boolean finished, String reason,
        PendingTransactionActions pendingActions) {
        //这里表示Activity进入后台了
}

当然也有其他的执行方法,这里不细说。

参考文章

相关文章

自动化零件商城(www.rssme.com)专业PLC,变频器,直线模组,触摸屏,控制器,传感器等自动化商品网上购物商城,为广大中小工业企业提供优质、低价格和种类齐全的自动化零件。

暂无评论

评论审核已启用。您的评论可能需要一段时间后才能被显示。

none
暂无评论...