Overview
When you first open app you will see a a splash screen with animation.Then it will open to The login screen.If already logged in it will skip to dashboard section.
public class SplashScreenActivity extends AppCompatActivity {
private TextView nameTv;
private RippleBackground rippleBackground;
private SharedPreferences sharedPreferences;
private static final int COUNTEND =3000;
private static final int COUNSTART =1000;
SessionManager sessionManager;
/**
* Called when the activity is first created.
* This is where you should do all of your normal static set up: create views, bind data to lists, etc.
* This method also provides you with a Bundle containing the activity's previously frozen state, if there was one.
*
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_splash_screen);
sessionManager = new SessionManager(SplashScreenActivity.this);
//The ripple animation setup
rippleBackground = (RippleBackground) findViewById(R.id.content);
nameTv = (TextView) findViewById(R.id.textView1);
rippleBackground.startRippleAnimation();
Splash layout sample
<com.skyfishjy.library.RippleBackground
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/content"
android:background="#212121"
app:rb_color="@color/colorAccent"
app:rb_radius="32dp"
app:rb_rippleAmount="4"
app:rb_duration="1000"
app:rb_scale="6">
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/image_logo"
android:layout_width="150dp"
android:layout_height="150dp"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:src="@drawable/face5" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_below="@+id/image_logo"
android:layout_centerHorizontal="true"
android:text="Healthix"
android:textColor="@color/colorPrimary"
android:textSize="60sp"
android:textStyle="normal|bold"
android:typeface="normal" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</RelativeLayout>
</com.skyfishjy.library.RippleBackground>