ActivityGroup 子级中的微调器不起作用
我对活动内部的微调器(活动组的子项)有疑问。 当我单击 spinner 时,它没有展开并且出现“强制关闭”窗口 我检查了 Logcat 并捕获了“BadTokenException”,请参见下文:
http:// i227.photobucket.com/albums/dd299/lavender-90/stackflow.jpg
我的 XML:
<Spinner
android:id="@+id/aroundSP"
android:layout_height="wrap_content"
android:prompt="@string/touraround"
android:layout_width="fill_parent"
android:entries="@array/Triparound"
android:layout_marginTop="250dip"
android:layout_marginLeft="4dip"
style="@style/ContentTitle">
</Spinner>
谢谢大家!
I have a problem with spinner inside activity , that child of Activity group .
when I clicked on spinner , that isn't expanded and "Force Close" window appears
I was checked Logcat and catch "BadTokenException ", see below :
http://i227.photobucket.com/albums/dd299/lavender-90/stackflow.jpg
my XML:
<Spinner
android:id="@+id/aroundSP"
android:layout_height="wrap_content"
android:prompt="@string/touraround"
android:layout_width="fill_parent"
android:entries="@array/Triparound"
android:layout_marginTop="250dip"
android:layout_marginLeft="4dip"
style="@style/ContentTitle">
</Spinner>
Thanks everyone!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这很好用。
this works fine.
如果您在任何地方使用context,那么您必须传递
getParent()
context,因为您位于活动组的子级中。If you are using context anywhere then you have to pass
getParent()
context because you are in a child of activity group.