-1
我花了數小時嘗試和谷歌搜索。我看過其他帖子,沒有任何工作。 我確實有tv.setSelected(true);在我的代碼TextView字幕不滾動
`
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.bottom, container, false);
TextView tv = (TextView)v.findViewById(R.id.tv);
tv.setText(R.string.very_long);
tv.setSelected(true);
return v;
}
`
這是我的TextView
<TextView
android:id="@+id/tv"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:ellipsize="marquee"
android:focusable="true"
android:focusableInTouchMode="true"
android:freezesText="true"
android:marqueeRepeatLimit="marquee_forever"
android:paddingLeft="15dip"
android:paddingRight="15dip"
android:scrollHorizontally="true"
android:singleLine="true"
android:textSize="30sp" />
你測試過設備還是仿真器? – 2014-11-21 10:52:26