diff options
author | Andrew Dolgov <[email protected]> | 2014-10-16 12:32:14 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-10-16 12:32:14 +0400 |
commit | 636ddc362369c7658ea40bb3f9e488db902f6408 (patch) | |
tree | 9919fb9341cfa477b858088e10111e63e9020270 /src/org | |
parent | 1cc4e56928c392deebc153984decc59bf1d1e107 (diff) |
fadein animation for flavor images
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/fox/ttrss/HeadlinesFragment.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index f8b67125..f58e0a0b 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -18,6 +18,7 @@ import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; +import android.animation.ObjectAnimator; import android.app.Activity; import android.content.Context; import android.content.Intent; @@ -855,8 +856,18 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, View arg1, Bitmap arg2) { // TODO Auto-generated method stub - if (arg2.getWidth() > 128 && arg2.getHeight() > 128) + if (!isAdded()) return; + + if (arg2.getWidth() > 128 && arg2.getHeight() > 128) { + + if (!m_activity.isCompatMode()) { + ObjectAnimator anim = ObjectAnimator.ofFloat(flavorImage, "alpha", 0f, 1f); + anim.setDuration(500); + anim.start(); + } + flavorImage.setVisibility(View.VISIBLE); + } } @Override |