Skip to content

Commit

Permalink
Transition all the things.
Browse files Browse the repository at this point in the history
– Switch SearchActivity animations to use transitions.
– Introduce StartAnimatable & CircularReveal transitions.
  • Loading branch information
nickbutcher committed Aug 16, 2016
1 parent 3e8da4a commit 210dc82
Show file tree
Hide file tree
Showing 26 changed files with 777 additions and 353 deletions.
5 changes: 2 additions & 3 deletions app/src/main/java/io/plaidapp/ui/DesignerNewsLogin.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@
import io.plaidapp.data.prefs.DesignerNewsPrefs;
import io.plaidapp.ui.transitions.FabTransform;
import io.plaidapp.ui.transitions.MorphTransform;
import io.plaidapp.util.AnimUtils;
import io.plaidapp.util.ScrimUtil;
import io.plaidapp.util.TransitionUtils;
import io.plaidapp.util.glide.CircleTransform;
import retrofit2.Call;
import retrofit2.Callback;
Expand Down Expand Up @@ -107,8 +107,7 @@ protected void onCreate(Bundle savedInstanceState) {
getResources().getDimensionPixelSize(R.dimen.dialog_corners));
}
if (getWindow().getSharedElementEnterTransition() != null) {
getWindow().getSharedElementEnterTransition().addListener(new AnimUtils
.TransitionListenerAdapter() {
getWindow().getSharedElementEnterTransition().addListener(new TransitionUtils.TransitionListenerAdapter() {
@Override
public void onTransitionEnd(Transition transition) {
finishSetup();
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/io/plaidapp/ui/DribbbleShot.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@
import io.plaidapp.ui.widget.FabOverlapTextView;
import io.plaidapp.ui.widget.ForegroundImageView;
import io.plaidapp.ui.widget.ParallaxScrimageView;
import io.plaidapp.util.AnimUtils;
import io.plaidapp.util.ColorUtils;
import io.plaidapp.util.HtmlUtils;
import io.plaidapp.util.ImeUtils;
import io.plaidapp.util.TransitionUtils;
import io.plaidapp.util.ViewOffsetHelper;
import io.plaidapp.util.ViewUtils;
import io.plaidapp.util.customtabs.CustomTabActivityHelper;
Expand Down Expand Up @@ -594,7 +594,7 @@ public void onClick(View view) {
};

private Transition.TransitionListener shotReturnHomeListener =
new AnimUtils.TransitionListenerAdapter() {
new TransitionUtils.TransitionListenerAdapter() {
@Override
public void onTransitionStart(Transition transition) {
super.onTransitionStart(transition);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/io/plaidapp/ui/FeedAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
import io.plaidapp.data.prefs.SourceManager;
import io.plaidapp.ui.transitions.ReflowText;
import io.plaidapp.ui.widget.BadgedFourThreeImageView;
import io.plaidapp.util.AnimUtils;
import io.plaidapp.util.ObservableColorMatrix;
import io.plaidapp.util.TransitionUtils;
import io.plaidapp.util.ViewUtils;
import io.plaidapp.util.customtabs.CustomTabActivityHelper;
import io.plaidapp.util.glide.DribbbleTarget;
Expand Down Expand Up @@ -615,7 +615,7 @@ private void setGridItemContentTransitions(View gridItem) {

Transition reenter = TransitionInflater.from(host)
.inflateTransition(R.transition.grid_overlap_fab_reenter);
reenter.addListener(new AnimUtils.TransitionListenerAdapter() {
reenter.addListener(new TransitionUtils.TransitionListenerAdapter() {

@Override
public void onTransitionEnd(Transition transition) {
Expand Down
10 changes: 3 additions & 7 deletions app/src/main/java/io/plaidapp/ui/HomeActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,10 @@ public boolean onOptionsItemSelected(MenuItem item) {
drawer.openDrawer(GravityCompat.END);
return true;
case R.id.menu_search:
// get the icon's location on screen to pass through to the search screen
View searchMenuView = toolbar.findViewById(R.id.menu_search);
int[] loc = new int[2];
searchMenuView.getLocationOnScreen(loc);
startActivityForResult(SearchActivity.createStartIntent(this, loc[0], loc[0] +
(searchMenuView.getWidth() / 2)), RC_SEARCH, ActivityOptions
.makeSceneTransitionAnimation(this).toBundle());
searchMenuView.setAlpha(0f);
Bundle options = ActivityOptions.makeSceneTransitionAnimation(this, searchMenuView,
getString(R.string.transition_search_back)).toBundle();
startActivityForResult(new Intent(this, SearchActivity.class), RC_SEARCH, options);
return true;
case R.id.menu_dribbble_login:
if (!dribbblePrefs.isLoggedIn()) {
Expand Down
Loading

0 comments on commit 210dc82

Please sign in to comment.