Jake
Jake

Reputation: 633

Animation horizontal line in Android

How do I get the animation (moving horizontal line) centered on the center of the screen? In order to well illustrate this "effect" is used in respirators, life support (I mean my so-called "life line"). I care about the fact that this effect was available in the API 9> =

This is what I managed to cobble together:

<?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>

Unfortunately, this is just a vertical line, and that just started playing with XML resources in Android, I have no idea how to get out of this situation

Upvotes: 0

Views: 1210

Answers (1)

FxRi4
FxRi4

Reputation: 1248

as i understand you may need this article Layout Change Animation. simply can use it on your app and animate on Activity layout with
<LinearLayout android:id="@+id/container" android:animateLayoutChanges="true" ... />

hope to be usefull :)

Upvotes: 2

Related Questions