使用preferenceScreen / preferenceActivity配置的主屏幕小部件 [英] Using PreferenceScreen/PreferenceActivity to configure home screen widgets
问题描述
我创建一个appwidget,用户应该能够配置它之前,它被添加到主屏幕。对我来说,preferenceScreen / preferenceActivity似乎完美的工作,但这些类背后的意图似乎是配置实际应用。我已经搜查,但找不到任何文档或教程,涵盖了这个问题。
是否有可能使用这些类配置窗口小部件,或者是唯一的选择通过普通视图进行配置?
感谢您的解答!
您当然可以使用 preferenceActivity
用于这一目的。如果你将它设置为安卓配置
活动的小部件的配置,不过,你必须做一些花哨的步法来,然后让你的小部件更新。 P>
I'm creating an appwidget, where the user should be able to configure it before it is added to the home screen. To me, PreferenceScreen/PreferenceActivity seems perfect for the task, but the intention behind these classes seem to be configuring an actual application. I've searched, but cannot find any documentation or tutorials which covers this question.
Is it possible to configure a widget using these classes, or is the only alternative to configure it through an ordinary view?
Thanks for any answers!
You certainly can use a PreferenceActivity
for this purpose. If you set it up as the android:configure
activity in your widget configuration, though, you will have to do a bit of fancy footwork to then get your widget updated.
这篇关于使用preferenceScreen / preferenceActivity配置的主屏幕小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!