【发布时间】:2011-12-09 17:46:13
【问题描述】:
我想设置
android:layout_height="wrap_content"
在我的应用程序启动期间到一些像素(int)。这是一个 textView,其背后的原因是我希望 textView 的高度基于我端的一些输入动态,这些输入将在调用 onCreate 方法时计算。
这可能吗?如果是的话,任何例子都会很棒。
忘记添加我的 textView xml 看起来像这样
<TextView
android:id="@+id/sometext"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fadingEdge="vertical"
android:background="@drawable/dropshadow"
android:scrollbars="vertical"
android:text="Getting data on your slow n/w..."
android:textColor="#ffffff"
/>
【问题讨论】:
标签: android android-layout textview