是它可以显示小工具中的添加到主屏幕窗口小部件对话框只针对某一Android版本没有上传2的APK和分配适当的SDK版本号?
is it possible to show widget in "Add to home screen > Widgets" Dialog only for a certain android version without uploading two APKs and assigning to proper SDK version numbers?
推荐答案
我有办法做到这一点没有任何code,例如:
I have a way to do it without any code e.g.:
在你的资源值目录创建一个bools.xml文件:
In your resvalues dir create a bools.xml file:
< XML版本=1.0编码=UTF-8&GT?;
<资源>
<布尔名=honeycombOrAbove>假< /布尔>
< /资源>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<bool name="honeycombOrAbove">false</bool>
</resources>
创建值-V11目录(用于蜂窝或以上的值),将文件复制到它并将其值设置为true。
Create a values-v11 dir (for honeycomb or above values), copy the file to it and set the value to true.
然后在清单中的小部件接收器使用:Android的:启用=@布尔/ honeycombOrAbove。我还用它的插件的配置活动。
Then in the manifest for the widget receiver use: android:enabled="@bool/honeycombOrAbove". I also used it in the configuration activity for the widget.
这意味着部件在安装时被禁用。
This means the widget is disabled at install time.
相关推荐
最新文章