【问题标题】:How to Scroll the text in a TextView without scrolling its background?如何在 TextView 中滚动文本而不滚动其背景?
【发布时间】:2014-11-20 10:09:05
【问题描述】:

我有一个带有背景的 textView,我想滚动它包含的文本而不滚动背景

<TextView 
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_margin="5dp"
        android:background="@drawable/bg_image"
        android:gravity="center"
        android:text=" .... "
        android:textColor="@android:color/white" />

【问题讨论】:

    标签: android xml eclipse


    【解决方案1】:

    只需将您的TextView 放入滚动视图,如下所述:Android:Textview with vertical scrolling text。然后将你的背景资源设置为ScrollView的背景,并使TextView背景透明。

    【讨论】:

      猜你喜欢
      • 2019-10-19
      • 2020-09-14
      • 1970-01-01
      • 1970-01-01
      • 2017-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多