diff options
author | Andrew Dolgov <[email protected]> | 2012-12-31 01:53:04 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-12-31 01:53:04 +0400 |
commit | 6e407cb5b1a882aafa4b8d62eeeb644513abcc4a (patch) | |
tree | 4fd82920a41639701d9c166c1fefbdd9c4795f1d | |
parent | 7357c546b28a07e5bcdaf7e1370e12af3137b218 (diff) |
improve transitions
-rw-r--r-- | res/anim/right_slide_in.xml | 9 | ||||
-rw-r--r-- | res/anim/right_slide_out.xml | 9 | ||||
-rw-r--r-- | res/anim/slide_left.xml | 20 | ||||
-rw-r--r-- | res/anim/slide_right.xml | 20 | ||||
-rw-r--r-- | src/org/fox/ttrss/FeedsActivity.java | 1 | ||||
-rw-r--r-- | src/org/fox/ttrss/HeadlinesActivity.java | 6 | ||||
-rw-r--r-- | src/org/fox/ttrss/OnlineActivity.java | 1 |
7 files changed, 26 insertions, 40 deletions
diff --git a/res/anim/right_slide_in.xml b/res/anim/right_slide_in.xml new file mode 100644 index 00000000..2bb5acc1 --- /dev/null +++ b/res/anim/right_slide_in.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_decelerate_interpolator"> + <translate + android:fromXDelta="100%p" + android:toXDelta="0" + android:duration="200" + /> +</set> + diff --git a/res/anim/right_slide_out.xml b/res/anim/right_slide_out.xml new file mode 100644 index 00000000..134467f5 --- /dev/null +++ b/res/anim/right_slide_out.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_decelerate_interpolator"> + <translate + android:fromXDelta="0" + android:toXDelta="100%p" + android:duration="200" + /> +</set> + diff --git a/res/anim/slide_left.xml b/res/anim/slide_left.xml deleted file mode 100644 index 80caa7d7..00000000 --- a/res/anim/slide_left.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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
- 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.
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator">
- <translate android:fromXDelta="100%p" android:toXDelta="0"
- android:duration="@android:integer/config_shortAnimTime" />
-</set>
\ No newline at end of file diff --git a/res/anim/slide_right.xml b/res/anim/slide_right.xml deleted file mode 100644 index a5617eae..00000000 --- a/res/anim/slide_right.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2007 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
- 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.
--->
-
-<set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/accelerate_interpolator">
- <translate android:fromXDelta="-100%p" android:toXDelta="0"
- android:duration="@android:integer/config_shortAnimTime" />
-</set>
\ No newline at end of file diff --git a/src/org/fox/ttrss/FeedsActivity.java b/src/org/fox/ttrss/FeedsActivity.java index a129c10c..da1d58e2 100644 --- a/src/org/fox/ttrss/FeedsActivity.java +++ b/src/org/fox/ttrss/FeedsActivity.java @@ -315,6 +315,7 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe intent.putExtra("searchQuery", hf.getSearchQuery());
startActivityForResult(intent, 0);
+ overridePendingTransition(R.anim.right_slide_in, 0);
}
} else {
initMenu();
diff --git a/src/org/fox/ttrss/HeadlinesActivity.java b/src/org/fox/ttrss/HeadlinesActivity.java index 9b5d8a1f..81dd1043 100644 --- a/src/org/fox/ttrss/HeadlinesActivity.java +++ b/src/org/fox/ttrss/HeadlinesActivity.java @@ -234,4 +234,10 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL }
}
}
+
+ @Override
+ public void onBackPressed() {
+ super.onBackPressed();
+ overridePendingTransition(0, R.anim.right_slide_out);
+ }
}
diff --git a/src/org/fox/ttrss/OnlineActivity.java b/src/org/fox/ttrss/OnlineActivity.java index 36c46461..bade4628 100644 --- a/src/org/fox/ttrss/OnlineActivity.java +++ b/src/org/fox/ttrss/OnlineActivity.java @@ -439,6 +439,7 @@ public class OnlineActivity extends CommonActivity { intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivityForResult(intent, 0);
+ overridePendingTransition(0, 0);
if (hasPendingOfflineData())
syncOfflineData();
|