diff options
author | Andrew Dolgov <[email protected]> | 2014-11-25 13:21:36 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2014-11-25 13:21:36 +0300 |
commit | 0f7c68b4bb48f8f612461dc96480f895668044f6 (patch) | |
tree | 6a087b99c54085eb965d881c9b17bc13b5d760c4 /org.fox.ttrss/src | |
parent | aa041890c623738cd006fb68cc65655c52909fd7 (diff) |
hide fab when fs video is shown
Diffstat (limited to 'org.fox.ttrss/src')
-rw-r--r-- | org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java index 8878b885..4c91cb1d 100644 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/ArticleFragment.java @@ -53,6 +53,7 @@ public class ArticleFragment extends Fragment { protected FrameLayout m_customViewContainer; protected View m_contentView; protected FSVideoChromeClient m_chromeClient; + protected View m_fab; public void initialize(Article article) { m_article = article; @@ -83,6 +84,8 @@ public class ArticleFragment extends Fragment { m_customViewContainer.setVisibility(View.VISIBLE); m_customViewContainer.addView(view); + if (m_fab != null) m_fab.setVisibility(View.GONE); + m_callback = callback; } @@ -105,6 +108,9 @@ public class ArticleFragment extends Fragment { m_customViewContainer.removeView(m_customView); m_callback.onCustomViewHidden(); + if (m_fab != null && m_prefs.getBoolean("enable_article_fab", true)) + m_fab.setVisibility(View.VISIBLE); + m_customView = null; } @@ -165,13 +171,13 @@ public class ArticleFragment extends Fragment { m_customViewContainer = (FrameLayout) view.findViewById(R.id.article_fullscreen_video); View scrollView = view.findViewById(R.id.article_scrollview); - View fab = view.findViewById(R.id.article_fab); + m_fab = view.findViewById(R.id.article_fab); - if (scrollView != null && fab != null) { + if (scrollView != null && m_fab != null) { if (m_prefs.getBoolean("enable_article_fab", true)) { - scrollView.setOnTouchListener(new ShowHideOnScroll(fab)); + scrollView.setOnTouchListener(new ShowHideOnScroll(m_fab)); - fab.setOnClickListener(new OnClickListener() { + m_fab.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { try { @@ -187,7 +193,7 @@ public class ArticleFragment extends Fragment { } }); } else { - fab.setVisibility(View.GONE); + m_fab.setVisibility(View.GONE); } } |