Getting tired by usign the default Intent class? ShortIntent is a lightweight and easy to use Android library that provides user to intent between two activities with transitions by just some simple steps.
- Min SDK 16 (Android Jellybean 4.1)
- Written in Java
A lightweight, easy-to-use Android library that lets us to intent between two activities with transitions by just some simple steps.
Add the dependency to your module build.gradle:
dependencies {
...
implementation 'com.saadahmedev.shortintent:shortintent:3.0.0'
}
ShortIntent.getInstance(this)
.addDestination(DashboardActivity.class)
.finish(this);
ShortIntent.getInstance(this)
.addDestination(DashboardActivity.class)
.putExtra("key1", "Hello")
.putExtra("key2", "World")
.putExtra("key3", 5)
.putExtra("key4", 123456789)
.putExtra("key5", true)
.putExtra("key6", set)
.finish(this);
Student student1 = new Student();
Student student2 = new Student();
student1.setName("Fahad");
student1.setAge(36);
student2.setName("Saad");
student2.setAge(22);
ShortIntent.getInstance(this)
.putExtra("key1", student1)
.putExtra("key2", student2)
.finish(this);
Student student = ShortIntent.getInstance(this).getObject("key1", Student.class);
ShortIntent.getInstance(this)
.addDestination(DashboardActivity.class)
.addTransition(Anim.FADE)
.finish(this);
Anim.FADE
Anim.ZOOM
Anim.WINDMIL
Anim.SPIN
Anim.DIAGONAL
Anim.SPLIT
Anim.SHRINK
Anim.CARD
Anim.INOUT
Anim.SWIPELEFT
Anim.SWIPERIGHT
Anim.SLIDELEFT
Anim.SLIDERIGHT
Anim.SLIDEDOWN
Anim.SLIDEUP
Copyright 2022 Saad Ahmed
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.