【问题标题】:Fixing the scrollview with textview使用 textview 修复滚动视图
【发布时间】:2014-05-21 23:02:05
【问题描述】:

看看这个。

在我的应用中,当我滚动标题后面出现的内容时,我该如何解决它

这是我的 XML.file

<TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="40dp"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true"
        android:background="#000000"
        android:gravity="center"
        android:text="Frame Relay"
        android:textColor="#F4661B"
        android:textColorHint="#6600FF"
        android:textStyle="normal|bold|italic" />
        <ScrollView
        android:id="@+id/scrollView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_alignParentTop="true" >
        <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/textView1"
        android:text="@string/pourframerelay"
        android:textColor="#FAEBD7"
        android:textColorHint="#FAEBD7" />

        </ScrollView>

再次感谢你 我的xml文件

【问题讨论】:

  • 显示你的布局 xml 问题出在他们身上。
  • 为什么不包括你的代码(布局 XML 文件)
  • 可能从它们仅在 xml 中开始,您在滚动时发现。

标签: android android-scrollview


【解决方案1】:

您应该从 ScrollView 行中删除:

android:layout_alignParentTop="true"

换成这个:

android:layout_below="@id/textView1"

【讨论】:

    【解决方案2】:

    检查可滚动视图/列表视图的设置方式。如果标题与视图重叠并切割您的数据,那么大多数容器的限制大于可见区域。保持标题和视图彼此相邻,而不是标题超过列表视图

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-08-04
      • 1970-01-01
      • 2019-02-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多