我正在尝试克隆来自Sony Ericsson手机的电源管理小部件,但我在处理新的ICS小部件填充时遇到了问题。
我已经阅读了下面的文章链接,但我仍然有问题。
我在GB上运行我的小部件,它的工作方式就像我想要的那样(第二个是克隆): http://i.minus.com/iQmbhue0z0jJz.png 但是在ICS中运行时,我的小部件变得比原始小部件更小: http://i.minus.com/iudmWwv6xBsxA.png 我的文件是:
我已经阅读了下面的文章链接,但我仍然有问题。
我在GB上运行我的小部件,它的工作方式就像我想要的那样(第二个是克隆): http://i.minus.com/iQmbhue0z0jJz.png 但是在ICS中运行时,我的小部件变得比原始小部件更小: http://i.minus.com/iudmWwv6xBsxA.png 我的文件是:
widget_info.xml (@xml/widget_info.xml)
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="40.0dip"
android:minHeight="40.0dip"
android:updatePeriodMillis="0"
android:initialLayout="@layout/widget" >
</appwidget-provider>
widget.xml(@layout/widget.xml)
<ImageView android:id="@+id/widget1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:contentDescription="@string/app_name"
android:src="@drawable/sms_disabled"
android:clickable="true"
xmlns:android="http://schemas.android.com/apk/res/android" />
我已经尝试在ImageView中添加android:padding="0dp"
,也尝试在widget.xml
上放置布局并在其上添加android:padding="0dp"
,但我仍然遇到了这个问题。
有什么建议吗?