hide sidebar when playing fullscreen video

This commit is contained in:
Andrew Dolgov 2014-11-25 19:17:36 +04:00
parent 7d9daaf472
commit 3f0cb8d0ca
3 changed files with 15 additions and 4 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="286"
android:versionName="1.78" >
android:versionCode="287"
android:versionName="1.79" >
<uses-sdk
android:minSdkVersion="10"

View File

@ -47,7 +47,7 @@ public class ArticleFragment extends Fragment {
private SharedPreferences m_prefs;
private Article m_article;
private OnlineActivity m_activity;
private HeadlinesActivity m_activity;
private WebView m_web;
protected View m_customView;
protected FrameLayout m_customViewContainer;
@ -86,6 +86,8 @@ public class ArticleFragment extends Fragment {
if (m_fab != null) m_fab.setVisibility(View.GONE);
m_activity.showSidebar(false);
m_callback = callback;
}
@ -113,6 +115,7 @@ public class ArticleFragment extends Fragment {
m_customView = null;
m_activity.showSidebar(true);
}
}
@ -563,7 +566,7 @@ public class ArticleFragment extends Fragment {
super.onAttach(activity);
m_prefs = PreferenceManager.getDefaultSharedPreferences(getActivity().getApplicationContext());
m_activity = (OnlineActivity)activity;
m_activity = (HeadlinesActivity)activity;
}
}

View File

@ -9,6 +9,7 @@ import android.preference.PreferenceManager;
import android.support.v4.app.FragmentTransaction;
import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import org.fox.ttrss.types.Article;
import org.fox.ttrss.types.ArticleList;
@ -221,6 +222,13 @@ public class HeadlinesActivity extends OnlineActivity implements HeadlinesEventL
}
public void showSidebar(boolean show) {
if (!isSmallScreen()) {
findViewById(R.id.headlines_fragment).setVisibility(show ? View.VISIBLE : View.GONE);
invalidateOptionsMenu();
}
}
@Override
public void onHeadlinesLoaded(boolean appended) {
HeadlinesFragment hf = (HeadlinesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_HEADLINES);