gpt4 book ai didi

android - Android AppWidgets 是否限于特定尺寸?

转载 作者:太空宇宙 更新时间:2023-11-03 13:38:20 25 4
gpt4 key购买 nike

我正在制作一个位于主屏幕上的 Android AppWidget。

用户的主屏空间很宝贵,所以希望widget小一点。理想的大小是 2x1 单元格。

有什么方法可以创建 2x1 小部件,还是我应该使用标准尺寸?

我的小部件改编自 Simple Wiktionary样本。

  • The manifestandroid:minWidth="146dip"android:minHeight="72dip"
  • a RelativeLayout with android:layout_width="fill_parent"android:layout_height="wrap_content"

我刚开始使用 Android,如果这是一个愚蠢的问题,请提前致歉。 :)

最佳答案

I'm just starting with Android, so apologies in advance if this is a silly question. :)

这绝对不是一个愚蠢的问题。

Does that refer to the available PhotoShop templates or is it a limitation of Android itself?

我的印象是 2x1 是合法尺寸,但我没有尝试过那种尺寸。

HTC have their own special implementation of the home screen, so maybe my widget will only work at 2x1 on HTC devices?

不同的主屏幕实现可能会以不同方式解释大小,但我希望它们大体上保持一致。

Is there any way to create a 2x1 widget, or should I use a standard size?

您可以试验较小的 android:minHeight 值,看看是否需要一个新的阈值来说服模拟器给您一个 2x1 的应用小部件。也就是说,使用 2x2 应用小部件可能会获得更一致的结果。

关于android - Android AppWidgets 是否限于特定尺寸?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3734944/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com