Android中的动画水平线
如何使动画(移动水平线)位于屏幕中心?为了更好地说明这种“效果”在呼吸器、生命支持(我指的是我所谓的“生命线”)中的应用。我关心的是,API 9>= 这就是我设法拼凑起来的:Android中的动画水平线,android,xml,drawable,Android,Xml,Drawable,如何使动画(移动水平线)位于屏幕中心?为了更好地说明这种“效果”在呼吸器、生命支持(我指的是我所谓的“生命线”)中的应用。我关心的是,API 9>= 这就是我设法拼凑起来的: <?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <stroke and
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<stroke
android:dashGap="10px"
android:dashWidth="30px"
android:width="5dp"
android:color="#ff000000" />
</shape>
不幸的是,这只是一条垂直线,而Android刚刚开始使用XML资源,我不知道如何摆脱这种情况,因为我知道您可能需要这篇文章。只需在应用程序上使用它,即可使用
在活动布局上设置动画
希望有用:)您可以使用XML中的图层列表在另一个矩形上绘制一个矩形,生成一条水平线。例如:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item>
<shape android:shape="rectangle">
<solid android:color="#000000" />
</shape>
</item>
<item android:bottom="1dp" >
<shape android:shape="rectangle">
<solid android:color="#FFFFFF" />
</shape>
</item>
</layer-list>
这个xml代码是什么意思?!代码与您的问题无关,请提供真实代码!
$.with(myView).animate("{x: 100%}", new AnimationOptions().repeatCount(-1).reverse(true));