`
jianweicao
  • 浏览: 117139 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

android 跑马灯效果

阅读更多

<TextView android:id="@+id/app_loc" 

android:layout_width="wrap_content"

android:layout_height="wrap_content" 

android:textColor="#000000" 

android:textSize="12dp"

android:layout_marginLeft="10dip"

android:singleLine="true"

android:focusableInTouchMode="true"

android:ellipsize="marquee"  

android:scrollHorizontally="true" 

android:marqueeRepeatLimit="marquee_forever"></TextView>

 

如果想不获取焦点就让TextView 的跑马灯效果 直接在自定义adapter中setView方法找到 该TextView 并设置 成 convertView.findViewById(R.id.app_loc).setSelected(true); 

 

适用于任何情况,包括不在顶层容器上显示

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics