From e59fc41b8e9ea16caa5ca038e393df8606dd3fd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20P=C3=B3=C5=82grabia?= Date: Sun, 28 Aug 2016 14:42:36 +0200 Subject: [PATCH] Sliding transition between listing panoramio locations and enlarged dialog. --- .../java/pl/tpolgrabia/urbanexplorer/MainActivity.java | 4 ++++ .../tpolgrabia/urbanexplorer/fragments/HomeFragment.java | 2 +- app/src/main/res/anim/slide_in_down.xml | 8 ++++++++ app/src/main/res/anim/slide_in_up.xml | 8 ++++++++ app/src/main/res/anim/slide_out_down.xml | 8 ++++++++ app/src/main/res/anim/slide_out_up.xml | 8 ++++++++ 6 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 app/src/main/res/anim/slide_in_down.xml create mode 100644 app/src/main/res/anim/slide_in_up.xml create mode 100644 app/src/main/res/anim/slide_out_down.xml create mode 100644 app/src/main/res/anim/slide_out_up.xml diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/MainActivity.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/MainActivity.java index 5a85ce3..24f15c1 100644 --- a/app/src/main/java/pl/tpolgrabia/urbanexplorer/MainActivity.java +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/MainActivity.java @@ -66,6 +66,10 @@ public class MainActivity extends ActionBarActivity { arguments.putSerializable(PanoramioShowerFragment.PANORAMIO_PHOTO_ARG_KEY, photoInfo); panoramioShower.setArguments(arguments); + ctx.setCustomAnimations(R.anim.slide_in_down, + R.anim.slide_out_down, + R.anim.slide_in_up, + R.anim.slide_out_up); ctx.replace(R.id.fragments, panoramioShower); ctx.addToBackStack(PHOTO_BACKSTACK); diff --git a/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/HomeFragment.java b/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/HomeFragment.java index 7fbe69d..f7bcbf9 100644 --- a/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/HomeFragment.java +++ b/app/src/main/java/pl/tpolgrabia/urbanexplorer/fragments/HomeFragment.java @@ -50,7 +50,7 @@ public class HomeFragment extends Fragment implements LocationListener { private String locationProvider; private boolean locationServicesActivated = false; private AQuery aq; - + private View inflatedView; private TextView pageSizeWidget; private TextView pageIdWidget; diff --git a/app/src/main/res/anim/slide_in_down.xml b/app/src/main/res/anim/slide_in_down.xml new file mode 100644 index 0000000..fad7fd9 --- /dev/null +++ b/app/src/main/res/anim/slide_in_down.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/anim/slide_in_up.xml b/app/src/main/res/anim/slide_in_up.xml new file mode 100644 index 0000000..17d8334 --- /dev/null +++ b/app/src/main/res/anim/slide_in_up.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/anim/slide_out_down.xml b/app/src/main/res/anim/slide_out_down.xml new file mode 100644 index 0000000..74eb01e --- /dev/null +++ b/app/src/main/res/anim/slide_out_down.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/anim/slide_out_up.xml b/app/src/main/res/anim/slide_out_up.xml new file mode 100644 index 0000000..834433e --- /dev/null +++ b/app/src/main/res/anim/slide_out_up.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file