小部件中的 EditText 替代品?必须有办法 [英] EditText Alternatives in a Widget? There has to be a way

查看:12
本文介绍了小部件中的 EditText 替代品?必须有办法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人在小部件中成功实现过 EditText?我意识到 Android 不支持此功能,但是 HTC 设备上的朋友流"可以...这是由于 HTC 功能吗?我可以在 HTC 上实现这个吗?任何人有任何疯狂的创意来实现一个实际上允许在主屏幕小部件上打字的文本框?

Has anyone ever successfully implemented an EditText in a widget? I realize Android does not support this, however, "Friend Stream" on HTC devices does it... Is this due to an HTC feature? Could I implement this on HTC? Anyone have any crazy creative ideas for implementing a textbox which actually allows typing on a homescreen widget?

任何可能的线索将不胜感激!

ANY possible leads on this would be much appreciated!

推荐答案

这大部分都可以google-ed,除了TextViews的样式(你不能在widget中使用EditText..)

Most of this can be google-ed, expept for the style of TextViews (you can not use EditText in widget..)

但是.. 使用 style 属性.. :)

But.. go with the style property.. :)

<TextView
    android:id="@+id/etBlahblah"
    android:layout_width="0dp"
    android:layout_height="fill_parent"
    android:layout_weight="1"
    android:layout_marginTop="4dp"
    android:layout_marginBottom="4dp"
    android:layout_marginLeft="2dp"
    android:layout_marginRight="2dp"
    style="@android:style/Widget.EditText">
</TextView>

这篇关于小部件中的 EditText 替代品?必须有办法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆