Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您好 :) 可以更改主页小部件的高度吗?我知道这在 XML 中是正常的,但我想知道它在 CLASS 中是可能的。例如,我有一个 40dp 高度的小部件,它在家里给出 1,我想以代码方式更改为 110dp,在家里给出 2。有什么建议么?
我不认为这是可能的。
将小部件拖入主屏幕时,它完全采用 xml 中指定的宽度/高度。
如果你想要的东西是可能的,你的小部件周围的小部件会发生什么?