Imageview上的Textview滚动,如Pulse应用滚动

时间:2013-12-21 09:20:48

标签: android

在我的应用程序中,我想在图像视图上滚动文本,如Pulse应用程序,无需在文本视图中滚动。请为此提供解决方案。enter image description here

![在此输入图片说明] [2]

enter image description here

2 个答案:

答案 0 :(得分:0)

使用framelayout并在其中放置第一个imageview,然后是textview或带有bachground和textview的layoutview

答案 1 :(得分:0)

使用此功能可能会有所帮助:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/LinearLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/ic_launcher"
    android:orientation="vertical" >

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent" >

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical" >

            <TextView
                android:id="@+id/textView1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="100dp"
                android:text="@string/hello_world" />
        </LinearLayout>
    </ScrollView>

</LinearLayout>

enter image description here

你可以试试这个 向textview添加边距

 android:layout_marginTop="100dp"

并制作背景图像。