Android 的非标准小部件尺寸
我有一个 Android 上垂直 1x4 主屏幕小部件的用例。支持的尺寸为 4x1,即水平尺寸。有谁知道是否可以实现垂直版本?
我意识到改变屏幕方向会把小部件挤在一起,我对此很满意。如果 css 中有一个相当于“溢出隐藏”的功能那就更好了。
有没有人遇到过这样做的方法?
I have a use-case for a vertical 1x4 home screen widget on android. The supported size is 4x1 ie horizontal. Does anyone know if the vertical version can be implemented?
I realize changing screen orientation would scrunch the widget together, which I'm fine with. Even better would be if there was an equivalent to "overflow hidden" in css.
Has anyone come across a way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这似乎是错误的答案。至少据我所知,在 android-7 及以上平台上,您可以根据需要设置尺寸,直至全屏。当然,这不是推荐的大小,但从技术上讲没有什么限制您实现您正在讨论的小部件。需要注意的一个问题是,虽然您可以为纵向和横向提供不同的布局,但 onUpdate 不会在屏幕旋转时被调用。
this seems like the wrong answer. at least as far as i can tell with android-7 platform and above, you can set the size however you want up to the full screen. of course, that's not the recommended sizes, but there's nothing technically restricting you from implementing the widget you're talking about. an issue to watch out for is that while you can supply different layouts for portrait and landscape, onUpdate won't be called on a screen rotation.
不,你不能这样做。对不起。
No, you can't do this. Sorry.