无法使用点击暂停和点击恢复,以及无法居中.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:orientation="vertical">


<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:gravity="center"
android:text="跑马灯效果,点击暂停,再点击恢复"/>


<TextView
android:id="@+id/tv_marquee"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:singleLine="true"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:textColor="#000000"
android:textSize="17sp"
android:text="平安程序员:红薯大佬的舔狗故事.从去年到现在还是没有成功,他现在仍然是一条舔狗,今年快要过去一半了.不知道在接下来的日子里能够舔到330"
/>

 

解决:

要与上一级宽度相同.

但是现在仍然是不能够点击暂停.

 


posted on 2019-04-28 15:50  Aron·Zhou  阅读(192)  评论(0编辑  收藏  举报