---
title: "TextView 学习"
author: "rafale35"
date: "2011-03-27T22:22:04Z"
tags: []
categories: ["移动开发"]
slug: "textview"
draft: false
lastmod: "2011-03-27T22:22:04Z"
id: 976846
url: "https://rafale35.iteye.com/blog/976846"
---

自动横向滚动效果

 

```
	<TextView
		android:id="@+id/directionTxt"
		android:singleLine="false"
		android:text="@string/testcn1"
		android:layout_marginLeft="20px"
		android:layout_width="280px"
		android:layout_height="40px"
		android:scrollHorizontally="true"
		android:ellipsize="marquee"
		android:marqueeRepeatLimit="marquee_forever"
		android:focusable="true"
		android:selectAllOnFocus="true"
		android:focusableInTouchMode="true"
		android:freezesText="true" />
```