diff options
Diffstat (limited to 'org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java index 9ec060a0..1e699e5e 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/offline/OfflineArticleFragment.java @@ -10,6 +10,7 @@ import android.os.Bundle; import android.preference.PreferenceManager; import android.provider.BaseColumns; import android.support.v4.app.Fragment; +import android.support.v4.widget.NestedScrollView; import android.support.v7.app.ActionBar; import android.util.Log; import android.util.TypedValue; @@ -32,7 +33,7 @@ import com.shamanland.fab.ShowHideOnScroll; import org.fox.ttrss.R; import org.fox.ttrss.util.ImageCacheService; -import org.fox.ttrss.util.NotifyingScrollView; +import org.fox.ttrss.util.NoChildFocusScrollView; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; @@ -135,25 +136,25 @@ public class OfflineArticleFragment extends Fragment { if (m_cursor.isFirst()) { final String link = m_cursor.getString(m_cursor.getColumnIndex("link")); - NotifyingScrollView scrollView = (NotifyingScrollView) view.findViewById(R.id.article_scrollview); + NoChildFocusScrollView scrollView = (NoChildFocusScrollView) view.findViewById(R.id.article_scrollview); View fab = view.findViewById(R.id.article_fab); if (scrollView != null && m_activity.isSmallScreen()) { view.findViewById(R.id.article_heading_spacer).setVisibility(View.VISIBLE); - scrollView.setOnScrollChangedListener(new NotifyingScrollView.OnScrollChangedListener() { - @Override - public void onScrollChanged(ScrollView who, int l, int t, int oldl, int oldt) { - ActionBar ab = m_activity.getSupportActionBar(); + scrollView.setOnScrollChangeListener(new NestedScrollView.OnScrollChangeListener() { + @Override + public void onScrollChange(NestedScrollView who, int l, int t, int oldl, int oldt) { + ActionBar ab = m_activity.getSupportActionBar(); - if (t >= oldt && t >= ab.getHeight()) { - ab.hide(); - } else if (t <= ab.getHeight() || oldt - t >= 10) { - ab.show(); - } + if (t >= oldt && t >= ab.getHeight()) { + ab.hide(); + } else if (t <= ab.getHeight() || oldt - t >= 10) { + ab.show(); + } - } - }); + } + }); } if (scrollView != null && fab != null) { |