我試圖從索尼愛立信手機中克隆電源管理小部件,但是我遇到了小部件的新ICS填充問題。Android小部件填充問題
我已經閱讀過這篇文章[鏈接下面],但我仍然有問題。
我跑我的部件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(@佈局/ 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" />
我已經試圖把我已經試圖把widget.xml
佈局,然後把android:padding="0dp"
上,但我仍然有這個問題。
有什麼建議嗎?
文章:http://radleymarx.com/blog/app-widget-padding-margins-in-ics-android/ - 我沒有10點的聲望,非常遺憾。 – 2012-08-09 05:48:02
你的意思是你找到了答案,不能爲自己做出迴應? – 2013-08-05 12:36:52