hide fab when fs video is shown
This commit is contained in:
parent
aa041890c6
commit
0f7c68b4bb
@ -53,6 +53,7 @@ public class ArticleFragment extends Fragment {
|
|||||||
protected FrameLayout m_customViewContainer;
|
protected FrameLayout m_customViewContainer;
|
||||||
protected View m_contentView;
|
protected View m_contentView;
|
||||||
protected FSVideoChromeClient m_chromeClient;
|
protected FSVideoChromeClient m_chromeClient;
|
||||||
|
protected View m_fab;
|
||||||
|
|
||||||
public void initialize(Article article) {
|
public void initialize(Article article) {
|
||||||
m_article = article;
|
m_article = article;
|
||||||
@ -83,6 +84,8 @@ public class ArticleFragment extends Fragment {
|
|||||||
m_customViewContainer.setVisibility(View.VISIBLE);
|
m_customViewContainer.setVisibility(View.VISIBLE);
|
||||||
m_customViewContainer.addView(view);
|
m_customViewContainer.addView(view);
|
||||||
|
|
||||||
|
if (m_fab != null) m_fab.setVisibility(View.GONE);
|
||||||
|
|
||||||
m_callback = callback;
|
m_callback = callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,6 +108,9 @@ public class ArticleFragment extends Fragment {
|
|||||||
m_customViewContainer.removeView(m_customView);
|
m_customViewContainer.removeView(m_customView);
|
||||||
m_callback.onCustomViewHidden();
|
m_callback.onCustomViewHidden();
|
||||||
|
|
||||||
|
if (m_fab != null && m_prefs.getBoolean("enable_article_fab", true))
|
||||||
|
m_fab.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
m_customView = null;
|
m_customView = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -165,13 +171,13 @@ public class ArticleFragment extends Fragment {
|
|||||||
m_customViewContainer = (FrameLayout) view.findViewById(R.id.article_fullscreen_video);
|
m_customViewContainer = (FrameLayout) view.findViewById(R.id.article_fullscreen_video);
|
||||||
|
|
||||||
View scrollView = view.findViewById(R.id.article_scrollview);
|
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)) {
|
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
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
try {
|
try {
|
||||||
@ -187,7 +193,7 @@ public class ArticleFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
fab.setVisibility(View.GONE);
|
m_fab.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user