【发布时间】:2023-03-15 05:46:01
【问题描述】:
我是 Android 开发新手,遇到了问题。对于我的 Android 活动,我在 TableLayout 中有一组文本字段。在实现 ScrollView 之前我没有任何问题,但是使用 ScrollView 我发现每次我选择一个文本字段或开始输入它时,我的背景都会开始闪烁黑色(使用白色背景)。我不确定这是我的代码还是模拟器本身的问题。
这就是我的 ScrollView:
<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ScrollView"
android:layout_width="wrap_content"
android:layout_height="425px">
<TableLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:stretchColumns="1"
android:background="@color/background">......
.....</TableLayout>
</ScrollView>
其他人有类似的问题吗?
【问题讨论】:
-
"这就是我的 ScrollView 所拥有的......" ?
-
大声笑,这和“flash”有什么关系?这不是一个合适的标签,因为背景是“闪烁”的。
-
是的,我没想到……我的错。这是我在 StackOverflow 上的第一篇文章,我似乎无法让我的 XML 正确显示。你们知道它为什么不显示吗?
-
只需将您的代码粘贴到后面加上“
" in front and "”即可。注意:那是键盘上 ~ 下方的那条小线 ;)
标签: android scrollview textfield