It is a simple gist to realize the UI ANIMATION IN PHOTOSHOP – TUTORIAL #1 provided by Taylor Ling .
Due to shadow and Z-animation, this code can work only on L-devices.
| @Configuration | |
| public class DatasourceConfig { | |
| // Primary Datasource | |
| @Bean | |
| @ConfigurationProperties(prefix = “spring.datasource.primary”) // In properties file, the prefix of datasource | |
| public JndiPropertyHolder jndiPrimary() { | |
| return new JndiPropertyHolder(); | |
| } |
| public class BadgeUtils { | |
| public static void setBadge(Context context, int count) { | |
| setBadgeSamsung(context, count); | |
| setBadgeSony(context, count); | |
| } | |
| public static void clearBadge(Context context) { | |
| setBadgeSamsung(context, 0); |
| /* | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2014 Matthieu Harlé | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
| /* | |
| * Copyright (C) 2014 skyfish.jy@gmail.com | |
| * | |
| * 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 |
| import android.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
| public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); | |
| private int previousTotal = 0; // The total number of items in the dataset after the last load | |
| private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
| private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. | |
| int firstVisibleItem, visibleItemCount, totalItemCount; |
| <?xml version="1.0" encoding="utf-8"?><!-- | |
| ~ Copyright (C) 2015 The Android Open Source Project | |
| ~ | |
| ~ 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 |
| import android.content.Context; | |
| import android.os.Build; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.util.AttributeSet; | |
| import android.view.Gravity; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.view.animation.TranslateAnimation; | |
| import android.widget.FrameLayout; |
| import android.support.v7.widget.LinearLayoutManager; | |
| import android.support.v7.widget.RecyclerView; | |
| public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
| public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName(); | |
| private int previousTotal = 0; // The total number of items in the dataset after the last load | |
| private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
| private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. | |
| int firstVisibleItem, visibleItemCount, totalItemCount; |
It is a simple gist to realize the UI ANIMATION IN PHOTOSHOP – TUTORIAL #1 provided by Taylor Ling .
Due to shadow and Z-animation, this code can work only on L-devices.
| package com.aracem.utils.animations.pagetransformation; | |
| import org.jetbrains.annotations.NotNull; | |
| import android.support.v4.view.ViewPager; | |
| import android.view.View; | |
| import java.util.ArrayList; | |
| import java.util.List; |