【问题标题】:Is it possible to launch the android app widgets screen or list?是否可以启动 android 应用小部件屏幕或列表?
【发布时间】:2012-07-16 08:55:43
【问题描述】:

是否可以构建一个意图来启动应用小部件屏幕或列表,用户可以在其中选择应用小部件添加到主屏幕?

【问题讨论】:

    标签: android android-intent widget


    【解决方案1】:

    我刚刚在看LogCat的时候打开Add Widget看到了这个,也许会有所帮助:

    Starting: Intent {act=android.appwidget.action.APPWIDGET_PICK}

    【讨论】:

    • 感谢您的提示。按照您的提示,我查看了启动器的代码 (android.googlesource.com/platform/packages/apps/Launcher),并使用以下代码启动列表: Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK); pickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, 1024); startActivityForResult(pickIntent, 9);
    • 但是,单击小部件不会执行任何操作。
    • @Hong 是否可以从该选择器对话框中添加小部件?
    • @ShobhitPuri 我不知道怎么做。
    猜你喜欢
    • 2016-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多