2

有谁知道 Android 中的“最近任务”列表如何填充它显示在每个应用程序旁边的名称?我想将其从启动器活动的名称更改为其他名称。

4

2 回答 2

3

阅读RecentsPanelView 源代码(参考1),它似乎只需要包的标签。这似乎是你唯一可以改变的。

参考 1: http: //grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/com/android/systemui/recent/RecentsPanelView.java#RecentsPanelView.TaskDescriptionAdapter .getView%28int%2Candroid.view.View%2Candroid.view.ViewGroup%29

于 2013-12-07T01:20:26.073 回答
2

这对我有用。

    if (Build.VERSION.SDK_INT>=21){
        setTaskDescription(new ActivityManager.TaskDescription(name));
    }
于 2018-08-02T12:14:16.507 回答