getTopForegroundActivity

public abstract Activity getTopForegroundActivity()

获取处于前台的最上层 Activity。

Return

当前应用在前台,返回最上层 Activity;当前应用在后台,返回 NULL。