如何使用小文本将marqee添加到android中的TextView

如何使用小文本将marqee添加到android中的TextView,android,android-activity,android-fragments,marquee,Android,Android Activity,Android Fragments,Marquee,我想在我的应用程序中将字幕功能应用于TextView,我已经成功地实现了它。这是我使用的代码 碎片 mLatestNotification = (TextView) view .findViewById(R.id.latest_notification); mLatestNotification.setSelected(true); mLatestNotification .setText("Scrollable

我想在我的应用程序中将字幕功能应用于TextView,我已经成功地实现了它。这是我使用的代码

碎片

        mLatestNotification = (TextView) view
            .findViewById(R.id.latest_notification);
    mLatestNotification.setSelected(true);
    mLatestNotification
            .setText("Scrollable textScrollable textScrollable textScrollable textScrollable text Scrollable text");
现在我的问题是,若我将小文本指定给TextView,那个么字幕功能就不起作用了。有没有办法,我可以申请小文本字幕以及


谢谢

请使用此代码,我从我的项目中获取了此代码

 <TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:ellipsize="marquee"
    android:fadingEdge="horizontal"
    android:lines="1"
    android:textSize="50sp"
    android:singleLine="true"
    android:marqueeRepeatLimit="marquee_forever"
    android:scrollHorizontally="true"
    android:text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
    android:textColor="#757575" />

试试这个

 <TextView
      android:id="@+id/text"
      android:layout_width="100dp"
      android:layout_height="wrap_content"
      android:layout_gravity="center"
      android:ellipsize="marquee"
      android:marqueeRepeatLimit="marquee_forever"
      android:singleLine="true"
      android:text="TextView TextView TextView TextView TextView TextView TextView TextView TextView TextView"
      android:textAppearance="?android:attr/textAppearanceSmall" />


它仅在文本大小较大时起作用

它只在我给出大文本时有效。有没有一种方法也适用于小文本?