I am writing an view where I need to display another full screen overlay view from bottom to top.
View State:
- Initially state of overlay view is hide,
- Then 10% of view will visible
- Then 20 % and so on up to 100%.
So it's only visibility of view not to push view from bottom to top. I am using following for same:
<translate
android:duration="500"
android:fillAfter="true"
android:fromYDelta="75%p"
android:toYDelta="0%p" />
but it push view instead to display.
EDIT Added layout
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/fmParent"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/txtGameLevel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/fake_percentage"
android:textColor="@color/theme_blue"
android:textSize="@dimen/txt_header_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="@dimen/txt_bottom_margin"
android:text="@string/connecting"
android:textColor="@color/theme_blue" />
<FrameLayout
android:id="@+id/fmOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/theme_blue"
android:clipToPadding="true"
android:visibility="invisible" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/fake_percentage"
android:textColor="@color/theme_white"
android:textSize="@dimen/txt_header_size" />
</FrameLayout>
</FrameLayout>
Solved: Vikarm solution work great for me https://stackoverflow.com/a/25436139/2624806 :)