From e057f881b154fc51052eb53f8d2d36a29f5863b1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 3 Dec 2011 22:09:51 +0300 Subject: [PATCH] combined mode tweaks --- AndroidManifest.xml | 2 +- src/org/fox/ttrss/HeadlinesFragment.java | 4 ++++ src/org/fox/ttrss/MainActivity.java | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 98df0cae..d630da5b 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -9,7 +9,7 @@ - + diff --git a/src/org/fox/ttrss/HeadlinesFragment.java b/src/org/fox/ttrss/HeadlinesFragment.java index bccb0756..8035e191 100644 --- a/src/org/fox/ttrss/HeadlinesFragment.java +++ b/src/org/fox/ttrss/HeadlinesFragment.java @@ -27,6 +27,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; +import android.webkit.WebSettings; import android.webkit.WebView; import android.widget.AbsListView; import android.widget.AbsListView.OnScrollListener; @@ -427,6 +428,9 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener, int webColor = tv.data; web.setBackgroundColor(webColor); + + //WebSettings ws = web.getSettings(); + //ws.setBlockNetworkLoads(true); if (m_prefs.getString("theme", "THEME_DARK").equals("THEME_DARK")) { cssOverride = "body { background : transparent; color : #e0e0e0}\n"; diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index 1c05e758..f63a1ca3 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -737,12 +737,14 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe findViewById(R.id.main).setAnimation(AnimationUtils.loadAnimation(this, R.anim.slide_right)); } + boolean browseCats = m_prefs.getBoolean("browse_cats_like_feeds", false); + if (m_smallScreenMode) { findViewById(R.id.article_fragment).setVisibility(View.GONE); findViewById(R.id.headlines_fragment).setVisibility(View.VISIBLE); } else { findViewById(R.id.article_fragment).setVisibility(View.GONE); - findViewById(R.id.feeds_fragment).setVisibility(View.VISIBLE); + findViewById(browseCats ? R.id.cats_fragment : R.id.feeds_fragment).setVisibility(View.VISIBLE); } m_selectedArticle = null; @@ -1038,6 +1040,7 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe findViewById(R.id.article_fragment).setVisibility(View.VISIBLE); } else { findViewById(R.id.feeds_fragment).setVisibility(View.GONE); + findViewById(R.id.cats_fragment).setVisibility(View.GONE); findViewById(R.id.article_fragment).setVisibility(View.VISIBLE); }