android 跑马灯marquee 跑的时候左边有问题,radiobutton的颜色变了

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Rodulf/article/details/88418609
解决办法:
添加两个属性:
android:shadowColor = "#00ff00" 
android:shadowRadius="0.2"
<RadioButton
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello World!Hello World!Hello World!Hello World!Hello World!"
    android:ellipsize="marquee"
    android:shadowColor = "#00ff00"
    android:shadowRadius="0.2"
    android:layout_marginLeft="10dp"
    android:paddingLeft="10dp"
    android:marqueeRepeatLimit="marquee_forever"
    android:background="#0000ff"
    android:singleLine="true"
    android:focusable="true"/>

参考:https://blog.csdn.net/ysh06201418/article/details/26376699 

android:ellipsize = "end"    省略号在结尾

android:ellipsize = "start"   省略号在开头

android:ellipsize = "middle"     省略号在中间

android:ellipsize = "marquee"  跑马灯

android:shadowColor :阴影颜色

android:shadowDx :阴影x方向位移

android:shadowDy :阴影y方向位移

android:shadowRadius :阴影的半径

注意:实现跑马灯,必须让该控件获得焦点。

猜你喜欢

转载自blog.csdn.net/Rodulf/article/details/88418609