Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Start an Activity with Slide & Fade Animation
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:orientation="vertical"
android:gravity="center">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Main Activity"
android:textSize="26sp" />
<Button
android:id="@+id/normalBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Normal"
android:textAllCaps="false"
android:layout_marginTop="60dp"/>
<Button
android:id="@+id/fadeBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Fade Animation"
android:textAllCaps="false"
android:layout_marginTop="20dp"/>
<Button
android:id="@+id/slideBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Slide Animation"
android:textAllCaps="false"
android:layout_marginTop="20dp"/>
</LinearLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.