Skip to content

Instantly share code, notes, and snippets.

@codingwithsara
Created May 10, 2019 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codingwithsara/db55e675d5092cc028e3db3cd78004f9 to your computer and use it in GitHub Desktop.
Save codingwithsara/db55e675d5092cc028e3db3cd78004f9 to your computer and use it in GitHub Desktop.
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