Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道 Android 中的“最近任务”列表如何填充它显示在每个应用程序旁边的名称?我想将其从启动器活动的名称更改为其他名称。
阅读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
这对我有用。
if (Build.VERSION.SDK_INT>=21){ setTaskDescription(new ActivityManager.TaskDescription(name)); }