当前位置:   article > 正文

Android系统开发-选择并启动默认Launcher,书籍+视频+学习笔记+技能提升资源库_android启动launcher resolverlistadapter

android启动launcher resolverlistadapter

启动

最开始提到了Launcher选择弹窗,我们就考虑在这里做点事,把弹窗的逻辑给跳过,就可以实现默认启动。

弹窗源码位于frameworks/base/core/java/com/android/internal/app/ResolverActivity.java

在这里就不具体分析源码了,就看关键部分

public boolean configureContentView(List payloadIntents, Intent[] initialIntents,
List rList, boolean alwaysUseOption) {
// The last argument of createAdapter is whether to do special handling
// of the last used choice to highlight it in the list. We need to always
// turn this off when running under voice interaction, since it results in
// a more complicated UI that the current voice interaction flow is not able
// to handle.
mAdapter = createAdapter(this, payloadIntents, initialIntents, rList,
mLaunchedFromUid, alwaysUseOption && !isVoiceInteraction());

final int layoutId;
if (mAdapter.hasFilteredItem()) {
layoutId = R.layout.resolver_list_w

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/377039
推荐阅读
相关标签
  

闽ICP备14008679号