【发布时间】:2012-07-16 15:58:59
【问题描述】:
我是一名 android 中级开发人员,我需要有人过期才能在我的内容活动中发挥作用;
这是我的内容活动:
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent" >
....
// How this TextView never go out of the screen if the user scroll Down
<TextView ... />
....
</ScrollView>
*我做了什么:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView ... android:visibility="gone" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent" >
....
//
<TextView ...android:visibility="visible"/>
....
</ScrollView>
</FrameLayout>
我想过有 2 个 TextView,一个在顶部不可见,另一个可见。 当用户向下滚动并在第二个 TextView 消失之前,我将第一个 textView 设置为可见。
这是一个好方法吗?如果有怎么办?
【问题讨论】:
-
您能否更详细地解释您的问题。谢谢
-
@M'hamed :很简单,不要将
TextView放在ScrollView中。
标签: android layout scrollview