如何把多个部件尺寸在一个APK?多个、部件、尺寸、APK

2023-09-03 21:45:20 作者:性别男,爱好女

我想要做的是有不同的大小(即2×2,3×3,4×4等)于一体的apk和配置活动的时钟部件,以便能够选择要添加的大小。

What I'm trying to do is have a clock widget of different sizes (i.e. 2x2, 3x3, 4x4 etc) in one apk and a configuration activity to be able to select which size to add.

从我的文档教训:

的Widget大小指定与< appwidget提供者>在相应的XML文件中的标记 此外,在该文件中我设置配置活动的供应商

如此看来,大小是AppWidgetProvider的财产,我需要以某种方式创建从code在第一个配置活动的另外一个供应商... 还是我得到这个错误的,还有另一种方式?

So it seems that size is a property of AppWidgetProvider and I'll need to somehow create another provider from the code in configuration Activity of the first one... Or am I getting this wrong and there's another way?

这是可能的吗? :) 有人告诉我,一些小部件可以做到这一点:)

Is this possible at all? :) I've been told that some widgets can do this :)

在此先感谢!

P.S。我已阅读这和的