实现TextView文字滚动效果(跑马灯)只需要在TextView中多设置一些属性就可以了。具体看代码:

<TextView        android:id="@+id/main_more_text"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_gravity="center_horizontal"        android:text=" Android TextView跑马灯效果代码                                   "        android:textAppearance="?android:attr/textAppearanceMedium"        android:textColor="#FF00FF"        android:ellipsize="marquee"         android:singleLine="true"        android:marqueeRepeatLimit="marquee_forever"         android:focusable="true"         android:focusableInTouchMode="true"         android:scrollHorizontally="true"              />
最重要的是后面六行代码,还有个地方就是TextView的文字要足够长,不够可以用空格补充!

更多相关文章

  1. Android(安卓)3D与JNI结合的小例子
  2. android中的ListView与ScrollView冲突保留ScrollV
  3. 调试android通过jni调用的C++代码
  4. Android录音,和实现微信长按录音效果!
  5. android
  6. 关于Android(安卓)ListView组件中android:drawSelectorOnTop含义
  7. gallery 显示文字
  8. delphi xe5 android 控制蓝牙
  9. Android(安卓)近百个项目的源代码,覆盖Android开发的每个领域

随机推荐

  1. Android(安卓)AsyncTask异步实现大文件下
  2. Android(安卓)SDK not found 的解决方案
  3. 【Android】glide:3.7.0->4.8.0 升级导入
  4. Settings中蓝牙连接流程
  5. Android(安卓)Notification的使用
  6. Looper源码探究—Android消息机制
  7. LIstview的使用和数据填充
  8. Android(安卓)UI开发专题(四) View自绘控
  9. Android实现滑动标签页
  10. 【Android开发】Android(安卓)Studio 中